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/base_panel_browser_test.h" | 6 #include "chrome/browser/ui/panels/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" |
11 #include "chrome/browser/ui/panels/panel_drag_controller.h" | 11 #include "chrome/browser/ui/panels/panel_drag_controller.h" |
12 #include "chrome/browser/ui/panels/panel_manager.h" | 12 #include "chrome/browser/ui/panels/panel_manager.h" |
13 | 13 |
| 14 // Refactor has only been done for Win and Mac panels so far. |
| 15 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 16 |
14 class PanelDragBrowserTest : public BasePanelBrowserTest { | 17 class PanelDragBrowserTest : public BasePanelBrowserTest { |
15 public: | 18 public: |
16 PanelDragBrowserTest() : BasePanelBrowserTest() { | 19 PanelDragBrowserTest() : BasePanelBrowserTest() { |
17 } | 20 } |
18 | 21 |
19 virtual ~PanelDragBrowserTest() { | 22 virtual ~PanelDragBrowserTest() { |
20 } | 23 } |
21 | 24 |
22 virtual void SetUpOnMainThread() OVERRIDE { | 25 virtual void SetUpOnMainThread() OVERRIDE { |
23 BasePanelBrowserTest::SetUpOnMainThread(); | 26 BasePanelBrowserTest::SetUpOnMainThread(); |
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 | 1333 |
1331 // Drag down the panel. Expect that the panel can be dragged without | 1334 // Drag down the panel. Expect that the panel can be dragged without |
1332 // constraint. | 1335 // constraint. |
1333 drag_to_location = gfx::Point(280, 150); | 1336 drag_to_location = gfx::Point(280, 150); |
1334 DragPanelToMouseLocation(panel, drag_to_location); | 1337 DragPanelToMouseLocation(panel, drag_to_location); |
1335 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type()); | 1338 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type()); |
1336 EXPECT_EQ(drag_to_location, panel->GetBounds().origin()); | 1339 EXPECT_EQ(drag_to_location, panel->GetBounds().origin()); |
1337 | 1340 |
1338 panel_manager->CloseAll(); | 1341 panel_manager->CloseAll(); |
1339 } | 1342 } |
| 1343 |
| 1344 #endif // OS_WIN || OS_MACOSX |
OLD | NEW |