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