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

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

Issue 22755003: Reland: Chrome side work for allowing a user to revert to their previous theme without closing ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 4 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 | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_install_ui_browsertest.cc
diff --git a/chrome/browser/extensions/extension_install_ui_browsertest.cc b/chrome/browser/extensions/extension_install_ui_browsertest.cc
index f38878b7f27b9d6e797c2b001f52420d5d4197ce..4687be3c017c69a4b10f76645a5938c842cf23ab 100644
--- a/chrome/browser/extensions/extension_install_ui_browsertest.cc
+++ b/chrome/browser/extensions/extension_install_ui_browsertest.cc
@@ -50,8 +50,12 @@ class ExtensionInstallUIBrowserTest : public ExtensionBrowserTest {
// Install the given theme from the data dir and verify expected name.
void InstallThemeAndVerify(const char* theme_name,
const std::string& expected_name) {
+ // If there is already a theme installed, the current theme should be
+ // disabled and the new one installed + enabled.
+ int expected_change = GetTheme() ? 0 : 1;
const base::FilePath theme_path = test_data_dir_.AppendASCII(theme_name);
- ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(theme_path, 1, browser()));
+ ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(theme_path, expected_change,
+ browser()));
const Extension* theme = GetTheme();
ASSERT_TRUE(theme);
ASSERT_EQ(theme->name(), expected_name);
@@ -88,7 +92,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
ASSERT_EQ(NULL, GetTheme());
// Set the same theme twice and undo to verify we go back to default theme.
- ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(theme_crx, 1, browser()));
+ ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(theme_crx, 0, browser()));
theme = GetTheme();
ASSERT_TRUE(theme);
ASSERT_EQ(theme_id, theme->id());
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698