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

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

Issue 7677001: Some fixes to panel support on Windows: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 97031)
+++ chrome/browser/ui/panels/panel_browser_view_browsertest.cc (working copy)
@@ -219,11 +219,6 @@
EXPECT_TRUE(IsMouseWatcherStarted());
EXPECT_FALSE(panel1->IsActive());
WaitTillBoundsAnimationFinished(browser_view1);
- // TODO(jianli): Enable the following checks after the patch to support
- // minimizing window to 3-pixel line is landed.
- //EXPECT_FALSE(frame_view1->close_button_->IsVisible());
- //EXPECT_FALSE(frame_view1->title_icon_->IsVisible());
- //EXPECT_FALSE(frame_view1->title_label_->IsVisible());
panel1->SetExpansionState(Panel::TITLE_ONLY);
EXPECT_EQ(Panel::TITLE_ONLY, panel1->expansion_state());
@@ -288,6 +283,18 @@
EXPECT_FALSE(panel_manager->ShouldBringUpTitlebarForAllMinimizedPanels(
0, 0));
+ // Test that the panel in title-only state should not be minimized
+ // regardless the current mouse position when the panel is being dragged.
jennb 2011/08/17 23:01:35 s/regardless the/regardless of the
+ panel1->SetExpansionState(Panel::TITLE_ONLY);
+ EXPECT_FALSE(panel_manager->ShouldBringUpTitlebarForAllMinimizedPanels(
+ 0, 0));
+ browser_view1->OnTitlebarMousePressed(panel1->GetBounds().origin());
+ browser_view1->OnTitlebarMouseDragged(
+ panel1->GetBounds().origin().Subtract(gfx::Point(5, 5)));
+ EXPECT_TRUE(panel_manager->ShouldBringUpTitlebarForAllMinimizedPanels(
+ 0, 0));
+ browser_view1->OnTitlebarMouseReleased();
+
panel1->Close();
EXPECT_TRUE(IsMouseWatcherStarted());
panel2->Close();
@@ -406,10 +413,10 @@
// Validate that the controls should be updated when the activation state is
// changed.
frame_view->UpdateControlStyles(PanelBrowserFrameView::PAINT_AS_ACTIVE);
- gfx::Font title_label_font1 = frame_view->title_label_->font();
+ SkColor title_label_color1 = frame_view->title_label_->GetColor();
frame_view->UpdateControlStyles(PanelBrowserFrameView::PAINT_AS_INACTIVE);
- gfx::Font title_label_font2 = frame_view->title_label_->font();
- EXPECT_NE(title_label_font1.GetStyle(), title_label_font2.GetStyle());
+ SkColor title_label_color2 = frame_view->title_label_->GetColor();
+ EXPECT_NE(title_label_color1, title_label_color2);
browser_view->panel()->Close();
}

Powered by Google App Engine
This is Rietveld 408576698