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

Side by Side Diff: ash/system/chromeos/rotation/tray_rotation_lock_unittest.cc

Issue 2653593004: chromeos: Remove AshTestBase::SupportsMultipleDisplays (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/system/chromeos/rotation/tray_rotation_lock.h" 5 #include "ash/system/chromeos/rotation/tray_rotation_lock.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/common/system/status_area_widget.h" 9 #include "ash/common/system/status_area_widget.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 true); 152 true);
153 EXPECT_TRUE(tray_view()->visible()); 153 EXPECT_TRUE(tray_view()->visible());
154 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( 154 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
155 false); 155 false);
156 EXPECT_FALSE(tray_view()->visible()); 156 EXPECT_FALSE(tray_view()->visible());
157 } 157 }
158 158
159 // Tests that the when the tray view is created for a secondary display, that 159 // Tests that the when the tray view is created for a secondary display, that
160 // it is not visible, and that MaximizeMode does not affect visibility. 160 // it is not visible, and that MaximizeMode does not affect visibility.
161 TEST_F(TrayRotationLockTest, CreateSecondaryTrayView) { 161 TEST_F(TrayRotationLockTest, CreateSecondaryTrayView) {
162 if (!SupportsMultipleDisplays())
163 return;
164 UpdateDisplay("400x400,200x200"); 162 UpdateDisplay("400x400,200x200");
165 163
166 SetUpForStatusAreaWidget( 164 SetUpForStatusAreaWidget(
167 StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget()); 165 StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget());
168 EXPECT_FALSE(tray_view()->visible()); 166 EXPECT_FALSE(tray_view()->visible());
169 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( 167 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
170 true); 168 true);
171 EXPECT_FALSE(tray_view()->visible()); 169 EXPECT_FALSE(tray_view()->visible());
172 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( 170 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
173 false); 171 false);
(...skipping 25 matching lines...) Expand all
199 true); 197 true);
200 EXPECT_TRUE(default_view()->visible()); 198 EXPECT_TRUE(default_view()->visible());
201 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( 199 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
202 false); 200 false);
203 EXPECT_FALSE(default_view()->visible()); 201 EXPECT_FALSE(default_view()->visible());
204 } 202 }
205 203
206 // Tests that no default view is created when the target is a secondary 204 // Tests that no default view is created when the target is a secondary
207 // display. 205 // display.
208 TEST_F(TrayRotationLockTest, CreateSecondaryDefaultView) { 206 TEST_F(TrayRotationLockTest, CreateSecondaryDefaultView) {
209 if (!SupportsMultipleDisplays())
210 return;
211 UpdateDisplay("400x400,200x200"); 207 UpdateDisplay("400x400,200x200");
212 208
213 TearDownViews(); 209 TearDownViews();
214 SetUpForStatusAreaWidget( 210 SetUpForStatusAreaWidget(
215 StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget()); 211 StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget());
216 EXPECT_EQ(NULL, default_view()); 212 EXPECT_EQ(NULL, default_view());
217 } 213 }
218 214
219 // Tests that activating the default view causes the display to have its 215 // Tests that activating the default view causes the display to have its
220 // rotation locked, and that the tray view becomes visible. 216 // rotation locked, and that the tray view becomes visible.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( 258 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
263 true); 259 true);
264 DestroyTrayView(); 260 DestroyTrayView();
265 Shell::GetInstance()->screen_orientation_controller()->SetRotationLocked( 261 Shell::GetInstance()->screen_orientation_controller()->SetRotationLocked(
266 true); 262 true);
267 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( 263 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
268 false); 264 false);
269 } 265 }
270 266
271 } // namespace ash 267 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ash/system/overview/overview_button_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698