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 | |
17 class PanelDragBrowserTest : public BasePanelBrowserTest { | 14 class PanelDragBrowserTest : public BasePanelBrowserTest { |
18 public: | 15 public: |
19 PanelDragBrowserTest() : BasePanelBrowserTest() { | 16 PanelDragBrowserTest() : BasePanelBrowserTest() { |
20 } | 17 } |
21 | 18 |
22 virtual ~PanelDragBrowserTest() { | 19 virtual ~PanelDragBrowserTest() { |
23 } | 20 } |
24 | 21 |
25 virtual void SetUpOnMainThread() OVERRIDE { | 22 virtual void SetUpOnMainThread() OVERRIDE { |
26 BasePanelBrowserTest::SetUpOnMainThread(); | 23 BasePanelBrowserTest::SetUpOnMainThread(); |
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 | 1325 |
1329 // Drag down the panel. Expect that the panel can be dragged without | 1326 // Drag down the panel. Expect that the panel can be dragged without |
1330 // constraint. | 1327 // constraint. |
1331 drag_to_location = gfx::Point(280, 150); | 1328 drag_to_location = gfx::Point(280, 150); |
1332 DragPanelToMouseLocation(panel, drag_to_location); | 1329 DragPanelToMouseLocation(panel, drag_to_location); |
1333 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type()); | 1330 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type()); |
1334 EXPECT_EQ(drag_to_location, panel->GetBounds().origin()); | 1331 EXPECT_EQ(drag_to_location, panel->GetBounds().origin()); |
1335 | 1332 |
1336 panel_manager->CloseAll(); | 1333 panel_manager->CloseAll(); |
1337 } | 1334 } |
1338 | |
1339 #endif // OS_WIN || OS_MACOSX | |
OLD | NEW |