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

Unified Diff: ui/views/controls/button/label_button_unittest.cc

Issue 2382443007: Clean up NativeTheme (particularly CommonTheme). (Closed)
Patch Set: share color constant Created 4 years, 2 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 | « ui/native_theme/native_theme_win.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button_unittest.cc
diff --git a/ui/views/controls/button/label_button_unittest.cc b/ui/views/controls/button/label_button_unittest.cc
index 5c62da8d425b77a2f1427393297c1b3d02caaf32..5df8d44839116eaea29a2a7d3f9937536d3a5bf9 100644
--- a/ui/views/controls/button/label_button_unittest.cc
+++ b/ui/views/controls/button/label_button_unittest.cc
@@ -81,20 +81,21 @@ class LabelButtonTest : public test::WidgetTest {
// Establish the expected text colors for testing changes due to state.
themed_normal_text_color_ = button_->GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_LabelEnabledColor);
+
+ // For styled buttons only, platforms other than Desktop Linux either ignore
+ // NativeTheme and use a hardcoded black or (on Mac) have a NativeTheme that
+ // reliably returns black.
+ styled_normal_text_color_ = SK_ColorBLACK;
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
// The Linux theme provides a non-black highlight text color, but it's not
// used for styled buttons.
styled_highlight_text_color_ = styled_normal_text_color_ =
button_->GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_ButtonEnabledColor);
+#elif defined(OS_MACOSX)
+ styled_highlight_text_color_ = SK_ColorWHITE;
#else
- styled_highlight_text_color_ = button_->GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_ButtonHighlightColor);
-
- // For styled buttons only, platforms other than Desktop Linux either ignore
- // NativeTheme and use a hardcoded black or (on Mac) have a NativeTheme that
- // reliably returns black.
- styled_normal_text_color_ = SK_ColorBLACK;
+ styled_highlight_text_color_ = styled_normal_text_color_;
#endif
}
« no previous file with comments | « ui/native_theme/native_theme_win.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698