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

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

Issue 1148323007: [Extensions] Introduce a ScopedExtensionDialogAutoConfirm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ben's Created 5 years, 7 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/webstore_installer_test.cc
diff --git a/chrome/browser/extensions/webstore_installer_test.cc b/chrome/browser/extensions/webstore_installer_test.cc
index cb3b7905a405bb87fadce07cb515683b10c768bb..73192e0c42f7f65f9d9995b0c0d560c65782eb9f 100644
--- a/chrome/browser/extensions/webstore_installer_test.cc
+++ b/chrome/browser/extensions/webstore_installer_test.cc
@@ -138,11 +138,13 @@ void WebstoreInstallerTest::RunTestAsync(
}
void WebstoreInstallerTest::AutoAcceptInstall() {
- ExtensionInstallPrompt::g_auto_confirm_for_tests =
- ExtensionInstallPrompt::ACCEPT;
+ install_auto_confirm_.reset(); // Destroy any old override first.
+ install_auto_confirm_.reset(new extensions::ScopedTestDialogAutoConfirm(
+ extensions::ScopedTestDialogAutoConfirm::ACCEPT));
}
void WebstoreInstallerTest::AutoCancelInstall() {
- ExtensionInstallPrompt::g_auto_confirm_for_tests =
- ExtensionInstallPrompt::CANCEL;
+ install_auto_confirm_.reset(); // Destroy any old override first.
+ install_auto_confirm_.reset(new extensions::ScopedTestDialogAutoConfirm(
+ extensions::ScopedTestDialogAutoConfirm::CANCEL));
}

Powered by Google App Engine
This is Rietveld 408576698