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

Unified Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 1534123002: [Extensions] Migrate ExtensionInstallPrompt::Delegate to be a callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 511226edca5b05865ed401402f5eb4ebe3caa312..bdeb43d6e6b3fa5ed9b5c2c45901a253b25c6158 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -6042,13 +6042,15 @@ TEST_F(ExtensionServiceTest, MultipleExternalInstallErrors) {
// Accept the first extension, this will remove the error associated with
// this extension. Also verify the other errors still exist.
- GetError(extension_ids[0])->InstallUIProceed();
+ GetError(extension_ids[0])->OnInstallPromptDone(
+ ExtensionInstallPrompt::Result::ACCEPTED);
EXPECT_FALSE(GetError(extension_ids[0]));
ASSERT_TRUE(GetError(extension_ids[1]));
EXPECT_TRUE(GetError(extension_ids[2]));
// Abort the second extension.
- GetError(extension_ids[1])->InstallUIAbort(true);
+ GetError(extension_ids[1])->OnInstallPromptDone(
+ ExtensionInstallPrompt::Result::USER_CANCELED);
EXPECT_FALSE(GetError(extension_ids[0]));
EXPECT_FALSE(GetError(extension_ids[1]));
ASSERT_TRUE(GetError(extension_ids[2]));
@@ -6160,7 +6162,7 @@ TEST_F(ExtensionServiceTest, ExternalInstallClickToRemove) {
// Click the negative response.
service_->external_install_manager()
->GetErrorsForTesting()[0]
- ->InstallUIAbort(true);
+ ->OnInstallPromptDone(ExtensionInstallPrompt::Result::USER_CANCELED);
// The Extension should be uninstalled.
EXPECT_FALSE(registry()->GetExtensionById(updates_from_webstore,
ExtensionRegistry::EVERYTHING));
@@ -6203,7 +6205,7 @@ TEST_F(ExtensionServiceTest, ExternalInstallClickToKeep) {
// Accept the extension.
service_->external_install_manager()
->GetErrorsForTesting()[0]
- ->InstallUIProceed();
+ ->OnInstallPromptDone(ExtensionInstallPrompt::Result::ACCEPTED);
// It should be enabled again.
EXPECT_TRUE(registry()->enabled_extensions().GetByID(updates_from_webstore));
« no previous file with comments | « chrome/browser/extensions/extension_reenabler_unittest.cc ('k') | chrome/browser/extensions/external_install_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698