| 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() { | |
| 22 } | |
| 23 | |
| 24 virtual ~PanelDragBrowserTest() { | |
| 25 } | |
| 26 | |
| 27 void SetUpOnMainThread() override { | 21 void SetUpOnMainThread() override { |
| 28 BasePanelBrowserTest::SetUpOnMainThread(); | 22 BasePanelBrowserTest::SetUpOnMainThread(); |
| 29 | 23 |
| 30 // All the tests here assume using mocked 800x600 display area for the | 24 // All the tests here assume using mocked 800x600 display area for the |
| 31 // primary monitor. Do the check now. | 25 // primary monitor. Do the check now. |
| 32 gfx::Rect primary_display_area = PanelManager::GetInstance()-> | 26 gfx::Rect primary_display_area = PanelManager::GetInstance()-> |
| 33 display_settings_provider()->GetPrimaryDisplayArea(); | 27 display_settings_provider()->GetPrimaryDisplayArea(); |
| 34 DCHECK(primary_display_area.width() == 800); | 28 DCHECK(primary_display_area.width() == 800); |
| 35 DCHECK(primary_display_area.height() == 600); | 29 DCHECK(primary_display_area.height() == 600); |
| 36 } | 30 } |
| (...skipping 3056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3093 expected_x = secondary_work_area.x(); | 3087 expected_x = secondary_work_area.x(); |
| 3094 panel1_expected_bounds.set_x(expected_x); | 3088 panel1_expected_bounds.set_x(expected_x); |
| 3095 panel1_expected_bounds.set_y(secondary_work_area.y()); | 3089 panel1_expected_bounds.set_y(secondary_work_area.y()); |
| 3096 EXPECT_EQ(panel1_expected_bounds, panel1->GetBounds()); | 3090 EXPECT_EQ(panel1_expected_bounds, panel1->GetBounds()); |
| 3097 panel2_expected_bounds.set_x(expected_x); | 3091 panel2_expected_bounds.set_x(expected_x); |
| 3098 panel2_expected_bounds.set_y(panel1_expected_bounds.bottom()); | 3092 panel2_expected_bounds.set_y(panel1_expected_bounds.bottom()); |
| 3099 EXPECT_EQ(panel2_expected_bounds, panel2->GetBounds()); | 3093 EXPECT_EQ(panel2_expected_bounds, panel2->GetBounds()); |
| 3100 | 3094 |
| 3101 panel_manager->CloseAll(); | 3095 panel_manager->CloseAll(); |
| 3102 } | 3096 } |
| OLD | NEW |