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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.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" |
11 #include "chrome/browser/chromeos/login/login_manager_test.h" | 11 #include "chrome/browser/chromeos/login/login_manager_test.h" |
12 #include "chrome/browser/chromeos/login/startup_utils.h" | 12 #include "chrome/browser/chromeos/login/startup_utils.h" |
13 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 13 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
14 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 14 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
15 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 15 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
16 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" | 16 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" |
17 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 17 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
19 #include "chrome/test/base/in_process_browser_test.h" | 19 #include "chrome/test/base/in_process_browser_test.h" |
20 #include "components/user_manager/user_manager.h" | 20 #include "components/user_manager/user_manager.h" |
21 #include "content/public/test/test_utils.h" | 21 #include "content/public/test/test_utils.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 using namespace testing; | 24 using namespace testing; |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const char* kTestUsers[] = {"test-user1@gmail.com", | 28 const char* const kTestUsers[] = {"test-user1@gmail.com", |
29 "test-user2@gmail.com", | 29 "test-user2@gmail.com", |
30 "test-user3@gmail.com"}; | 30 "test-user3@gmail.com"}; |
31 | 31 |
32 } // anonymous namespace | 32 } // anonymous namespace |
33 | 33 |
34 namespace chromeos { | 34 namespace chromeos { |
35 | 35 |
36 class UserAddingScreenTest : public LoginManagerTest, | 36 class UserAddingScreenTest : public LoginManagerTest, |
37 public UserAddingScreen::Observer { | 37 public UserAddingScreen::Observer { |
38 public: | 38 public: |
39 UserAddingScreenTest() : LoginManagerTest(false), | 39 UserAddingScreenTest() : LoginManagerTest(false), |
40 user_adding_started_(0), | 40 user_adding_started_(0), |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 content::NotificationService::AllSources()).Wait(); | 264 content::NotificationService::AllSources()).Wait(); |
265 | 265 |
266 UserAddingScreen::Get()->Start(); | 266 UserAddingScreen::Get()->Start(); |
267 content::RunAllPendingInMessageLoop(); | 267 content::RunAllPendingInMessageLoop(); |
268 CheckScreenIsVisible(); | 268 CheckScreenIsVisible(); |
269 UserAddingScreen::Get()->Cancel(); | 269 UserAddingScreen::Get()->Cancel(); |
270 content::RunAllPendingInMessageLoop(); | 270 content::RunAllPendingInMessageLoop(); |
271 } | 271 } |
272 | 272 |
273 } // namespace chromeos | 273 } // namespace chromeos |
OLD | NEW |