Index: chrome/browser/background/background_application_list_model_unittest.cc |
diff --git a/chrome/browser/background/background_application_list_model_unittest.cc b/chrome/browser/background/background_application_list_model_unittest.cc |
index 9b873877fc760209774f800ca8288badd1272c9d..35e99e9063a8215ee2ecd5bf8321b233c90d6c58 100644 |
--- a/chrome/browser/background/background_application_list_model_unittest.cc |
+++ b/chrome/browser/background/background_application_list_model_unittest.cc |
@@ -132,20 +132,6 @@ void RemoveBackgroundPermission(ExtensionService* service, |
.RemovePermissionsUnsafe( |
extension, extension->permissions_data()->active_permissions()); |
} |
- |
-void AddEphemeralApp(const Extension* extension, ExtensionService* service) { |
- extensions::ExtensionPrefs* prefs = |
- extensions::ExtensionPrefs::Get(service->profile()); |
- ASSERT_TRUE(prefs); |
- prefs->OnExtensionInstalled(extension, |
- extensions::Extension::ENABLED, |
- syncer::StringOrdinal(), |
- extensions::kInstallFlagIsEphemeral, |
- std::string()); |
- |
- service->AddExtension(extension); |
-} |
- |
} // namespace |
// Crashes on Mac tryslaves. |
@@ -228,32 +214,6 @@ TEST_F(BackgroundApplicationListModelTest, MAYBE_ExplicitTest) { |
ASSERT_EQ(0U, model->size()); |
} |
-// Verifies that an ephemeral app cannot trigger background mode. |
-TEST_F(BackgroundApplicationListModelTest, EphemeralAppTest) { |
- InitializeAndLoadEmptyExtensionService(); |
- ASSERT_TRUE(service()->is_ready()); |
- ASSERT_TRUE(registry()->enabled_extensions().is_empty()); |
- scoped_ptr<BackgroundApplicationListModel> model( |
- new BackgroundApplicationListModel(profile_.get())); |
- ASSERT_EQ(0U, model->size()); |
- |
- scoped_refptr<Extension> background = CreateExtension("background", true); |
- |
- // An ephemeral app with the background permission should not trigger |
- // background mode. |
- AddEphemeralApp(background.get(), service()); |
- ASSERT_FALSE(IsBackgroundApp(*background.get())); |
- ASSERT_EQ(1U, registry()->enabled_extensions().size()); |
- ASSERT_EQ(0U, model->size()); |
- |
- // If the ephemeral app becomes promoted to an installed app, it can now |
- // trigger background mode. |
- service()->PromoteEphemeralApp(background.get(), false /*from sync*/); |
- ASSERT_TRUE(IsBackgroundApp(*background.get())); |
- ASSERT_EQ(1U, registry()->enabled_extensions().size()); |
- ASSERT_EQ(1U, model->size()); |
-} |
- |
// With minimal test logic, verifies behavior with dynamic permissions. |
TEST_F(BackgroundApplicationListModelTest, AddRemovePermissionsTest) { |
InitializeAndLoadEmptyExtensionService(); |