| Index: chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc
|
| diff --git a/chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc b/chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc
|
| index 038a6e9f8437ed42182e623ce03d4a514c3438d5..2cd6df2ec88bddc4024fb9f530743ae29dc4fad7 100644
|
| --- a/chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc
|
| +++ b/chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc
|
| @@ -266,15 +266,21 @@ IN_PROC_BROWSER_TEST_F(UserAddingScreenTest, ScreenVisibility) {
|
| WaitUntilUserAddingFinishedOrCancelled();
|
| content::RunAllPendingInMessageLoop();
|
|
|
| - ScreenLocker::Show();
|
| - content::WindowedNotificationObserver(
|
| - chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
|
| - content::NotificationService::AllSources()).Wait();
|
| -
|
| - ScreenLocker::Hide();
|
| - content::WindowedNotificationObserver(
|
| - chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
|
| - content::NotificationService::AllSources()).Wait();
|
| + {
|
| + content::WindowedNotificationObserver observer(
|
| + chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
|
| + content::NotificationService::AllSources());
|
| + ScreenLocker::Show();
|
| + observer.Wait();
|
| + }
|
| +
|
| + {
|
| + content::WindowedNotificationObserver observer(
|
| + chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
|
| + content::NotificationService::AllSources());
|
| + ScreenLocker::Hide();
|
| + observer.Wait();
|
| + }
|
|
|
| UserAddingScreen::Get()->Start();
|
| content::RunAllPendingInMessageLoop();
|
|
|