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

Unified Diff: chrome/browser/ui/search/instant_extended_interactive_uitest.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
Index: chrome/browser/ui/search/instant_extended_interactive_uitest.cc
diff --git a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
index 951862021a6f251e289b2ab6a7d7c3b7c16161ea..4f5757b1e8abf60f96818aa1d689bac7b6acecdf 100644
--- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
@@ -312,14 +312,21 @@ class InstantPolicyTest : public ExtensionBrowserTest, public InstantTestBase {
void InstallThemeAndVerify(const std::string& theme_dir,
const std::string& theme_name) {
+ const extensions::Extension* theme =
+ ThemeServiceFactory::GetThemeForProfile(
+ ExtensionBrowserTest::browser()->profile());
+ // If there is already a theme installed, the current theme should be
+ // disabled and the new one installed + enabled.
+ int expected_change = theme ? 0 : 1;
+
const base::FilePath theme_path = test_data_dir_.AppendASCII(theme_dir);
ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(
- theme_path, 1, ExtensionBrowserTest::browser()));
- const extensions::Extension* theme =
+ theme_path, expected_change, ExtensionBrowserTest::browser()));
+ const extensions::Extension* new_theme =
ThemeServiceFactory::GetThemeForProfile(
ExtensionBrowserTest::browser()->profile());
- ASSERT_NE(static_cast<extensions::Extension*>(NULL), theme);
- ASSERT_EQ(theme->name(), theme_name);
+ ASSERT_NE(static_cast<extensions::Extension*>(NULL), new_theme);
+ ASSERT_EQ(new_theme->name(), theme_name);
}
private:
« no previous file with comments | « chrome/browser/themes/theme_syncable_service.cc ('k') | chrome/test/data/extensions/theme_minimal/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698