| 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 1b13b8c50a2e865769dae571f62bafe738a6289a..5c94c30fe039fb8fa5bb416bfcbfc86b3dffc632 100644
|
| --- a/ui/views/controls/button/label_button_unittest.cc
|
| +++ b/ui/views/controls/button/label_button_unittest.cc
|
| @@ -14,6 +14,7 @@
|
| #include "ui/base/ui_base_switches.h"
|
| #include "ui/events/test/event_generator.h"
|
| #include "ui/gfx/canvas.h"
|
| +#include "ui/gfx/color_utils.h"
|
| #include "ui/gfx/font_list.h"
|
| #include "ui/gfx/geometry/size.h"
|
| #include "ui/gfx/geometry/vector2d.h"
|
| @@ -405,6 +406,21 @@ TEST_F(LabelButtonTest, HighlightedButtonStyle) {
|
| default_before->label()->enabled_color());
|
| }
|
|
|
| +// Ensure the label gets the correct enabled color after
|
| +// LabelButton::ResetColorsFromNativeTheme() is invoked.
|
| +TEST_F(LabelButtonTest, ResetColorsFromNativeTheme) {
|
| + ASSERT_FALSE(color_utils::IsInvertedColorScheme());
|
| + ASSERT_NE(button_->label()->background_color(), SK_ColorBLACK);
|
| + EXPECT_EQ(themed_normal_text_color_, button_->label()->enabled_color());
|
| +
|
| + button_->label()->SetBackgroundColor(SK_ColorBLACK);
|
| + button_->label()->SetAutoColorReadabilityEnabled(true);
|
| + EXPECT_NE(themed_normal_text_color_, button_->label()->enabled_color());
|
| +
|
| + button_->ResetColorsFromNativeTheme();
|
| + EXPECT_EQ(themed_normal_text_color_, button_->label()->enabled_color());
|
| +}
|
| +
|
| // Test fixture for a LabelButton that has an ink drop configured.
|
| class InkDropLabelButtonTest : public ViewsTestBase {
|
| public:
|
|
|