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 virtual ~PanelResizeBrowserTest() { |
19 } | 19 } |
20 | 20 |
21 virtual void SetUpOnMainThread() OVERRIDE { | 21 virtual void SetUpOnMainThread() override { |
22 BasePanelBrowserTest::SetUpOnMainThread(); | 22 BasePanelBrowserTest::SetUpOnMainThread(); |
23 | 23 |
24 // 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 |
25 // primary monitor. Do the check now. | 25 // primary monitor. Do the check now. |
26 gfx::Rect primary_display_area = PanelManager::GetInstance()-> | 26 gfx::Rect primary_display_area = PanelManager::GetInstance()-> |
27 display_settings_provider()->GetPrimaryDisplayArea(); | 27 display_settings_provider()->GetPrimaryDisplayArea(); |
28 DCHECK(primary_display_area.width() == 800); | 28 DCHECK(primary_display_area.width() == 800); |
29 DCHECK(primary_display_area.height() == 600); | 29 DCHECK(primary_display_area.height() == 600); |
30 } | 30 } |
31 | 31 |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 panel2_expected_bounds.y() + top_resize_height); | 665 panel2_expected_bounds.y() + top_resize_height); |
666 EXPECT_EQ(panel2_expected_bounds, panel2->GetBounds()); | 666 EXPECT_EQ(panel2_expected_bounds, panel2->GetBounds()); |
667 panel3_expected_bounds.set_y( | 667 panel3_expected_bounds.set_y( |
668 panel3_expected_bounds.y() + top_resize_height); | 668 panel3_expected_bounds.y() + top_resize_height); |
669 EXPECT_EQ(panel3_expected_bounds, panel3->GetBounds()); | 669 EXPECT_EQ(panel3_expected_bounds, panel3->GetBounds()); |
670 | 670 |
671 panel_manager->CloseAll(); | 671 panel_manager->CloseAll(); |
672 } | 672 } |
673 | 673 |
674 #endif | 674 #endif |
OLD | NEW |