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

Side by Side Diff: chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc

Issue 2583593003: cros: Various fixes needed for preloading lock screen. (Closed)
Patch Set: Created 4 years 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 | « chrome/browser/chromeos/login/ui/shared_web_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/session/session_state_delegate.h" 5 #include "ash/common/session/session_state_delegate.h"
6 #include "ash/common/wm_shell.h" 6 #include "ash/common/wm_shell.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 9 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
10 #include "chrome/browser/chromeos/login/lock/screen_locker_tester.h" 10 #include "chrome/browser/chromeos/login/lock/screen_locker_tester.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 IN_PROC_BROWSER_TEST_F(UserAddingScreenTest, ScreenVisibility) { 259 IN_PROC_BROWSER_TEST_F(UserAddingScreenTest, ScreenVisibility) {
260 LoginUser(kTestUsers[0]); 260 LoginUser(kTestUsers[0]);
261 261
262 UserAddingScreen::Get()->Start(); 262 UserAddingScreen::Get()->Start();
263 content::RunAllPendingInMessageLoop(); 263 content::RunAllPendingInMessageLoop();
264 CheckScreenIsVisible(); 264 CheckScreenIsVisible();
265 UserAddingScreen::Get()->Cancel(); 265 UserAddingScreen::Get()->Cancel();
266 WaitUntilUserAddingFinishedOrCancelled(); 266 WaitUntilUserAddingFinishedOrCancelled();
267 content::RunAllPendingInMessageLoop(); 267 content::RunAllPendingInMessageLoop();
268 268
269 ScreenLocker::Show(); 269 {
270 content::WindowedNotificationObserver( 270 content::WindowedNotificationObserver observer(
271 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, 271 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
272 content::NotificationService::AllSources()).Wait(); 272 content::NotificationService::AllSources());
273 ScreenLocker::Show();
274 observer.Wait();
275 }
273 276
274 ScreenLocker::Hide(); 277 {
275 content::WindowedNotificationObserver( 278 content::WindowedNotificationObserver observer(
276 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, 279 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
277 content::NotificationService::AllSources()).Wait(); 280 content::NotificationService::AllSources());
281 ScreenLocker::Hide();
282 observer.Wait();
283 }
278 284
279 UserAddingScreen::Get()->Start(); 285 UserAddingScreen::Get()->Start();
280 content::RunAllPendingInMessageLoop(); 286 content::RunAllPendingInMessageLoop();
281 CheckScreenIsVisible(); 287 CheckScreenIsVisible();
282 UserAddingScreen::Get()->Cancel(); 288 UserAddingScreen::Get()->Cancel();
283 WaitUntilUserAddingFinishedOrCancelled(); 289 WaitUntilUserAddingFinishedOrCancelled();
284 content::RunAllPendingInMessageLoop(); 290 content::RunAllPendingInMessageLoop();
285 } 291 }
286 292
287 } // namespace chromeos 293 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/shared_web_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698