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 "chrome/browser/ui/panels/base_panel_browser_test.h" | 5 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
6 #include "chrome/browser/ui/panels/detached_panel_collection.h" | 6 #include "chrome/browser/ui/panels/detached_panel_collection.h" |
7 #include "chrome/browser/ui/panels/panel.h" | 7 #include "chrome/browser/ui/panels/panel.h" |
8 #include "chrome/browser/ui/panels/panel_manager.h" | 8 #include "chrome/browser/ui/panels/panel_manager.h" |
9 #include "chrome/browser/ui/panels/panel_resize_controller.h" | 9 #include "chrome/browser/ui/panels/panel_resize_controller.h" |
10 #include "chrome/browser/ui/panels/stacked_panel_collection.h" | 10 #include "chrome/browser/ui/panels/stacked_panel_collection.h" |
11 #include "ui/base/hit_test.h" | 11 #include "ui/base/hit_test.h" |
12 | 12 |
13 class PanelResizeBrowserTest : public BasePanelBrowserTest { | 13 class PanelResizeBrowserTest : public BasePanelBrowserTest { |
14 public: | 14 public: |
15 PanelResizeBrowserTest() : BasePanelBrowserTest() { | 15 PanelResizeBrowserTest() : BasePanelBrowserTest() { |
16 } | 16 } |
17 | 17 |
18 virtual ~PanelResizeBrowserTest() { | 18 ~PanelResizeBrowserTest() override {} |
19 } | |
20 | 19 |
21 void SetUpOnMainThread() override { | 20 void SetUpOnMainThread() override { |
22 BasePanelBrowserTest::SetUpOnMainThread(); | 21 BasePanelBrowserTest::SetUpOnMainThread(); |
23 | 22 |
24 // All the tests here assume using mocked 800x600 display area for the | 23 // All the tests here assume using mocked 800x600 display area for the |
25 // primary monitor. Do the check now. | 24 // primary monitor. Do the check now. |
26 gfx::Rect primary_display_area = PanelManager::GetInstance()-> | 25 gfx::Rect primary_display_area = PanelManager::GetInstance()-> |
27 display_settings_provider()->GetPrimaryDisplayArea(); | 26 display_settings_provider()->GetPrimaryDisplayArea(); |
28 DCHECK(primary_display_area.width() == 800); | 27 DCHECK(primary_display_area.width() == 800); |
29 DCHECK(primary_display_area.height() == 600); | 28 DCHECK(primary_display_area.height() == 600); |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 panel2_expected_bounds.y() + top_resize_height); | 664 panel2_expected_bounds.y() + top_resize_height); |
666 EXPECT_EQ(panel2_expected_bounds, panel2->GetBounds()); | 665 EXPECT_EQ(panel2_expected_bounds, panel2->GetBounds()); |
667 panel3_expected_bounds.set_y( | 666 panel3_expected_bounds.set_y( |
668 panel3_expected_bounds.y() + top_resize_height); | 667 panel3_expected_bounds.y() + top_resize_height); |
669 EXPECT_EQ(panel3_expected_bounds, panel3->GetBounds()); | 668 EXPECT_EQ(panel3_expected_bounds, panel3->GetBounds()); |
670 | 669 |
671 panel_manager->CloseAll(); | 670 panel_manager->CloseAll(); |
672 } | 671 } |
673 | 672 |
674 #endif | 673 #endif |
OLD | NEW |