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

Unified Diff: chrome/browser/background/background_application_list_model_unittest.cc

Issue 398083002: Add "UninstallReason" parameter to ExtensionRegistryObserver::OnExtensionUninstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix header file. Created 6 years, 5 months 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
« no previous file with comments | « chrome/browser/apps/shortcut_manager.cc ('k') | chrome/browser/extensions/activity_log/activity_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a8c817942175bad9553120e77c7882b0c8544e9b..2dfbf5f6104c23a30b2740a3263be5a7774b0c88 100644
--- a/chrome/browser/background/background_application_list_model_unittest.cc
+++ b/chrome/browser/background/background_application_list_model_unittest.cc
@@ -21,6 +21,7 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/permissions/api_permission.h"
@@ -212,27 +213,27 @@ TEST_F(BackgroundApplicationListModelTest, MAYBE_ExplicitTest) {
// Remove in FIFO order.
ASSERT_FALSE(IsBackgroundApp(*ext1.get()));
service->UninstallExtension(
- ext1->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ ext1->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(4U, service->extensions()->size());
ASSERT_EQ(2U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp1.get()));
service->UninstallExtension(
- bgapp1->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ bgapp1->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(3U, service->extensions()->size());
ASSERT_EQ(1U, model->size());
ASSERT_FALSE(IsBackgroundApp(*ext2.get()));
service->UninstallExtension(
- ext2->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ ext2->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(2U, service->extensions()->size());
ASSERT_EQ(1U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp2.get()));
service->UninstallExtension(
- bgapp2->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ bgapp2->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(1U, service->extensions()->size());
ASSERT_EQ(0U, model->size());
ASSERT_FALSE(IsBackgroundApp(*ext3.get()));
service->UninstallExtension(
- ext3->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ ext3->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(0U, service->extensions()->size());
ASSERT_EQ(0U, model->size());
}
@@ -284,7 +285,7 @@ TEST_F(BackgroundApplicationListModelTest, PushMessagingTest) {
// Need to remove ext2 because it uses same id as bgapp3.
ASSERT_FALSE(IsBackgroundApp(*ext2.get()));
service->UninstallExtension(
- ext2->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ ext2->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(3U, service->extensions()->size());
ASSERT_EQ(2U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp3.get()));
@@ -295,22 +296,22 @@ TEST_F(BackgroundApplicationListModelTest, PushMessagingTest) {
// Remove in FIFO order.
ASSERT_FALSE(IsBackgroundApp(*ext1.get()));
service->UninstallExtension(
- ext1->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ ext1->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(3U, service->extensions()->size());
ASSERT_EQ(3U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp1.get()));
service->UninstallExtension(
- bgapp1->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ bgapp1->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(2U, service->extensions()->size());
ASSERT_EQ(2U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp2.get()));
service->UninstallExtension(
- bgapp2->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ bgapp2->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(1U, service->extensions()->size());
ASSERT_EQ(1U, model->size());
ASSERT_TRUE(IsBackgroundApp(*bgapp3.get()));
service->UninstallExtension(
- bgapp3->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ bgapp3->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(0U, service->extensions()->size());
ASSERT_EQ(0U, model->size());
}
@@ -428,7 +429,7 @@ void RemoveExtension(ExtensionService* service,
--*count;
ASSERT_EQ(*count, extensions->size());
service->UninstallExtension(
- extension->id(), ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL);
+ extension->id(), extensions::UNINSTALL_REASON_FOR_TESTING, NULL);
ASSERT_EQ(*count, service->extensions()->size());
ASSERT_EQ(*expected, model->size());
}
« no previous file with comments | « chrome/browser/apps/shortcut_manager.cc ('k') | chrome/browser/extensions/activity_log/activity_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698