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

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

Issue 2067223003: Parameterize Ash unittests to pass with material design enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing Created 4 years, 6 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/test/ash_md_test_base.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) 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/shelf/shelf_widget.h" 5 #include "ash/shelf/shelf_widget.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h"
7 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf.h" 9 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_delegate.h" 10 #include "ash/shelf/shelf_delegate.h"
10 #include "ash/shelf/shelf_layout_manager.h" 11 #include "ash/shelf/shelf_layout_manager.h"
11 #include "ash/shelf/shelf_view.h" 12 #include "ash/shelf/shelf_view.h"
12 #include "ash/shell.h" 13 #include "ash/shell.h"
13 #include "ash/test/ash_test_base.h" 14 #include "ash/test/ash_md_test_base.h"
14 #include "ash/test/ash_test_helper.h" 15 #include "ash/test/ash_test_helper.h"
15 #include "ash/test/shelf_test_api.h" 16 #include "ash/test/shelf_test_api.h"
16 #include "ash/test/shelf_view_test_api.h" 17 #include "ash/test/shelf_view_test_api.h"
17 #include "ash/test/test_shell_delegate.h" 18 #include "ash/test/test_shell_delegate.h"
18 #include "ash/wm/window_util.h" 19 #include "ash/wm/window_util.h"
19 #include "ui/aura/window_event_dispatcher.h" 20 #include "ui/aura/window_event_dispatcher.h"
20 #include "ui/display/display.h" 21 #include "ui/display/display.h"
21 #include "ui/display/screen.h" 22 #include "ui/display/screen.h"
22 #include "ui/events/event_utils.h" 23 #include "ui/events/event_utils.h"
23 #include "ui/views/view.h" 24 #include "ui/views/view.h"
24 #include "ui/views/widget/widget.h" 25 #include "ui/views/widget/widget.h"
25 26
26 namespace ash { 27 namespace ash {
27 28
28 namespace { 29 namespace {
29 30
30 ShelfWidget* GetShelfWidget() { 31 ShelfWidget* GetShelfWidget() {
31 return Shelf::ForPrimaryDisplay()->shelf_widget(); 32 return Shelf::ForPrimaryDisplay()->shelf_widget();
32 } 33 }
33 34
34 ShelfLayoutManager* GetShelfLayoutManager() { 35 ShelfLayoutManager* GetShelfLayoutManager() {
35 return GetShelfWidget()->shelf_layout_manager(); 36 return GetShelfWidget()->shelf_layout_manager();
36 } 37 }
37 38
38 } // namespace 39 } // namespace
39 40
40 typedef test::AshTestBase ShelfWidgetTest; 41 using ShelfWidgetTest = test::AshMDTestBase;
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));
41 49
42 void TestLauncherAlignment(aura::Window* root, 50 void TestLauncherAlignment(aura::Window* root,
43 ShelfAlignment alignment, 51 ShelfAlignment alignment,
44 const std::string& expected) { 52 const std::string& expected) {
45 Shelf::ForWindow(root)->SetAlignment(alignment); 53 Shelf::ForWindow(root)->SetAlignment(alignment);
46 display::Screen* screen = display::Screen::GetScreen(); 54 display::Screen* screen = display::Screen::GetScreen();
47 EXPECT_EQ(expected, 55 EXPECT_EQ(expected,
48 screen->GetDisplayNearestWindow(root).work_area().ToString()); 56 screen->GetDisplayNearestWindow(root).work_area().ToString());
49 } 57 }
50 58
51 #if defined(OS_WIN) && !defined(USE_ASH)
52 // TODO(msw): Broken on Windows. http://crbug.com/584038 59 // TODO(msw): Broken on Windows. http://crbug.com/584038
53 #define MAYBE_TestAlignment DISABLED_TestAlignment 60 #if defined(OS_CHROMEOS)
54 #else 61 TEST_P(ShelfWidgetTest, TestAlignment) {
55 #define MAYBE_TestAlignment TestAlignment 62 // Note that for a left- and right-aligned shelf, this offset must be
56 #endif 63 // applied to a maximized window's width rather than its height.
57 TEST_F(ShelfWidgetTest, MAYBE_TestAlignment) { 64 const int offset = GetMdMaximizedWindowHeightOffset();
65 const int kShelfSize = GetShelfConstant(SHELF_SIZE);
58 UpdateDisplay("400x400"); 66 UpdateDisplay("400x400");
59 { 67 {
60 SCOPED_TRACE("Single Bottom"); 68 SCOPED_TRACE("Single Bottom");
61 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_BOTTOM, 69 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_BOTTOM,
62 "0,0 400x353"); 70 gfx::Rect(0, 0, 400, 353 + offset).ToString());
63 } 71 }
64 { 72 {
65 SCOPED_TRACE("Single Locked"); 73 SCOPED_TRACE("Single Locked");
66 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), 74 TestLauncherAlignment(Shell::GetPrimaryRootWindow(),
67 SHELF_ALIGNMENT_BOTTOM_LOCKED, "0,0 400x353"); 75 SHELF_ALIGNMENT_BOTTOM_LOCKED,
76 gfx::Rect(0, 0, 400, 353 + offset).ToString());
68 } 77 }
69 { 78 {
70 SCOPED_TRACE("Single Right"); 79 SCOPED_TRACE("Single Right");
71 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_RIGHT, 80 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_RIGHT,
72 "0,0 353x400"); 81 gfx::Rect(0, 0, 353 + offset, 400).ToString());
73 } 82 }
74 { 83 {
75 SCOPED_TRACE("Single Left"); 84 SCOPED_TRACE("Single Left");
76 TestLauncherAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_LEFT, 85 TestLauncherAlignment(
77 "47,0 353x400"); 86 Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_LEFT,
87 gfx::Rect(kShelfSize, 0, 353 + offset, 400).ToString());
78 } 88 }
79 if (!SupportsMultipleDisplays()) 89 if (!SupportsMultipleDisplays())
80 return; 90 return;
81 91
82 UpdateDisplay("300x300,500x500"); 92 UpdateDisplay("300x300,500x500");
83 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 93 aura::Window::Windows root_windows = Shell::GetAllRootWindows();
84 { 94 {
85 SCOPED_TRACE("Primary Bottom"); 95 SCOPED_TRACE("Primary Bottom");
86 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM, 96 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM,
87 "0,0 300x253"); 97 gfx::Rect(0, 0, 300, 253 + offset).ToString());
88 } 98 }
89 { 99 {
90 SCOPED_TRACE("Primary Locked"); 100 SCOPED_TRACE("Primary Locked");
91 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM_LOCKED, 101 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM_LOCKED,
92 "0,0 300x253"); 102 gfx::Rect(0, 0, 300, 253 + offset).ToString());
93 } 103 }
94 { 104 {
95 SCOPED_TRACE("Primary Right"); 105 SCOPED_TRACE("Primary Right");
96 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_RIGHT, 106 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_RIGHT,
97 "0,0 253x300"); 107 gfx::Rect(0, 0, 253 + offset, 300).ToString());
98 } 108 }
99 { 109 {
100 SCOPED_TRACE("Primary Left"); 110 SCOPED_TRACE("Primary Left");
101 TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_LEFT, 111 TestLauncherAlignment(
102 "47,0 253x300"); 112 root_windows[0], SHELF_ALIGNMENT_LEFT,
113 gfx::Rect(kShelfSize, 0, 253 + offset, 300).ToString());
103 } 114 }
104 { 115 {
105 SCOPED_TRACE("Secondary Bottom"); 116 SCOPED_TRACE("Secondary Bottom");
106 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM, 117 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM,
107 "300,0 500x453"); 118 gfx::Rect(300, 0, 500, 453 + offset).ToString());
108 } 119 }
109 { 120 {
110 SCOPED_TRACE("Secondary Locked"); 121 SCOPED_TRACE("Secondary Locked");
111 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM_LOCKED, 122 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM_LOCKED,
112 "300,0 500x453"); 123 gfx::Rect(300, 0, 500, 453 + offset).ToString());
113 } 124 }
114 { 125 {
115 SCOPED_TRACE("Secondary Right"); 126 SCOPED_TRACE("Secondary Right");
116 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_RIGHT, 127 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_RIGHT,
117 "300,0 453x500"); 128 gfx::Rect(300, 0, 453 + offset, 500).ToString());
118 } 129 }
119 { 130 {
120 SCOPED_TRACE("Secondary Left"); 131 SCOPED_TRACE("Secondary Left");
121 TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_LEFT, 132 TestLauncherAlignment(
122 "347,0 453x500"); 133 root_windows[1], SHELF_ALIGNMENT_LEFT,
134 gfx::Rect(300 + kShelfSize, 0, 453 + offset, 500).ToString());
123 } 135 }
124 } 136 }
137 #endif // defined(OS_CHROMEOS)
125 138
126 // Makes sure the shelf is initially sized correctly. 139 // Makes sure the shelf is initially sized correctly.
127 TEST_F(ShelfWidgetTest, LauncherInitiallySized) { 140 TEST_P(ShelfWidgetTest, LauncherInitiallySized) {
128 ShelfWidget* shelf_widget = GetShelfWidget(); 141 ShelfWidget* shelf_widget = GetShelfWidget();
129 Shelf* shelf = shelf_widget->shelf(); 142 Shelf* shelf = shelf_widget->shelf();
130 ASSERT_TRUE(shelf); 143 ASSERT_TRUE(shelf);
131 ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManager(); 144 ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManager();
132 ASSERT_TRUE(shelf_layout_manager); 145 ASSERT_TRUE(shelf_layout_manager);
133 ASSERT_TRUE(shelf_widget->status_area_widget()); 146 ASSERT_TRUE(shelf_widget->status_area_widget());
134 int status_width = shelf_widget->status_area_widget()-> 147 int status_width = shelf_widget->status_area_widget()->
135 GetWindowBoundsInScreen().width(); 148 GetWindowBoundsInScreen().width();
136 // Test only makes sense if the status is > 0, which it better be. 149 // Test only makes sense if the status is > 0, which it better be.
137 EXPECT_GT(status_width, 0); 150 EXPECT_GT(status_width, 0);
138 EXPECT_EQ(status_width, shelf_widget->GetContentsView()->width() - 151 EXPECT_EQ(status_width, shelf_widget->GetContentsView()->width() -
139 test::ShelfTestAPI(shelf).shelf_view()->width()); 152 test::ShelfTestAPI(shelf).shelf_view()->width());
140 } 153 }
141 154
142 // Verifies when the shell is deleted with a full screen window we don't crash. 155 // Verifies when the shell is deleted with a full screen window we don't crash.
143 TEST_F(ShelfWidgetTest, DontReferenceShelfAfterDeletion) { 156 TEST_P(ShelfWidgetTest, DontReferenceShelfAfterDeletion) {
144 views::Widget* widget = new views::Widget; 157 views::Widget* widget = new views::Widget;
145 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); 158 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
146 params.bounds = gfx::Rect(0, 0, 200, 200); 159 params.bounds = gfx::Rect(0, 0, 200, 200);
147 params.context = CurrentContext(); 160 params.context = CurrentContext();
148 // Widget is now owned by the parent window. 161 // Widget is now owned by the parent window.
149 widget->Init(params); 162 widget->Init(params);
150 widget->SetFullscreen(true); 163 widget->SetFullscreen(true);
151 } 164 }
152 165
153 #if defined(OS_CHROMEOS) 166 #if defined(OS_CHROMEOS)
154 // Verifies shelf is created with correct size after user login and when its 167 // Verifies shelf is created with correct size after user login and when its
155 // container and status widget has finished sizing. 168 // container and status widget has finished sizing.
156 // See http://crbug.com/252533 169 // See http://crbug.com/252533
157 TEST_F(ShelfWidgetTest, ShelfInitiallySizedAfterLogin) { 170 TEST_P(ShelfWidgetTest, ShelfInitiallySizedAfterLogin) {
158 SetUserLoggedIn(false); 171 SetUserLoggedIn(false);
159 UpdateDisplay("300x200,400x300"); 172 UpdateDisplay("300x200,400x300");
160 173
161 ShelfWidget* shelf_widget = NULL; 174 ShelfWidget* shelf_widget = NULL;
162 Shell::RootWindowControllerList controllers( 175 Shell::RootWindowControllerList controllers(
163 Shell::GetAllRootWindowControllers()); 176 Shell::GetAllRootWindowControllers());
164 for (Shell::RootWindowControllerList::const_iterator i = controllers.begin(); 177 for (Shell::RootWindowControllerList::const_iterator i = controllers.begin();
165 i != controllers.end(); 178 i != controllers.end();
166 ++i) { 179 ++i) {
167 if (!(*i)->shelf_widget()->shelf()) { 180 if (!(*i)->shelf_widget()->shelf()) {
(...skipping 13 matching lines...) Expand all
181 shelf_widget->status_area_widget()->GetWindowBoundsInScreen().width(); 194 shelf_widget->status_area_widget()->GetWindowBoundsInScreen().width();
182 EXPECT_GT(status_width, 0); 195 EXPECT_GT(status_width, 0);
183 EXPECT_EQ(status_width, 196 EXPECT_EQ(status_width,
184 shelf_widget->GetContentsView()->width() - 197 shelf_widget->GetContentsView()->width() -
185 test::ShelfTestAPI(shelf).shelf_view()->width()); 198 test::ShelfTestAPI(shelf).shelf_view()->width());
186 } 199 }
187 #endif // defined(OS_CHROMEOS) 200 #endif // defined(OS_CHROMEOS)
188 201
189 // Tests that the shelf lets mouse-events close to the edge fall through to the 202 // Tests that the shelf lets mouse-events close to the edge fall through to the
190 // window underneath. 203 // window underneath.
191 TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) { 204 TEST_P(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) {
205 if (!SupportsHostWindowResize())
206 return;
207
208 UpdateDisplay("400x400");
192 ShelfWidget* shelf_widget = GetShelfWidget(); 209 ShelfWidget* shelf_widget = GetShelfWidget();
193 gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen(); 210 gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen();
211
194 EXPECT_TRUE(!shelf_bounds.IsEmpty()); 212 EXPECT_TRUE(!shelf_bounds.IsEmpty());
195 ShelfLayoutManager* shelf_layout_manager = 213 ShelfLayoutManager* shelf_layout_manager =
196 shelf_widget->shelf_layout_manager(); 214 shelf_widget->shelf_layout_manager();
197 ASSERT_TRUE(shelf_layout_manager); 215 ASSERT_TRUE(shelf_layout_manager);
198 EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state()); 216 EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state());
199 217
200 // Create a Widget which overlaps the shelf in both left and bottom 218 // Create a Widget which overlaps the shelf in both left and bottom
201 // alignments. 219 // alignments.
202 const int kOverlapSize = 15; 220 const int kOverlapSize = 15;
203 const int kWindowHeight = 200; 221 const int kWindowHeight = 200;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 gfx::Point event_location(widget_bounds.x() + 5, shelf_bounds.y() + 1); 282 gfx::Point event_location(widget_bounds.x() + 5, shelf_bounds.y() + 1);
265 ui::MouseEvent mouse(ui::ET_MOUSE_MOVED, event_location, event_location, 283 ui::MouseEvent mouse(ui::ET_MOUSE_MOVED, event_location, event_location,
266 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE); 284 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
267 ui::EventTarget* target = targeter->FindTargetForEvent(root, &mouse); 285 ui::EventTarget* target = targeter->FindTargetForEvent(root, &mouse);
268 EXPECT_EQ(shelf_widget->GetNativeWindow(), target); 286 EXPECT_EQ(shelf_widget->GetNativeWindow(), target);
269 } 287 }
270 } 288 }
271 289
272 // Tests that the shelf has a slightly larger hit-region for touch-events when 290 // Tests that the shelf has a slightly larger hit-region for touch-events when
273 // it's in the auto-hidden state. 291 // it's in the auto-hidden state.
274 TEST_F(ShelfWidgetTest, HiddenShelfHitTestTouch) { 292 TEST_P(ShelfWidgetTest, HiddenShelfHitTestTouch) {
275 Shelf* shelf = Shelf::ForPrimaryDisplay(); 293 Shelf* shelf = Shelf::ForPrimaryDisplay();
276 ShelfWidget* shelf_widget = GetShelfWidget(); 294 ShelfWidget* shelf_widget = GetShelfWidget();
277 gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen(); 295 gfx::Rect shelf_bounds = shelf_widget->GetWindowBoundsInScreen();
278 EXPECT_TRUE(!shelf_bounds.IsEmpty()); 296 EXPECT_TRUE(!shelf_bounds.IsEmpty());
279 ShelfLayoutManager* shelf_layout_manager = 297 ShelfLayoutManager* shelf_layout_manager =
280 shelf_widget->shelf_layout_manager(); 298 shelf_widget->shelf_layout_manager();
281 ASSERT_TRUE(shelf_layout_manager); 299 ASSERT_TRUE(shelf_layout_manager);
282 EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state()); 300 EXPECT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state());
283 301
284 // Create a widget to make sure that the shelf does auto-hide. 302 // Create a widget to make sure that the shelf does auto-hide.
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 shelf_layout_manager->auto_hide_state()); 444 shelf_layout_manager->auto_hide_state());
427 } 445 }
428 446
429 private: 447 private:
430 ShelfWidgetTestShellDelegate* shelf_widget_test_shell_delegate_; 448 ShelfWidgetTestShellDelegate* shelf_widget_test_shell_delegate_;
431 DISALLOW_COPY_AND_ASSIGN(ShelfWidgetTestWithDelegate); 449 DISALLOW_COPY_AND_ASSIGN(ShelfWidgetTestWithDelegate);
432 }; 450 };
433 451
434 } // namespace 452 } // namespace
435 453
436 TEST_F(ShelfWidgetTestWithDelegate, CreateAutoHideAlwaysShelf) { 454 INSTANTIATE_TEST_CASE_P(
455 /* prefix intentionally left blank due to only one parameterization */,
456 ShelfWidgetTestWithDelegate,
457 testing::Values(MaterialDesignController::NON_MATERIAL,
458 MaterialDesignController::MATERIAL_NORMAL,
459 MaterialDesignController::MATERIAL_EXPERIMENTAL));
460
461 TEST_P(ShelfWidgetTestWithDelegate, CreateAutoHideAlwaysShelf) {
437 // The actual auto hide state is shown because there are no open windows. 462 // The actual auto hide state is shown because there are no open windows.
438 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM, 463 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM,
439 SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 464 SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
440 SHELF_AUTO_HIDE, SHELF_AUTO_HIDE_SHOWN); 465 SHELF_AUTO_HIDE, SHELF_AUTO_HIDE_SHOWN);
441 } 466 }
442 467
443 TEST_F(ShelfWidgetTestWithDelegate, CreateAutoHideNeverShelf) { 468 TEST_P(ShelfWidgetTestWithDelegate, CreateAutoHideNeverShelf) {
444 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 469 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
445 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_LEFT, 470 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_LEFT,
446 SHELF_AUTO_HIDE_BEHAVIOR_NEVER, 471 SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
447 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); 472 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
448 } 473 }
449 474
450 TEST_F(ShelfWidgetTestWithDelegate, CreateAutoHideAlwaysHideShelf) { 475 TEST_P(ShelfWidgetTestWithDelegate, CreateAutoHideAlwaysHideShelf) {
451 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 476 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
452 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_RIGHT, 477 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_RIGHT,
453 SHELF_AUTO_HIDE_ALWAYS_HIDDEN, SHELF_HIDDEN, 478 SHELF_AUTO_HIDE_ALWAYS_HIDDEN, SHELF_HIDDEN,
454 SHELF_AUTO_HIDE_HIDDEN); 479 SHELF_AUTO_HIDE_HIDDEN);
455 } 480 }
456 481
457 TEST_F(ShelfWidgetTestWithDelegate, CreateLockedShelf) { 482 TEST_P(ShelfWidgetTestWithDelegate, CreateLockedShelf) {
458 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 483 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
459 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM_LOCKED, 484 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM_LOCKED,
460 SHELF_AUTO_HIDE_BEHAVIOR_NEVER, 485 SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
461 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); 486 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
462 } 487 }
463 488
464 } // namespace ash 489 } // namespace ash
OLDNEW
« no previous file with comments | « ash/screen_util_unittest.cc ('k') | ash/test/ash_md_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698