OLD | NEW |
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/session/session_state_delegate.h" | 5 #include "ash/session/session_state_delegate.h" |
6 #include "ash/shell.h" | 6 #include "ash/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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 int user_adding_started() { return user_adding_started_; } | 89 int user_adding_started() { return user_adding_started_; } |
90 | 90 |
91 int user_adding_finished() { return user_adding_finished_; } | 91 int user_adding_finished() { return user_adding_finished_; } |
92 | 92 |
93 private: | 93 private: |
94 int user_adding_started_ = 0; | 94 int user_adding_started_ = 0; |
95 int user_adding_finished_ = 0; | 95 int user_adding_finished_ = 0; |
96 scoped_ptr<base::RunLoop> run_loop_; | 96 std::unique_ptr<base::RunLoop> run_loop_; |
97 bool finished_ = false; // True if OnUserAddingFinished() has been called | 97 bool finished_ = false; // True if OnUserAddingFinished() has been called |
98 // before WaitUntilUserAddingFinishedOrCancelled(). | 98 // before WaitUntilUserAddingFinishedOrCancelled(). |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(UserAddingScreenTest); | 100 DISALLOW_COPY_AND_ASSIGN(UserAddingScreenTest); |
101 }; | 101 }; |
102 | 102 |
103 IN_PROC_BROWSER_TEST_F(UserAddingScreenTest, PRE_CancelAdding) { | 103 IN_PROC_BROWSER_TEST_F(UserAddingScreenTest, PRE_CancelAdding) { |
104 RegisterUser(kTestUsers[0]); | 104 RegisterUser(kTestUsers[0]); |
105 RegisterUser(kTestUsers[1]); | 105 RegisterUser(kTestUsers[1]); |
106 RegisterUser(kTestUsers[2]); | 106 RegisterUser(kTestUsers[2]); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 UserAddingScreen::Get()->Start(); | 285 UserAddingScreen::Get()->Start(); |
286 content::RunAllPendingInMessageLoop(); | 286 content::RunAllPendingInMessageLoop(); |
287 CheckScreenIsVisible(); | 287 CheckScreenIsVisible(); |
288 UserAddingScreen::Get()->Cancel(); | 288 UserAddingScreen::Get()->Cancel(); |
289 WaitUntilUserAddingFinishedOrCancelled(); | 289 WaitUntilUserAddingFinishedOrCancelled(); |
290 content::RunAllPendingInMessageLoop(); | 290 content::RunAllPendingInMessageLoop(); |
291 } | 291 } |
292 | 292 |
293 } // namespace chromeos | 293 } // namespace chromeos |
OLD | NEW |