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

Side by Side Diff: chrome/browser/ui/panels/detached_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/detached_panel_strip.h" 7 #include "chrome/browser/ui/panels/detached_panel_strip.h"
8 #include "chrome/browser/ui/panels/native_panel.h" 8 #include "chrome/browser/ui/panels/native_panel.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 11
12 // Refactor has only been done for Win and Mac panels so far.
13 #if defined(OS_WIN) || defined(OS_MACOSX)
14
15 class DetachedPanelBrowserTest : public BasePanelBrowserTest { 12 class DetachedPanelBrowserTest : public BasePanelBrowserTest {
16 }; 13 };
17 14
18 IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, CheckDetachedPanelProperties) { 15 IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, CheckDetachedPanelProperties) {
19 PanelManager* panel_manager = PanelManager::GetInstance(); 16 PanelManager* panel_manager = PanelManager::GetInstance();
20 DetachedPanelStrip* detached_strip = panel_manager->detached_strip(); 17 DetachedPanelStrip* detached_strip = panel_manager->detached_strip();
21 18
22 Panel* panel = CreateDetachedPanel("1", gfx::Rect(300, 200, 250, 200)); 19 Panel* panel = CreateDetachedPanel("1", gfx::Rect(300, 200, 250, 200));
23 scoped_ptr<NativePanelTesting> panel_testing( 20 scoped_ptr<NativePanelTesting> panel_testing(
24 CreateNativePanelTesting(panel)); 21 CreateNativePanelTesting(panel));
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 WaitForPanelActiveState(panel, SHOW_AS_INACTIVE); 135 WaitForPanelActiveState(panel, SHOW_AS_INACTIVE);
139 136
140 // Clicking on an inactive detached panel's titlebar activates it. 137 // Clicking on an inactive detached panel's titlebar activates it.
141 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin()); 138 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin());
142 test_panel->ReleaseMouseButtonTitlebar(); 139 test_panel->ReleaseMouseButtonTitlebar();
143 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE); 140 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE);
144 EXPECT_FALSE(panel->IsMinimized()); 141 EXPECT_FALSE(panel->IsMinimized());
145 142
146 panel_manager->CloseAll(); 143 panel_manager->CloseAll();
147 } 144 }
148
149 #endif // OS_WIN || OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_window_util.cc ('k') | chrome/browser/ui/panels/docked_panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698