OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "chrome/browser/ui/panels/old_base_panel_browser_test.h" | 6 #include "chrome/browser/ui/panels/old_base_panel_browser_test.h" |
7 #include "chrome/browser/ui/panels/detached_panel_strip.h" | 7 #include "chrome/browser/ui/panels/detached_panel_strip.h" |
8 #include "chrome/browser/ui/panels/docked_panel_strip.h" | 8 #include "chrome/browser/ui/panels/docked_panel_strip.h" |
9 #include "chrome/browser/ui/panels/native_panel.h" | 9 #include "chrome/browser/ui/panels/native_panel.h" |
10 #include "chrome/browser/ui/panels/panel.h" | 10 #include "chrome/browser/ui/panels/panel.h" |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 | 1207 |
1208 // No more squeeze, docked panels should stay put. | 1208 // No more squeeze, docked panels should stay put. |
1209 EXPECT_EQ(docked_position1, panel3->GetBounds().origin()); | 1209 EXPECT_EQ(docked_position1, panel3->GetBounds().origin()); |
1210 EXPECT_EQ(panel1->GetBounds().width(), panel1->GetRestoredBounds().width()); | 1210 EXPECT_EQ(panel1->GetBounds().width(), panel1->GetRestoredBounds().width()); |
1211 EXPECT_EQ(docked_position2, panel5->GetBounds().origin()); | 1211 EXPECT_EQ(docked_position2, panel5->GetBounds().origin()); |
1212 EXPECT_EQ(panel2->GetBounds().width(), panel2->GetRestoredBounds().width()); | 1212 EXPECT_EQ(panel2->GetBounds().width(), panel2->GetRestoredBounds().width()); |
1213 | 1213 |
1214 panel_manager->CloseAll(); | 1214 panel_manager->CloseAll(); |
1215 } | 1215 } |
1216 | 1216 |
1217 IN_PROC_BROWSER_TEST_F(OldPanelDragBrowserTest, AttachWithSqueeze) { | 1217 // Flaky (sometimes timeout): http://crbug.com/141156 |
| 1218 IN_PROC_BROWSER_TEST_F(OldPanelDragBrowserTest, DISABLED_AttachWithSqueeze) { |
1218 PanelManager* panel_manager = PanelManager::GetInstance(); | 1219 PanelManager* panel_manager = PanelManager::GetInstance(); |
1219 DockedPanelStrip* docked_strip = panel_manager->docked_strip(); | 1220 DockedPanelStrip* docked_strip = panel_manager->docked_strip(); |
1220 DetachedPanelStrip* detached_strip = panel_manager->detached_strip(); | 1221 DetachedPanelStrip* detached_strip = panel_manager->detached_strip(); |
1221 | 1222 |
1222 // Create some detached, docked panels. | 1223 // Create some detached, docked panels. |
1223 // detached: P1 P2 P3 | 1224 // detached: P1 P2 P3 |
1224 // docked: P4 P5 P6 P7 | 1225 // docked: P4 P5 P6 P7 |
1225 Panel* panel1 = CreateDetachedPanel("1", gfx::Rect(100, 300, 200, 100)); | 1226 Panel* panel1 = CreateDetachedPanel("1", gfx::Rect(100, 300, 200, 100)); |
1226 Panel* panel2 = CreateDetachedPanel("2", gfx::Rect(200, 300, 200, 100)); | 1227 Panel* panel2 = CreateDetachedPanel("2", gfx::Rect(200, 300, 200, 100)); |
1227 Panel* panel3 = CreateDetachedPanel("3", gfx::Rect(400, 300, 200, 100)); | 1228 Panel* panel3 = CreateDetachedPanel("3", gfx::Rect(400, 300, 200, 100)); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 | 1342 |
1342 // Drag down the panel. Expect that the panel can be dragged without | 1343 // Drag down the panel. Expect that the panel can be dragged without |
1343 // constraint. | 1344 // constraint. |
1344 drag_to_location = gfx::Point(280, 150); | 1345 drag_to_location = gfx::Point(280, 150); |
1345 DragPanelToMouseLocation(panel, drag_to_location); | 1346 DragPanelToMouseLocation(panel, drag_to_location); |
1346 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type()); | 1347 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type()); |
1347 EXPECT_EQ(drag_to_location, panel->GetBounds().origin()); | 1348 EXPECT_EQ(drag_to_location, panel->GetBounds().origin()); |
1348 | 1349 |
1349 panel_manager->CloseAll(); | 1350 panel_manager->CloseAll(); |
1350 } | 1351 } |
OLD | NEW |