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/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
6 #include "chrome/browser/chrome_notification_types.h" | 6 #include "chrome/browser/chrome_notification_types.h" |
7 #include "chrome/browser/ui/panels/base_panel_browser_test.h" | 7 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
8 #include "chrome/browser/ui/panels/detached_panel_collection.h" | 8 #include "chrome/browser/ui/panels/detached_panel_collection.h" |
9 #include "chrome/browser/ui/panels/docked_panel_collection.h" | 9 #include "chrome/browser/ui/panels/docked_panel_collection.h" |
10 #include "chrome/browser/ui/panels/native_panel.h" | 10 #include "chrome/browser/ui/panels/native_panel.h" |
11 #include "chrome/browser/ui/panels/panel.h" | 11 #include "chrome/browser/ui/panels/panel.h" |
12 #include "chrome/browser/ui/panels/panel_drag_controller.h" | 12 #include "chrome/browser/ui/panels/panel_drag_controller.h" |
13 #include "chrome/browser/ui/panels/panel_manager.h" | 13 #include "chrome/browser/ui/panels/panel_manager.h" |
14 #include "chrome/browser/ui/panels/stacked_panel_collection.h" | 14 #include "chrome/browser/ui/panels/stacked_panel_collection.h" |
15 #include "chrome/browser/ui/panels/test_panel_collection_squeeze_observer.h" | 15 #include "chrome/browser/ui/panels/test_panel_collection_squeeze_observer.h" |
16 #include "content/public/browser/notification_service.h" | 16 #include "content/public/browser/notification_service.h" |
17 #include "content/public/test/test_utils.h" | 17 #include "content/public/test/test_utils.h" |
18 | 18 |
19 class PanelDragBrowserTest : public BasePanelBrowserTest { | 19 class PanelDragBrowserTest : public BasePanelBrowserTest { |
20 public: | 20 public: |
21 PanelDragBrowserTest() : BasePanelBrowserTest() { | 21 PanelDragBrowserTest() : BasePanelBrowserTest() { |
22 } | 22 } |
23 | 23 |
24 virtual ~PanelDragBrowserTest() { | 24 virtual ~PanelDragBrowserTest() { |
25 } | 25 } |
26 | 26 |
27 virtual void SetUpOnMainThread() OVERRIDE { | 27 virtual void SetUpOnMainThread() override { |
28 BasePanelBrowserTest::SetUpOnMainThread(); | 28 BasePanelBrowserTest::SetUpOnMainThread(); |
29 | 29 |
30 // All the tests here assume using mocked 800x600 display area for the | 30 // All the tests here assume using mocked 800x600 display area for the |
31 // primary monitor. Do the check now. | 31 // primary monitor. Do the check now. |
32 gfx::Rect primary_display_area = PanelManager::GetInstance()-> | 32 gfx::Rect primary_display_area = PanelManager::GetInstance()-> |
33 display_settings_provider()->GetPrimaryDisplayArea(); | 33 display_settings_provider()->GetPrimaryDisplayArea(); |
34 DCHECK(primary_display_area.width() == 800); | 34 DCHECK(primary_display_area.width() == 800); |
35 DCHECK(primary_display_area.height() == 600); | 35 DCHECK(primary_display_area.height() == 600); |
36 } | 36 } |
37 | 37 |
(...skipping 3055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3093 expected_x = secondary_work_area.x(); | 3093 expected_x = secondary_work_area.x(); |
3094 panel1_expected_bounds.set_x(expected_x); | 3094 panel1_expected_bounds.set_x(expected_x); |
3095 panel1_expected_bounds.set_y(secondary_work_area.y()); | 3095 panel1_expected_bounds.set_y(secondary_work_area.y()); |
3096 EXPECT_EQ(panel1_expected_bounds, panel1->GetBounds()); | 3096 EXPECT_EQ(panel1_expected_bounds, panel1->GetBounds()); |
3097 panel2_expected_bounds.set_x(expected_x); | 3097 panel2_expected_bounds.set_x(expected_x); |
3098 panel2_expected_bounds.set_y(panel1_expected_bounds.bottom()); | 3098 panel2_expected_bounds.set_y(panel1_expected_bounds.bottom()); |
3099 EXPECT_EQ(panel2_expected_bounds, panel2->GetBounds()); | 3099 EXPECT_EQ(panel2_expected_bounds, panel2->GetBounds()); |
3100 | 3100 |
3101 panel_manager->CloseAll(); | 3101 panel_manager->CloseAll(); |
3102 } | 3102 } |
OLD | NEW |