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

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

Issue 2248103002: Reland: Replace CONTROL_BACKGROUND and DETACHED_BOOKMARK_BAR_BACKGROUND by COLOR_NTP_BACKGROUND (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Properly handle incognito browsing Created 4 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/themes/browser_theme_pack_unittest.cc
diff --git a/chrome/browser/themes/browser_theme_pack_unittest.cc b/chrome/browser/themes/browser_theme_pack_unittest.cc
index 581cefbbd6bf36c72af5320dc8977835229ea667..05dc3e8133efa6c0be6d8c2d265f6b0c7494e187 100644
--- a/chrome/browser/themes/browser_theme_pack_unittest.cc
+++ b/chrome/browser/themes/browser_theme_pack_unittest.cc
@@ -248,8 +248,6 @@ class BrowserThemePackTest : public ::testing::Test {
#endif
// Make sure we don't have phantom data.
- EXPECT_FALSE(pack->GetColor(ThemeProperties::COLOR_CONTROL_BACKGROUND,
- &color));
EXPECT_FALSE(pack->GetTint(ThemeProperties::TINT_FRAME, &actual));
}
@@ -435,23 +433,25 @@ TEST_F(BrowserThemePackTest, ProvideNtpHeaderColor) {
TEST_F(BrowserThemePackTest, SupportsAlpha) {
std::string color_json =
- "{ \"toolbar\": [0, 20, 40, 1], "
+ "{ \"toolbar\": [0, 20, 40, 0.7], "
" \"tab_text\": [60, 80, 100, 1], "
" \"tab_background_text\": [120, 140, 160, 0.0], "
" \"bookmark_text\": [180, 200, 220, 1.0], "
+ " \"ntp_background\": [20, 50, 140, 0.2], "
" \"ntp_text\": [240, 255, 0, 0.5] }";
LoadColorJSON(color_json);
std::map<int, SkColor> colors = GetDefaultColorMap();
// Verify that valid alpha values are parsed correctly.
- // The toolbar color's alpha value is intentionally ignored by theme provider.
- colors[ThemeProperties::COLOR_TOOLBAR] = SkColorSetARGB(255, 0, 20, 40);
colors[ThemeProperties::COLOR_TAB_TEXT] = SkColorSetARGB(255, 60, 80, 100);
colors[ThemeProperties::COLOR_BACKGROUND_TAB_TEXT] =
SkColorSetARGB(0, 120, 140, 160);
colors[ThemeProperties::COLOR_BOOKMARK_TEXT] =
SkColorSetARGB(255, 180, 200, 220);
colors[ThemeProperties::COLOR_NTP_TEXT] = SkColorSetARGB(128, 240, 255, 0);
+ // The theme machinery forces these colors to be opaque.
+ colors[ThemeProperties::COLOR_NTP_BACKGROUND] = SkColorSetRGB(20, 50, 140);
+ colors[ThemeProperties::COLOR_TOOLBAR] = SkColorSetRGB(0, 20, 40);
VerifyColorMap(colors);
}

Powered by Google App Engine
This is Rietveld 408576698