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

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 14238037: Made it possible to tell whether an extension is being installed or updated. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Test that already_installed is true on update, false on install. Created 7 years, 8 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
Index: chrome/browser/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 7d3dd97dbc3138a357ee7c5fa46ae533620c518a..8cde1e74b389de2b68ea9d45f69a486b72003b3a 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1302,9 +1302,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ExtensionInstallForcelist) {
content::NotificationService::AllSources());
UpdateProviderPolicy(policies);
observer.Wait();
- content::Details<const extensions::Extension> details = observer.details();
- EXPECT_EQ(kGoodCrxId, details->id());
- EXPECT_EQ(details.ptr(), service->GetExtensionById(kGoodCrxId, true));
+ content::Details<const extensions::InstalledExtensionInfo> details =
+ observer.details();
+ const extensions::Extension* extension = details->extension;
+ EXPECT_EQ(kGoodCrxId, extension->id());
+ EXPECT_EQ(extension, service->GetExtensionById(kGoodCrxId, true));
// The user is not allowed to uninstall force-installed extensions.
UninstallExtension(kGoodCrxId, false);
}
@@ -1375,8 +1377,9 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ExtensionInstallSources) {
PerformClick(1, 0);
observer.Wait();
- content::Details<const extensions::Extension> details = observer.details();
- EXPECT_EQ(kAdBlockCrxId, details->id());
+ content::Details<const extensions::InstalledExtensionInfo> details =
+ observer.details();
+ EXPECT_EQ(kAdBlockCrxId, details->extension->id());
// The first extension shouldn't be present, the second should be there.
EXPECT_FALSE(extension_service()->GetExtensionById(kGoodCrxId, true));

Powered by Google App Engine
This is Rietveld 408576698