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/docked_panel_collection.h" | 8 #include "chrome/browser/ui/panels/docked_panel_collection.h" |
9 #include "chrome/browser/ui/panels/panel.h" | 9 #include "chrome/browser/ui/panels/panel.h" |
10 #include "chrome/browser/ui/panels/panel_manager.h" | 10 #include "chrome/browser/ui/panels/panel_manager.h" |
11 #include "chrome/browser/ui/panels/test_panel_collection_squeeze_observer.h" | 11 #include "chrome/browser/ui/panels/test_panel_collection_squeeze_observer.h" |
12 #include "content/public/browser/notification_service.h" | 12 #include "content/public/browser/notification_service.h" |
13 #include "content/public/test/test_utils.h" | 13 #include "content/public/test/test_utils.h" |
14 | 14 |
15 class DockedPanelBrowserTest : public BasePanelBrowserTest { | 15 class DockedPanelBrowserTest : public BasePanelBrowserTest { |
16 public: | 16 public: |
17 virtual void SetUpOnMainThread() OVERRIDE { | 17 virtual void SetUpOnMainThread() override { |
18 BasePanelBrowserTest::SetUpOnMainThread(); | 18 BasePanelBrowserTest::SetUpOnMainThread(); |
19 | 19 |
20 // All the tests here assume using mocked 800x600 display area for the | 20 // All the tests here assume using mocked 800x600 display area for the |
21 // primary monitor. Do the check now. | 21 // primary monitor. Do the check now. |
22 gfx::Rect primary_display_area = PanelManager::GetInstance()-> | 22 gfx::Rect primary_display_area = PanelManager::GetInstance()-> |
23 display_settings_provider()->GetPrimaryDisplayArea(); | 23 display_settings_provider()->GetPrimaryDisplayArea(); |
24 DCHECK(primary_display_area.width() == 800); | 24 DCHECK(primary_display_area.width() == 800); |
25 DCHECK(primary_display_area.height() == 600); | 25 DCHECK(primary_display_area.height() == 600); |
26 } | 26 } |
27 }; | 27 }; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 CloseWindowAndWait(panel7); | 264 CloseWindowAndWait(panel7); |
265 signal2.Wait(); | 265 signal2.Wait(); |
266 | 266 |
267 // We should not have squeezing any more; all panels should be at full width. | 267 // We should not have squeezing any more; all panels should be at full width. |
268 EXPECT_EQ(panel1->GetBounds().width(), panel1->GetRestoredBounds().width()); | 268 EXPECT_EQ(panel1->GetBounds().width(), panel1->GetRestoredBounds().width()); |
269 EXPECT_EQ(panel4->GetBounds().width(), panel4->GetRestoredBounds().width()); | 269 EXPECT_EQ(panel4->GetBounds().width(), panel4->GetRestoredBounds().width()); |
270 EXPECT_EQ(panel6->GetBounds().width(), panel6->GetRestoredBounds().width()); | 270 EXPECT_EQ(panel6->GetBounds().width(), panel6->GetRestoredBounds().width()); |
271 | 271 |
272 panel_manager->CloseAll(); | 272 panel_manager->CloseAll(); |
273 } | 273 } |
OLD | NEW |