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.h" | 5 #include "base/message_loop.h" |
6 #include "chrome/browser/ui/panels/base_panel_browser_test.h" | 6 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
7 #include "chrome/browser/ui/panels/docked_panel_strip.h" | 7 #include "chrome/browser/ui/panels/docked_panel_strip.h" |
8 #include "chrome/browser/ui/panels/panel.h" | 8 #include "chrome/browser/ui/panels/panel.h" |
9 #include "chrome/browser/ui/panels/panel_manager.h" | 9 #include "chrome/browser/ui/panels/panel_manager.h" |
10 #include "chrome/common/chrome_notification_types.h" | 10 #include "chrome/common/chrome_notification_types.h" |
11 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
12 #include "content/public/test/test_utils.h" | 12 #include "content/public/test/test_utils.h" |
13 | 13 |
| 14 // Refactor has only been done for Win and Mac panels so far. |
| 15 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 16 |
14 class DockedPanelBrowserTest : public BasePanelBrowserTest { | 17 class DockedPanelBrowserTest : public BasePanelBrowserTest { |
15 public: | 18 public: |
16 virtual void SetUpOnMainThread() OVERRIDE { | 19 virtual void SetUpOnMainThread() OVERRIDE { |
17 BasePanelBrowserTest::SetUpOnMainThread(); | 20 BasePanelBrowserTest::SetUpOnMainThread(); |
18 | 21 |
19 // All the tests here assume using mocked 800x600 screen area for the | 22 // All the tests here assume using mocked 800x600 screen area for the |
20 // primary monitor. Do the check now. | 23 // primary monitor. Do the check now. |
21 gfx::Rect primary_screen_area = PanelManager::GetInstance()-> | 24 gfx::Rect primary_screen_area = PanelManager::GetInstance()-> |
22 display_settings_provider()->GetPrimaryScreenArea(); | 25 display_settings_provider()->GetPrimaryScreenArea(); |
23 DCHECK(primary_screen_area.width() == 800); | 26 DCHECK(primary_screen_area.width() == 800); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 // Wait for all processing to finish. | 261 // Wait for all processing to finish. |
259 MessageLoopForUI::current()->RunAllPending(); | 262 MessageLoopForUI::current()->RunAllPending(); |
260 | 263 |
261 // We should not have squeezing any more; all panels should be at full width. | 264 // We should not have squeezing any more; all panels should be at full width. |
262 EXPECT_EQ(panel1->GetBounds().width(), panel1->GetRestoredBounds().width()); | 265 EXPECT_EQ(panel1->GetBounds().width(), panel1->GetRestoredBounds().width()); |
263 EXPECT_EQ(panel4->GetBounds().width(), panel4->GetRestoredBounds().width()); | 266 EXPECT_EQ(panel4->GetBounds().width(), panel4->GetRestoredBounds().width()); |
264 EXPECT_EQ(panel6->GetBounds().width(), panel6->GetRestoredBounds().width()); | 267 EXPECT_EQ(panel6->GetBounds().width(), panel6->GetRestoredBounds().width()); |
265 | 268 |
266 panel_manager->CloseAll(); | 269 panel_manager->CloseAll(); |
267 } | 270 } |
| 271 |
| 272 #endif // OS_WIN || OS_MACOSX |
OLD | NEW |