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

Side by Side Diff: ash/shelf/shelf_widget_unittest.cc

Issue 2692663002: Gut ash::MaterialDesignController, and remove the about:flags entry. (Closed)
Patch Set: yet another rebase Created 3 years, 10 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
« no previous file with comments | « ash/screen_util_unittest.cc ('k') | ash/shell/content/client/shell_browser_main_parts.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ash/common/shelf/shelf_widget.h" 5 #include "ash/common/shelf/shelf_widget.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/shelf/shelf_constants.h" 7 #include "ash/common/shelf/shelf_constants.h"
9 #include "ash/common/shelf/shelf_layout_manager.h" 8 #include "ash/common/shelf/shelf_layout_manager.h"
10 #include "ash/common/shelf/shelf_view.h" 9 #include "ash/common/shelf/shelf_view.h"
11 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
12 #include "ash/common/system/status_area_widget.h" 11 #include "ash/common/system/status_area_widget.h"
13 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
14 #include "ash/common/wm_window.h" 13 #include "ash/common/wm_window.h"
15 #include "ash/root_window_controller.h" 14 #include "ash/root_window_controller.h"
16 #include "ash/shell.h" 15 #include "ash/shell.h"
17 #include "ash/test/ash_md_test_base.h" 16 #include "ash/test/ash_test_base.h"
18 #include "ash/test/ash_test_helper.h" 17 #include "ash/test/ash_test_helper.h"
19 #include "ash/test/shelf_view_test_api.h" 18 #include "ash/test/shelf_view_test_api.h"
20 #include "ash/wm/window_util.h" 19 #include "ash/wm/window_util.h"
21 #include "ui/aura/window_event_dispatcher.h" 20 #include "ui/aura/window_event_dispatcher.h"
22 #include "ui/display/display.h" 21 #include "ui/display/display.h"
23 #include "ui/events/event_utils.h" 22 #include "ui/events/event_utils.h"
24 #include "ui/views/view.h" 23 #include "ui/views/view.h"
25 #include "ui/views/widget/widget.h" 24 #include "ui/views/widget/widget.h"
26 25
27 namespace ash { 26 namespace ash {
28 27
29 namespace { 28 namespace {
30 29
31 ShelfWidget* GetShelfWidget() { 30 ShelfWidget* GetShelfWidget() {
32 return test::AshTestBase::GetPrimaryShelf()->shelf_widget(); 31 return test::AshTestBase::GetPrimaryShelf()->shelf_widget();
33 } 32 }
34 33
35 ShelfLayoutManager* GetShelfLayoutManager() { 34 ShelfLayoutManager* GetShelfLayoutManager() {
36 return GetShelfWidget()->shelf_layout_manager(); 35 return GetShelfWidget()->shelf_layout_manager();
37 } 36 }
38 37
39 } // namespace 38 } // namespace
40 39
41 using ShelfWidgetTest = test::AshMDTestBase; 40 using ShelfWidgetTest = test::AshTestBase;
42
43 INSTANTIATE_TEST_CASE_P(
44 /* prefix intentionally left blank due to only one parameterization */,
45 ShelfWidgetTest,
46 testing::Values(MaterialDesignController::NON_MATERIAL,
47 MaterialDesignController::MATERIAL_NORMAL,
48 MaterialDesignController::MATERIAL_EXPERIMENTAL));
49 41
50 void TestLauncherAlignment(WmWindow* root, 42 void TestLauncherAlignment(WmWindow* root,
51 ShelfAlignment alignment, 43 ShelfAlignment alignment,
52 const gfx::Rect& expected) { 44 const gfx::Rect& expected) {
53 root->GetRootWindowController()->GetShelf()->SetAlignment(alignment); 45 root->GetRootWindowController()->GetShelf()->SetAlignment(alignment);
54 EXPECT_EQ(expected.ToString(), 46 EXPECT_EQ(expected.ToString(),
55 root->GetDisplayNearestWindow().work_area().ToString()); 47 root->GetDisplayNearestWindow().work_area().ToString());
56 } 48 }
57 49
58 TEST_P(ShelfWidgetTest, TestAlignment) { 50 TEST_F(ShelfWidgetTest, TestAlignment) {
59 // Note that for a left- and right-aligned shelf, this offset must be
60 // applied to a maximized window's width rather than its height.
61 const int offset = GetMdMaximizedWindowHeightOffset();
62 const int kShelfSize = GetShelfConstant(SHELF_SIZE); 51 const int kShelfSize = GetShelfConstant(SHELF_SIZE);
63 UpdateDisplay("400x400"); 52 UpdateDisplay("400x400");
64 { 53 {
65 SCOPED_TRACE("Single Bottom"); 54 SCOPED_TRACE("Single Bottom");
66 TestLauncherAlignment(WmShell::Get()->GetPrimaryRootWindow(), 55 TestLauncherAlignment(WmShell::Get()->GetPrimaryRootWindow(),
67 SHELF_ALIGNMENT_BOTTOM, 56 SHELF_ALIGNMENT_BOTTOM, gfx::Rect(0, 0, 400, 352));
68 gfx::Rect(0, 0, 400, 353 + offset));
69 } 57 }
70 { 58 {
71 SCOPED_TRACE("Single Locked"); 59 SCOPED_TRACE("Single Locked");
72 TestLauncherAlignment(WmShell::Get()->GetPrimaryRootWindow(), 60 TestLauncherAlignment(WmShell::Get()->GetPrimaryRootWindow(),
73 SHELF_ALIGNMENT_BOTTOM_LOCKED, 61 SHELF_ALIGNMENT_BOTTOM_LOCKED,
74 gfx::Rect(0, 0, 400, 353 + offset)); 62 gfx::Rect(0, 0, 400, 352));
75 } 63 }
76 { 64 {
77 SCOPED_TRACE("Single Right"); 65 SCOPED_TRACE("Single Right");
78 TestLauncherAlignment(WmShell::Get()->GetPrimaryRootWindow(), 66 TestLauncherAlignment(WmShell::Get()->GetPrimaryRootWindow(),
79 SHELF_ALIGNMENT_RIGHT, 67 SHELF_ALIGNMENT_RIGHT, gfx::Rect(0, 0, 352, 400));
80 gfx::Rect(0, 0, 353 + offset, 400));
81 } 68 }
82 { 69 {
83 SCOPED_TRACE("Single Left"); 70 SCOPED_TRACE("Single Left");
84 TestLauncherAlignment(WmShell::Get()->GetPrimaryRootWindow(), 71 TestLauncherAlignment(WmShell::Get()->GetPrimaryRootWindow(),
85 SHELF_ALIGNMENT_LEFT, 72 SHELF_ALIGNMENT_LEFT,
86 gfx::Rect(kShelfSize, 0, 353 + offset, 400)); 73 gfx::Rect(kShelfSize, 0, 352, 400));
87 } 74 }
88 } 75 }
89 76
90 TEST_P(ShelfWidgetTest, TestAlignmentForMultipleDisplays) { 77 TEST_F(ShelfWidgetTest, TestAlignmentForMultipleDisplays) {
91 // Note that for a left- and right-aligned shelf, this offset must be
92 // applied to a maximized window's width rather than its height.
93 const int offset = GetMdMaximizedWindowHeightOffset();
94 const int kShelfSize = GetShelfConstant(SHELF_SIZE); 78 const int kShelfSize = GetShelfConstant(SHELF_SIZE);
95 UpdateDisplay("300x300,500x500"); 79 UpdateDisplay("300x300,500x500");
96 std::vector<WmWindow*> root_windows = WmShell::Get()->GetAllRootWindows(); 80 std::vector<WmWindow*> root_windows = WmShell::Get()->GetAllRootWindows();
97 { 81 {
98 SCOPED_TRACE("Primary Bottom"); 82 SCOPED_TRACE("Primary Bottom");
99 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM, 83 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM,
100 gfx::Rect(0, 0, 300, 253 + offset)); 84 gfx::Rect(0, 0, 300, 252));
101 } 85 }
102 { 86 {
103 SCOPED_TRACE("Primary Locked"); 87 SCOPED_TRACE("Primary Locked");
104 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM_LOCKED, 88 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM_LOCKED,
105 gfx::Rect(0, 0, 300, 253 + offset)); 89 gfx::Rect(0, 0, 300, 252));
106 } 90 }
107 { 91 {
108 SCOPED_TRACE("Primary Right"); 92 SCOPED_TRACE("Primary Right");
109 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_RIGHT, 93 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_RIGHT,
110 gfx::Rect(0, 0, 253 + offset, 300)); 94 gfx::Rect(0, 0, 252, 300));
111 } 95 }
112 { 96 {
113 SCOPED_TRACE("Primary Left"); 97 SCOPED_TRACE("Primary Left");
114 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_LEFT, 98 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_LEFT,
115 gfx::Rect(kShelfSize, 0, 253 + offset, 300)); 99 gfx::Rect(kShelfSize, 0, 252, 300));
116 } 100 }
117 { 101 {
118 SCOPED_TRACE("Secondary Bottom"); 102 SCOPED_TRACE("Secondary Bottom");
119 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM, 103 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM,
120 gfx::Rect(300, 0, 500, 453 + offset)); 104 gfx::Rect(300, 0, 500, 452));
121 } 105 }
122 { 106 {
123 SCOPED_TRACE("Secondary Locked"); 107 SCOPED_TRACE("Secondary Locked");
124 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM_LOCKED, 108 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM_LOCKED,
125 gfx::Rect(300, 0, 500, 453 + offset)); 109 gfx::Rect(300, 0, 500, 452));
126 } 110 }
127 { 111 {
128 SCOPED_TRACE("Secondary Right"); 112 SCOPED_TRACE("Secondary Right");
129 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_RIGHT, 113 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_RIGHT,
130 gfx::Rect(300, 0, 453 + offset, 500)); 114 gfx::Rect(300, 0, 452, 500));
131 } 115 }
132 { 116 {
133 SCOPED_TRACE("Secondary Left"); 117 SCOPED_TRACE("Secondary Left");
134 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_LEFT, 118 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_LEFT,
135 gfx::Rect(300 + kShelfSize, 0, 453 + offset, 500)); 119 gfx::Rect(300 + kShelfSize, 0, 452, 500));
136 } 120 }
137 } 121 }
138 122
139 // Makes sure the shelf is initially sized correctly. 123 // Makes sure the shelf is initially sized correctly.
140 TEST_P(ShelfWidgetTest, LauncherInitiallySized) { 124 TEST_F(ShelfWidgetTest, LauncherInitiallySized) {
141 ShelfWidget* shelf_widget = GetShelfWidget(); 125 ShelfWidget* shelf_widget = GetShelfWidget();
142 ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManager(); 126 ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManager();
143 ASSERT_TRUE(shelf_layout_manager); 127 ASSERT_TRUE(shelf_layout_manager);
144 ASSERT_TRUE(shelf_widget->status_area_widget()); 128 ASSERT_TRUE(shelf_widget->status_area_widget());
145 int status_width = 129 int status_width =
146 shelf_widget->status_area_widget()->GetWindowBoundsInScreen().width(); 130 shelf_widget->status_area_widget()->GetWindowBoundsInScreen().width();
147 // Test only makes sense if the status is > 0, which it better be. 131 // Test only makes sense if the status is > 0, which it better be.
148 EXPECT_GT(status_width, 0); 132 EXPECT_GT(status_width, 0);
149 EXPECT_EQ(status_width, 133 EXPECT_EQ(status_width,
150 shelf_widget->GetContentsView()->width() - 134 shelf_widget->GetContentsView()->width() -
151 GetPrimaryShelf()->GetShelfViewForTesting()->width()); 135 GetPrimaryShelf()->GetShelfViewForTesting()->width());
152 } 136 }
153 137
154 // Verifies when the shell is deleted with a full screen window we don't crash. 138 // Verifies when the shell is deleted with a full screen window we don't crash.
155 TEST_P(ShelfWidgetTest, DontReferenceShelfAfterDeletion) { 139 TEST_F(ShelfWidgetTest, DontReferenceShelfAfterDeletion) {
156 views::Widget* widget = new views::Widget; 140 views::Widget* widget = new views::Widget;
157 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); 141 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
158 params.bounds = gfx::Rect(0, 0, 200, 200); 142 params.bounds = gfx::Rect(0, 0, 200, 200);
159 params.context = CurrentContext(); 143 params.context = CurrentContext();
160 // Widget is now owned by the parent window. 144 // Widget is now owned by the parent window.
161 widget->Init(params); 145 widget->Init(params);
162 widget->SetFullscreen(true); 146 widget->SetFullscreen(true);
163 } 147 }
164 148
165 // Verifies shelf is created with correct size after user login and when its 149 // Verifies shelf is created with correct size after user login and when its
166 // container and status widget has finished sizing. 150 // container and status widget has finished sizing.
167 // See http://crbug.com/252533 151 // See http://crbug.com/252533
168 TEST_P(ShelfWidgetTest, ShelfInitiallySizedAfterLogin) { 152 TEST_F(ShelfWidgetTest, ShelfInitiallySizedAfterLogin) {
169 SetUserLoggedIn(false); 153 SetUserLoggedIn(false);
170 UpdateDisplay("300x200,400x300"); 154 UpdateDisplay("300x200,400x300");
171 155
172 // Both displays have a shelf controller. 156 // Both displays have a shelf controller.
173 std::vector<WmWindow*> roots = WmShell::Get()->GetAllRootWindows(); 157 std::vector<WmWindow*> roots = WmShell::Get()->GetAllRootWindows();
174 WmShelf* shelf1 = WmShelf::ForWindow(roots[0]); 158 WmShelf* shelf1 = WmShelf::ForWindow(roots[0]);
175 WmShelf* shelf2 = WmShelf::ForWindow(roots[1]); 159 WmShelf* shelf2 = WmShelf::ForWindow(roots[1]);
176 ASSERT_TRUE(shelf1); 160 ASSERT_TRUE(shelf1);
177 ASSERT_TRUE(shelf2); 161 ASSERT_TRUE(shelf2);
178 162
(...skipping 16 matching lines...) Expand all
195 179
196 const int status_width2 = 180 const int status_width2 =
197 shelf_widget2->status_area_widget()->GetWindowBoundsInScreen().width(); 181 shelf_widget2->status_area_widget()->GetWindowBoundsInScreen().width();
198 EXPECT_GT(status_width2, 0); 182 EXPECT_GT(status_width2, 0);
199 EXPECT_EQ(shelf_widget2->GetContentsView()->width(), 183 EXPECT_EQ(shelf_widget2->GetContentsView()->width(),
200 shelf2->GetShelfViewForTesting()->width() + status_width2); 184 shelf2->GetShelfViewForTesting()->width() + status_width2);
201 } 185 }
202 186
203 // Tests that the shelf lets mouse-events close to the edge fall through to the 187 // Tests that the shelf lets mouse-events close to the edge fall through to the
204 // window underneath. 188 // window underneath.
205 TEST_P(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) { 189 TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) {
206 UpdateDisplay("400x400"); 190 UpdateDisplay("400x400");
207 ShelfWidget* shelf_widget = GetShelfWidget(); 191 ShelfWidget* shelf_widget = GetShelfWidget();
208 gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen(); 192 gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen();
209 193
210 EXPECT_TRUE(!shelf_bounds.IsEmpty()); 194 EXPECT_TRUE(!shelf_bounds.IsEmpty());
211 ShelfLayoutManager* shelf_layout_manager = 195 ShelfLayoutManager* shelf_layout_manager =
212 shelf_widget->shelf_layout_manager(); 196 shelf_widget->shelf_layout_manager();
213 ASSERT_TRUE(shelf_layout_manager); 197 ASSERT_TRUE(shelf_layout_manager);
214 EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state()); 198 EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state());
215 199
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 gfx::Point event_location(widget_bounds.x() + 5, shelf_bounds.y() + 1); 264 gfx::Point event_location(widget_bounds.x() + 5, shelf_bounds.y() + 1);
281 ui::MouseEvent mouse(ui::ET_MOUSE_MOVED, event_location, event_location, 265 ui::MouseEvent mouse(ui::ET_MOUSE_MOVED, event_location, event_location,
282 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE); 266 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
283 ui::EventTarget* target = targeter->FindTargetForEvent(root, &mouse); 267 ui::EventTarget* target = targeter->FindTargetForEvent(root, &mouse);
284 EXPECT_EQ(shelf_widget->GetNativeWindow(), target); 268 EXPECT_EQ(shelf_widget->GetNativeWindow(), target);
285 } 269 }
286 } 270 }
287 271
288 // Tests that the shelf has a slightly larger hit-region for touch-events when 272 // Tests that the shelf has a slightly larger hit-region for touch-events when
289 // it's in the auto-hidden state. 273 // it's in the auto-hidden state.
290 TEST_P(ShelfWidgetTest, HiddenShelfHitTestTouch) { 274 TEST_F(ShelfWidgetTest, HiddenShelfHitTestTouch) {
291 WmShelf* shelf = GetPrimaryShelf(); 275 WmShelf* shelf = GetPrimaryShelf();
292 ShelfWidget* shelf_widget = GetShelfWidget(); 276 ShelfWidget* shelf_widget = GetShelfWidget();
293 gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen(); 277 gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen();
294 EXPECT_TRUE(!shelf_bounds.IsEmpty()); 278 EXPECT_TRUE(!shelf_bounds.IsEmpty());
295 ShelfLayoutManager* shelf_layout_manager = 279 ShelfLayoutManager* shelf_layout_manager =
296 shelf_widget->shelf_layout_manager(); 280 shelf_widget->shelf_layout_manager();
297 ASSERT_TRUE(shelf_layout_manager); 281 ASSERT_TRUE(shelf_layout_manager);
298 EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state()); 282 EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state());
299 283
300 // Create a widget to make sure that the shelf does auto-hide. 284 // Create a widget to make sure that the shelf does auto-hide.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 EXPECT_EQ(expected_shelf_auto_hide_state, 377 EXPECT_EQ(expected_shelf_auto_hide_state,
394 shelf_layout_manager->auto_hide_state()); 378 shelf_layout_manager->auto_hide_state());
395 } 379 }
396 380
397 private: 381 private:
398 DISALLOW_COPY_AND_ASSIGN(ShelfWidgetTestWithInitializer); 382 DISALLOW_COPY_AND_ASSIGN(ShelfWidgetTestWithInitializer);
399 }; 383 };
400 384
401 } // namespace 385 } // namespace
402 386
403 INSTANTIATE_TEST_CASE_P( 387 TEST_F(ShelfWidgetTestWithInitializer, CreateAutoHideAlwaysShelf) {
404 /* prefix intentionally left blank due to only one parameterization */,
405 ShelfWidgetTestWithInitializer,
406 testing::Values(MaterialDesignController::NON_MATERIAL,
407 MaterialDesignController::MATERIAL_NORMAL,
408 MaterialDesignController::MATERIAL_EXPERIMENTAL));
409
410 TEST_P(ShelfWidgetTestWithInitializer, CreateAutoHideAlwaysShelf) {
411 // The actual auto hide state is shown because there are no open windows. 388 // The actual auto hide state is shown because there are no open windows.
412 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM, 389 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM,
413 SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 390 SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
414 SHELF_AUTO_HIDE, SHELF_AUTO_HIDE_SHOWN); 391 SHELF_AUTO_HIDE, SHELF_AUTO_HIDE_SHOWN);
415 } 392 }
416 393
417 TEST_P(ShelfWidgetTestWithInitializer, CreateAutoHideNeverShelf) { 394 TEST_F(ShelfWidgetTestWithInitializer, CreateAutoHideNeverShelf) {
418 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 395 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
419 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_LEFT, 396 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_LEFT,
420 SHELF_AUTO_HIDE_BEHAVIOR_NEVER, 397 SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
421 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); 398 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
422 } 399 }
423 400
424 TEST_P(ShelfWidgetTestWithInitializer, CreateAutoHideAlwaysHideShelf) { 401 TEST_F(ShelfWidgetTestWithInitializer, CreateAutoHideAlwaysHideShelf) {
425 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 402 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
426 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_RIGHT, 403 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_RIGHT,
427 SHELF_AUTO_HIDE_ALWAYS_HIDDEN, SHELF_HIDDEN, 404 SHELF_AUTO_HIDE_ALWAYS_HIDDEN, SHELF_HIDDEN,
428 SHELF_AUTO_HIDE_HIDDEN); 405 SHELF_AUTO_HIDE_HIDDEN);
429 } 406 }
430 407
431 TEST_P(ShelfWidgetTestWithInitializer, CreateLockedShelf) { 408 TEST_F(ShelfWidgetTestWithInitializer, CreateLockedShelf) {
432 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 409 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
433 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM_LOCKED, 410 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM_LOCKED,
434 SHELF_AUTO_HIDE_BEHAVIOR_NEVER, 411 SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
435 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); 412 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
436 } 413 }
437 414
438 } // namespace ash 415 } // namespace ash
OLDNEW
« no previous file with comments | « ash/screen_util_unittest.cc ('k') | ash/shell/content/client/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698