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

Side by Side Diff: ash/test/ash_test_base.cc

Issue 1071353003: Prevent DisplayPreferences from saving incorrect rotations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/wm/lock_layout_manager_unittest.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) 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 "ash/test/ash_test_base.h" 5 #include "ash/test/ash_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 ui::test::EventGenerator& AshTestBase::GetEventGenerator() { 197 ui::test::EventGenerator& AshTestBase::GetEventGenerator() {
198 if (!event_generator_) { 198 if (!event_generator_) {
199 event_generator_.reset( 199 event_generator_.reset(
200 new ui::test::EventGenerator(new AshEventGeneratorDelegate())); 200 new ui::test::EventGenerator(new AshEventGeneratorDelegate()));
201 } 201 }
202 return *event_generator_.get(); 202 return *event_generator_.get();
203 } 203 }
204 204
205 gfx::Display::Rotation AshTestBase::GetActiveDisplayRotation(int64 id) {
206 return Shell::GetInstance()
207 ->display_manager()
208 ->GetDisplayInfo(id)
209 .GetActiveRotation();
210 }
211
212 gfx::Display::Rotation AshTestBase::GetCurrentInternalDisplayRotation() {
213 return GetActiveDisplayRotation(gfx::Display::InternalDisplayId());
214 }
215
205 bool AshTestBase::SupportsMultipleDisplays() { 216 bool AshTestBase::SupportsMultipleDisplays() {
206 return AshTestHelper::SupportsMultipleDisplays(); 217 return AshTestHelper::SupportsMultipleDisplays();
207 } 218 }
208 219
209 bool AshTestBase::SupportsHostWindowResize() { 220 bool AshTestBase::SupportsHostWindowResize() {
210 return AshTestHelper::SupportsHostWindowResize(); 221 return AshTestHelper::SupportsHostWindowResize();
211 } 222 }
212 223
213 void AshTestBase::UpdateDisplay(const std::string& display_specs) { 224 void AshTestBase::UpdateDisplay(const std::string& display_specs) {
214 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); 225 DisplayManager* display_manager = Shell::GetInstance()->display_manager();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 356
346 void AshTestBase::UnblockUserSession() { 357 void AshTestBase::UnblockUserSession() {
347 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); 358 Shell::GetInstance()->session_state_delegate()->UnlockScreen();
348 SetSessionStarted(true); 359 SetSessionStarted(true);
349 SetUserAddingScreenRunning(false); 360 SetUserAddingScreenRunning(false);
350 } 361 }
351 362
352 363
353 } // namespace test 364 } // namespace test
354 } // namespace ash 365 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/wm/lock_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698