Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1703)

Unified Diff: chrome/browser/chromeos/file_manager/file_tasks_unittest.cc

Issue 1497193002: Remove all the ephemeral apps code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_manager/file_tasks_unittest.cc
diff --git a/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc b/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc
index b1d684608a06361b03e7bc2fad9a09615a28b43f..534d3af6df19737a2d77c668d64cecad2b93aad9 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc
@@ -461,7 +461,6 @@ TEST_F(FileManagerFileTasksComplexTest, FindFileHandlerTasks) {
// % ruby -le 'print (0...32).to_a.map{(?a + rand(16)).chr}.join'
const char kFooId[] = "hhgbjpmdppecanaaogonaigmmifgpaph";
const char kBarId[] = "odlhccgofgkadkkhcmhgnhgahonahoca";
- const char kEphemeralId[] = "opoomfdlbjcbjinalcjdjfoiikdeaoel";
// Foo.app can handle "text/plain" and "text/html".
extensions::ExtensionBuilder foo_app;
@@ -512,38 +511,6 @@ TEST_F(FileManagerFileTasksComplexTest, FindFileHandlerTasks) {
bar_app.SetID(kBarId);
extension_service_->AddExtension(bar_app.Build().get());
- // Ephemeral.app is an ephemeral app that can handle "text/plain".
- // It should not ever be found as ephemeral apps cannot be file handlers.
- extensions::ExtensionBuilder ephemeral_app;
- ephemeral_app.SetManifest(
- extensions::DictionaryBuilder()
- .Set("name", "Ephemeral")
- .Set("version", "1.0.0")
- .Set("manifest_version", 2)
- .Set("app",
- extensions::DictionaryBuilder().Set(
- "background",
- extensions::DictionaryBuilder().Set(
- "scripts",
- extensions::ListBuilder().Append("background.js"))))
- .Set("file_handlers",
- extensions::DictionaryBuilder().Set(
- "text",
- extensions::DictionaryBuilder().Set("title", "Text").Set(
- "types",
- extensions::ListBuilder().Append("text/plain")))));
- ephemeral_app.SetID(kEphemeralId);
- scoped_refptr<extensions::Extension> built_ephemeral_app(
- ephemeral_app.Build());
- extension_service_->AddExtension(built_ephemeral_app.get());
- extensions::ExtensionPrefs* extension_prefs =
- extensions::ExtensionPrefs::Get(&test_profile_);
- extension_prefs->OnExtensionInstalled(built_ephemeral_app.get(),
- extensions::Extension::ENABLED,
- syncer::StringOrdinal(),
- extensions::kInstallFlagIsEphemeral,
- std::string());
-
// Find apps for a "text/plain" file. Foo.app and Bar.app should be found.
PathAndMimeTypeSet path_mime_set;
path_mime_set.insert(
@@ -598,7 +565,6 @@ TEST_F(FileManagerFileTasksComplexTest, FindFileBrowserHandlerTasks) {
// Copied from FindFileHandlerTasks test above.
const char kFooId[] = "hhgbjpmdppecanaaogonaigmmifgpaph";
const char kBarId[] = "odlhccgofgkadkkhcmhgnhgahonahoca";
- const char kEphemeralId[] = "opoomfdlbjcbjinalcjdjfoiikdeaoel";
// Foo.app can handle ".txt" and ".html".
// This one is an extension, and has "file_browser_handlers"
@@ -641,36 +607,6 @@ TEST_F(FileManagerFileTasksComplexTest, FindFileBrowserHandlerTasks) {
bar_app.SetID(kBarId);
extension_service_->AddExtension(bar_app.Build().get());
- // Ephemeral.app is an ephemeral app that can handle ".txt".
- // It should not ever be found as ephemeral apps cannot be file browser
- // handlers.
- extensions::ExtensionBuilder ephemeral_app;
- ephemeral_app.SetManifest(
- extensions::DictionaryBuilder()
- .Set("name", "Ephemeral")
- .Set("version", "1.0.0")
- .Set("manifest_version", 2)
- .Set("permissions",
- extensions::ListBuilder().Append("fileBrowserHandler"))
- .Set("file_browser_handlers",
- extensions::ListBuilder().Append(
- extensions::DictionaryBuilder()
- .Set("id", "open")
- .Set("default_title", "open")
- .Set("file_filters", extensions::ListBuilder().Append(
- "filesystem:*.txt")))));
- ephemeral_app.SetID(kEphemeralId);
- scoped_refptr<extensions::Extension> built_ephemeral_app(
- ephemeral_app.Build());
- extension_service_->AddExtension(built_ephemeral_app.get());
- extensions::ExtensionPrefs* extension_prefs =
- extensions::ExtensionPrefs::Get(&test_profile_);
- extension_prefs->OnExtensionInstalled(built_ephemeral_app.get(),
- extensions::Extension::ENABLED,
- syncer::StringOrdinal(),
- extensions::kInstallFlagIsEphemeral,
- std::string());
-
// Find apps for a ".txt" file. Foo.app and Bar.app should be found.
std::vector<GURL> file_urls;
file_urls.push_back(GURL("filesystem:chrome-extension://id/dir/foo.txt"));

Powered by Google App Engine
This is Rietveld 408576698