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

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

Issue 2044223006: Make toolbar color opaque in browser theme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Toolbar color alpha value is not expected to be supported in unit test. Created 4 years, 6 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 c79c6c2031c1cfcb86b6a8d2b67b8b1a96e4d3e4..c05ba0b7305788e7104eab52e3eceb3464d1fb5e 100644
--- a/chrome/browser/themes/browser_theme_pack_unittest.cc
+++ b/chrome/browser/themes/browser_theme_pack_unittest.cc
@@ -435,15 +435,17 @@ 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] }";
+ // The toolbar color's alpha value is intentionally ignored by theme provider.
Peter Kasting 2016/07/01 21:03:14 Nit: I would place this comment below, just above
+ 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);
+ 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);
« chrome/browser/themes/browser_theme_pack.cc ('K') | « 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