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

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: Added extra check. 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 3bef5048fbc66328b51c287718f731071d71f9f0..a26d733f1d66f9ccf7a16cf6f8dda5aaaa8794fa 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1305,9 +1305,12 @@ 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));
+ // Note: Cannot check that the notification details match the expected
+ // exception, since the details object has already been freed prior to
+ // the completion of observer.Wait().
+
+ EXPECT_TRUE(service->GetExtensionById(kGoodCrxId, true));
+
// The user is not allowed to uninstall force-installed extensions.
UninstallExtension(kGoodCrxId, false);
}
@@ -1377,9 +1380,9 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ExtensionInstallSources) {
content::NotificationService::AllSources());
PerformClick(1, 0);
observer.Wait();
-
- content::Details<const extensions::Extension> details = observer.details();
- EXPECT_EQ(kAdBlockCrxId, details->id());
+ // Note: Cannot check that the notification details match the expected
+ // exception, since the details object has already been freed prior to
+ // the completion of observer.Wait().
// The first extension shouldn't be present, the second should be there.
EXPECT_FALSE(extension_service()->GetExtensionById(kGoodCrxId, true));
« no previous file with comments | « chrome/browser/performance_monitor/performance_monitor.cc ('k') | chrome/browser/sync_file_system/sync_file_system_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698