Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/browser/ui/panels/docked_panel_browsertest.cc

Issue 10831226: Panels refactor: Support browserless panels on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove static initializer Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
17 class DockedPanelBrowserTest : public BasePanelBrowserTest { 14 class DockedPanelBrowserTest : public BasePanelBrowserTest {
18 public: 15 public:
19 virtual void SetUpOnMainThread() OVERRIDE { 16 virtual void SetUpOnMainThread() OVERRIDE {
20 BasePanelBrowserTest::SetUpOnMainThread(); 17 BasePanelBrowserTest::SetUpOnMainThread();
21 18
22 // All the tests here assume using mocked 800x600 screen area for the 19 // All the tests here assume using mocked 800x600 screen area for the
23 // primary monitor. Do the check now. 20 // primary monitor. Do the check now.
24 gfx::Rect primary_screen_area = PanelManager::GetInstance()-> 21 gfx::Rect primary_screen_area = PanelManager::GetInstance()->
25 display_settings_provider()->GetPrimaryScreenArea(); 22 display_settings_provider()->GetPrimaryScreenArea();
26 DCHECK(primary_screen_area.width() == 800); 23 DCHECK(primary_screen_area.width() == 800);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // Wait for all processing to finish. 258 // Wait for all processing to finish.
262 MessageLoopForUI::current()->RunAllPending(); 259 MessageLoopForUI::current()->RunAllPending();
263 260
264 // We should not have squeezing any more; all panels should be at full width. 261 // We should not have squeezing any more; all panels should be at full width.
265 EXPECT_EQ(panel1->GetBounds().width(), panel1->GetRestoredBounds().width()); 262 EXPECT_EQ(panel1->GetBounds().width(), panel1->GetRestoredBounds().width());
266 EXPECT_EQ(panel4->GetBounds().width(), panel4->GetRestoredBounds().width()); 263 EXPECT_EQ(panel4->GetBounds().width(), panel4->GetRestoredBounds().width());
267 EXPECT_EQ(panel6->GetBounds().width(), panel6->GetRestoredBounds().width()); 264 EXPECT_EQ(panel6->GetBounds().width(), panel6->GetRestoredBounds().width());
268 265
269 panel_manager->CloseAll(); 266 panel_manager->CloseAll();
270 } 267 }
271
272 #endif // OS_WIN || OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/detached_panel_browsertest.cc ('k') | chrome/browser/ui/panels/panel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698