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

Unified Diff: chrome/browser/ui/panels/panel_browser_view_browsertest.cc

Issue 8221027: Make views::Label and views::Link auto-color themselves to be readable over their background colo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
Index: chrome/browser/ui/panels/panel_browser_view_browsertest.cc
===================================================================
--- chrome/browser/ui/panels/panel_browser_view_browsertest.cc (revision 104769)
+++ chrome/browser/ui/panels/panel_browser_view_browsertest.cc (working copy)
@@ -294,6 +294,7 @@
Panel* panel = CreatePanel("PanelTest");
PanelBrowserView* browser_view = GetBrowserView(panel);
PanelBrowserFrameView* frame_view = browser_view->GetFrameView();
+ frame_view->title_label_->SetAutoColorReadabilityEnabled(false);
SkColor attention_color = frame_view->GetTitleColor(
PanelBrowserFrameView::PAINT_FOR_ATTENTION);
@@ -302,20 +303,20 @@
browser_view->DrawAttention();
EXPECT_FALSE(browser_view->IsDrawingAttention());
MessageLoopForUI::current()->RunAllPending();
- EXPECT_NE(attention_color, frame_view->title_label_->GetColor());
+ EXPECT_NE(attention_color, frame_view->title_label_->enabled_color());
// Test that the attention is drawn when the expanded panel is not in focus.
panel->Deactivate();
browser_view->DrawAttention();
EXPECT_TRUE(browser_view->IsDrawingAttention());
MessageLoopForUI::current()->RunAllPending();
- EXPECT_EQ(attention_color, frame_view->title_label_->GetColor());
+ EXPECT_EQ(attention_color, frame_view->title_label_->enabled_color());
// Test that the attention is cleared.
browser_view->StopDrawingAttention();
EXPECT_FALSE(browser_view->IsDrawingAttention());
MessageLoopForUI::current()->RunAllPending();
- EXPECT_NE(attention_color, frame_view->title_label_->GetColor());
+ EXPECT_NE(attention_color, frame_view->title_label_->enabled_color());
// Test that the attention is drawn and the title-bar is brought up when the
// minimized panel is not in focus.
@@ -326,7 +327,7 @@
EXPECT_TRUE(browser_view->IsDrawingAttention());
EXPECT_EQ(Panel::TITLE_ONLY, panel->expansion_state());
MessageLoopForUI::current()->RunAllPending();
- EXPECT_EQ(attention_color, frame_view->title_label_->GetColor());
+ EXPECT_EQ(attention_color, frame_view->title_label_->enabled_color());
// Test that we cannot bring up other minimized panel if the mouse is over
// the panel that draws attension.
@@ -342,7 +343,7 @@
EXPECT_FALSE(browser_view->IsDrawingAttention());
EXPECT_EQ(Panel::EXPANDED, panel->expansion_state());
MessageLoopForUI::current()->RunAllPending();
- EXPECT_NE(attention_color, frame_view->title_label_->GetColor());
+ EXPECT_NE(attention_color, frame_view->title_label_->enabled_color());
panel->Close();
}

Powered by Google App Engine
This is Rietveld 408576698