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

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

Issue 10066032: Enable user resizing for docked Panels (GTK and Mac). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/panels/detached_panel_strip.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 11 matching lines...) Expand all
22 22
23 EXPECT_EQ(2, panel_manager->num_panels()); 23 EXPECT_EQ(2, panel_manager->num_panels());
24 EXPECT_EQ(2, detached_strip->num_panels()); 24 EXPECT_EQ(2, detached_strip->num_panels());
25 25
26 EXPECT_TRUE(detached_strip->HasPanel(panel1)); 26 EXPECT_TRUE(detached_strip->HasPanel(panel1));
27 EXPECT_TRUE(detached_strip->HasPanel(panel2)); 27 EXPECT_TRUE(detached_strip->HasPanel(panel2));
28 28
29 EXPECT_TRUE(panel1->draggable()); 29 EXPECT_TRUE(panel1->draggable());
30 EXPECT_TRUE(panel2->draggable()); 30 EXPECT_TRUE(panel2->draggable());
31 31
32 EXPECT_TRUE(panel1->CanResizeByMouse()); 32 EXPECT_EQ(panel::RESIZABLE_ALL_SIDES, panel1->CanResizeByMouse());
33 EXPECT_TRUE(panel2->CanResizeByMouse()); 33 EXPECT_EQ(panel::RESIZABLE_ALL_SIDES, panel2->CanResizeByMouse());
34 34
35 Panel::AttentionMode expected_attention_mode = 35 Panel::AttentionMode expected_attention_mode =
36 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | 36 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION |
37 Panel::USE_SYSTEM_ATTENTION); 37 Panel::USE_SYSTEM_ATTENTION);
38 EXPECT_EQ(expected_attention_mode, panel1->attention_mode()); 38 EXPECT_EQ(expected_attention_mode, panel1->attention_mode());
39 EXPECT_EQ(expected_attention_mode, panel2->attention_mode()); 39 EXPECT_EQ(expected_attention_mode, panel2->attention_mode());
40 40
41 panel_manager->CloseAll(); 41 panel_manager->CloseAll();
42 } 42 }
43 43
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 EXPECT_FALSE(panel->IsActive()); 136 EXPECT_FALSE(panel->IsActive());
137 137
138 // Clicking on an inactive detached panel's titlebar activates it. 138 // Clicking on an inactive detached panel's titlebar activates it.
139 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin()); 139 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin());
140 test_panel->ReleaseMouseButtonTitlebar(); 140 test_panel->ReleaseMouseButtonTitlebar();
141 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE); 141 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE);
142 EXPECT_FALSE(panel->IsMinimized()); 142 EXPECT_FALSE(panel->IsMinimized());
143 143
144 panel_manager->CloseAll(); 144 panel_manager->CloseAll();
145 } 145 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/detached_panel_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698