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

Unified Diff: chrome/browser/ui/search/instant_extended_interactive_uitest.cc

Issue 2799003002: Unpack theme data from extensions off of UI thread. (Closed)
Patch Set: fix gtk case Created 3 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
« no previous file with comments | « chrome/browser/ui/extensions/extension_install_ui_default.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7bc09d771a762d28a42be260f08c19fbede91785..e61e99b48e9ebd7a88f31b505b5116a74de9cfde 100644
--- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
@@ -291,8 +291,7 @@ class InstantPolicyTest : public ExtensionBrowserTest,
void InstallThemeAndVerify(const std::string& theme_dir,
const std::string& theme_name) {
const extensions::Extension* theme =
- ThemeServiceFactory::GetThemeForProfile(
- ExtensionBrowserTest::browser()->profile());
+ ThemeServiceFactory::GetThemeForProfile(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;
@@ -300,9 +299,13 @@ class InstantPolicyTest : public ExtensionBrowserTest,
const base::FilePath theme_path = test_data_dir_.AppendASCII(theme_dir);
ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(
theme_path, expected_change, ExtensionBrowserTest::browser()));
+ content::WindowedNotificationObserver theme_change_observer(
+ chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
+ content::Source<ThemeService>(
+ ThemeServiceFactory::GetForProfile(profile())));
+ theme_change_observer.Wait();
const extensions::Extension* new_theme =
- ThemeServiceFactory::GetThemeForProfile(
- ExtensionBrowserTest::browser()->profile());
+ ThemeServiceFactory::GetThemeForProfile(profile());
ASSERT_NE(static_cast<extensions::Extension*>(NULL), new_theme);
ASSERT_EQ(new_theme->name(), theme_name);
}
« no previous file with comments | « chrome/browser/ui/extensions/extension_install_ui_default.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698