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

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

Issue 8827011: Panel strip refactor cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac/linux compile Created 9 years 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
diff --git a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
index 2db40e9b5102f9713a30025c7f1e6648a4c34988..ce2a6685ebf7c07b5d33026f2aeb4ba7babac161 100644
--- a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
@@ -195,7 +195,6 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
// Test minimizing/restoring an individual panel.
EXPECT_EQ(Panel::EXPANDED, panel1->expansion_state());
- EXPECT_EQ(0, panel_manager->minimized_panel_count());
int initial_height = panel1->GetBounds().height();
int titlebar_height = frame_view1->NonClientTopBorderHeight();
@@ -204,7 +203,6 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
EXPECT_LT(panel1->GetBounds().height(), titlebar_height);
EXPECT_GT(panel1->GetBounds().height(), 0);
EXPECT_EQ(expected_bottom_on_minimized, panel1->GetBounds().bottom());
- EXPECT_EQ(1, panel_manager->minimized_panel_count());
WaitTillBoundsAnimationFinished(panel1);
EXPECT_FALSE(panel1->IsActive());
@@ -212,7 +210,6 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
EXPECT_EQ(Panel::TITLE_ONLY, panel1->expansion_state());
EXPECT_EQ(titlebar_height, panel1->GetBounds().height());
EXPECT_EQ(expected_bottom_on_title_only, panel1->GetBounds().bottom());
- EXPECT_EQ(1, panel_manager->minimized_panel_count());
WaitTillBoundsAnimationFinished(panel1);
EXPECT_TRUE(frame_view1->close_button_->IsVisible());
EXPECT_TRUE(frame_view1->title_icon_->IsVisible());
@@ -222,7 +219,6 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
EXPECT_EQ(Panel::EXPANDED, panel1->expansion_state());
EXPECT_EQ(initial_height, panel1->GetBounds().height());
EXPECT_EQ(expected_bottom_on_expanded, panel1->GetBounds().bottom());
- EXPECT_EQ(0, panel_manager->minimized_panel_count());
WaitTillBoundsAnimationFinished(panel1);
EXPECT_TRUE(frame_view1->close_button_->IsVisible());
EXPECT_TRUE(frame_view1->title_icon_->IsVisible());
@@ -233,13 +229,11 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
EXPECT_LT(panel1->GetBounds().height(), titlebar_height);
EXPECT_GT(panel1->GetBounds().height(), 0);
EXPECT_EQ(expected_bottom_on_minimized, panel1->GetBounds().bottom());
- EXPECT_EQ(1, panel_manager->minimized_panel_count());
panel1->SetExpansionState(Panel::TITLE_ONLY);
EXPECT_EQ(Panel::TITLE_ONLY, panel1->expansion_state());
EXPECT_EQ(titlebar_height, panel1->GetBounds().height());
EXPECT_EQ(expected_bottom_on_title_only, panel1->GetBounds().bottom());
- EXPECT_EQ(1, panel_manager->minimized_panel_count());
// Create 2 more panels for more testing.
Panel* panel2 = CreatePanel("PanelTest2");
@@ -249,7 +243,6 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
EXPECT_EQ(Panel::EXPANDED, panel2->expansion_state());
panel3->SetExpansionState(Panel::MINIMIZED);
EXPECT_EQ(Panel::MINIMIZED, panel3->expansion_state());
- EXPECT_EQ(2, panel_manager->minimized_panel_count());
mock_auto_hiding_desktop_bar()->SetVisibility(
AutoHidingDesktopBar::ALIGN_BOTTOM, AutoHidingDesktopBar::VISIBLE);
@@ -258,7 +251,6 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
EXPECT_EQ(Panel::TITLE_ONLY, panel1->expansion_state());
EXPECT_EQ(Panel::EXPANDED, panel2->expansion_state());
EXPECT_EQ(Panel::TITLE_ONLY, panel3->expansion_state());
- EXPECT_EQ(2, panel_manager->minimized_panel_count());
mock_auto_hiding_desktop_bar()->SetVisibility(
AutoHidingDesktopBar::ALIGN_BOTTOM, AutoHidingDesktopBar::HIDDEN);
@@ -267,7 +259,6 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
EXPECT_EQ(Panel::MINIMIZED, panel1->expansion_state());
EXPECT_EQ(Panel::EXPANDED, panel2->expansion_state());
EXPECT_EQ(Panel::MINIMIZED, panel3->expansion_state());
- EXPECT_EQ(2, panel_manager->minimized_panel_count());
// Test if it is OK to bring up title-bar given the mouse position.
EXPECT_TRUE(panel_manager->ShouldBringUpTitlebars(
@@ -284,7 +275,6 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
// Test that the panel in title-only state should not be minimized
// regardless of the current mouse position when the panel is being dragged.
panel1->SetExpansionState(Panel::TITLE_ONLY);
- EXPECT_EQ(2, panel_manager->minimized_panel_count());
EXPECT_FALSE(panel_manager->ShouldBringUpTitlebars(
0, 0));
browser_view1->OnTitlebarMousePressed(panel1->GetBounds().origin());
@@ -297,7 +287,6 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
ClosePanelAndWaitForNotification(panel1);
ClosePanelAndWaitForNotification(panel2);
ClosePanelAndWaitForNotification(panel3);
- EXPECT_EQ(0, panel_manager->minimized_panel_count());
}
void TestDrawAttention() {

Powered by Google App Engine
This is Rietveld 408576698