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

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

Issue 2120303002: Make toolbar color opaque in browser theme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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/themes/browser_theme_pack.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c79c6c2031c1cfcb86b6a8d2b67b8b1a96e4d3e4..581cefbbd6bf36c72af5320dc8977835229ea667 100644
--- a/chrome/browser/themes/browser_theme_pack_unittest.cc
+++ b/chrome/browser/themes/browser_theme_pack_unittest.cc
@@ -434,16 +434,18 @@ TEST_F(BrowserThemePackTest, ProvideNtpHeaderColor) {
}
TEST_F(BrowserThemePackTest, SupportsAlpha) {
- // Verify that valid alpha values are parsed correctly.
- std::string color_json = "{ \"toolbar\": [0, 20, 40, 0], "
- " \"tab_text\": [60, 80, 100, 1], "
- " \"tab_background_text\": [120, 140, 160, 0.0], "
- " \"bookmark_text\": [180, 200, 220, 1.0], "
- " \"ntp_text\": [240, 255, 0, 0.5] }";
+ std::string color_json =
+ "{ \"toolbar\": [0, 20, 40, 1], "
+ " \"tab_text\": [60, 80, 100, 1], "
+ " \"tab_background_text\": [120, 140, 160, 0.0], "
+ " \"bookmark_text\": [180, 200, 220, 1.0], "
+ " \"ntp_text\": [240, 255, 0, 0.5] }";
LoadColorJSON(color_json);
std::map<int, SkColor> colors = GetDefaultColorMap();
- colors[ThemeProperties::COLOR_TOOLBAR] = SkColorSetARGB(0, 0, 20, 40);
+ // 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);
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698