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

Unified Diff: chrome/browser/themes/theme_service_browsertest.cc

Issue 1492423003: Rejigger ThemeService: move exposure of ThemeProvider interface to a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix that unittest Created 5 years 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/themes/theme_service.cc ('k') | chrome/browser/themes/theme_service_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service_browsertest.cc
diff --git a/chrome/browser/themes/theme_service_browsertest.cc b/chrome/browser/themes/theme_service_browsertest.cc
index dd8c84e3dc62c698e47f398610dad0b057b0370a..e936259f791f6c3e7d847f842285333515030585 100644
--- a/chrome/browser/themes/theme_service_browsertest.cc
+++ b/chrome/browser/themes/theme_service_browsertest.cc
@@ -45,11 +45,13 @@ class ThemeServiceBrowserTest : public ExtensionBrowserTest {
IN_PROC_BROWSER_TEST_F(ThemeServiceBrowserTest, PRE_ThemeDataPackInvalid) {
Profile* profile = browser()->profile();
ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile);
+ const ui::ThemeProvider& theme_provider =
+ ThemeService::GetThemeProviderForProfile(profile);
// Test initial state.
EXPECT_FALSE(UsingCustomTheme(*theme_service));
- EXPECT_NE(kThemeToolbarColor, theme_service->GetColor(
- ThemeProperties::COLOR_TOOLBAR));
+ EXPECT_NE(kThemeToolbarColor,
+ theme_provider.GetColor(ThemeProperties::COLOR_TOOLBAR));
EXPECT_EQ(base::FilePath(),
profile->GetPrefs()->GetFilePath(prefs::kCurrentThemePackFilename));
@@ -57,8 +59,8 @@ IN_PROC_BROWSER_TEST_F(ThemeServiceBrowserTest, PRE_ThemeDataPackInvalid) {
// Check that the theme was installed.
EXPECT_TRUE(UsingCustomTheme(*theme_service));
- EXPECT_EQ(kThemeToolbarColor, theme_service->GetColor(
- ThemeProperties::COLOR_TOOLBAR));
+ EXPECT_EQ(kThemeToolbarColor,
+ theme_provider.GetColor(ThemeProperties::COLOR_TOOLBAR));
EXPECT_NE(base::FilePath(),
profile->GetPrefs()->GetFilePath(prefs::kCurrentThemePackFilename));
@@ -73,9 +75,11 @@ IN_PROC_BROWSER_TEST_F(ThemeServiceBrowserTest, PRE_ThemeDataPackInvalid) {
IN_PROC_BROWSER_TEST_F(ThemeServiceBrowserTest, ThemeDataPackInvalid) {
ThemeService* theme_service = ThemeServiceFactory::GetForProfile(
browser()->profile());
+ const ui::ThemeProvider& theme_provider =
+ ThemeService::GetThemeProviderForProfile(browser()->profile());
EXPECT_TRUE(UsingCustomTheme(*theme_service));
- EXPECT_EQ(kThemeToolbarColor, theme_service->GetColor(
- ThemeProperties::COLOR_TOOLBAR));
+ EXPECT_EQ(kThemeToolbarColor,
+ theme_provider.GetColor(ThemeProperties::COLOR_TOOLBAR));
}
} // namespace
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | chrome/browser/themes/theme_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698