Chromium Code Reviews| 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_ = |
|
tdanderson
2016/09/30 21:00:56
Can you break up the multiple assignment into two
Evan Stade
2016/09/30 22:19:00
is that a style rule? If not it seems like somethi
tdanderson
2016/09/30 22:39:37
I thought it was, but can't find it in the style g
|
| 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 |
| } |