| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/chromeos/login/login_manager_test.h" | 8 #include "chrome/browser/chromeos/login/login_manager_test.h" |
| 9 #include "chrome/browser/chromeos/login/startup_utils.h" | 9 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 10 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 10 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
| 11 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
| 12 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 11 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 13 #include "chrome/browser/chromeos/settings/cros_settings.h" | 12 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 14 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" | 13 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" |
| 15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 17 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 18 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 19 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
| 20 #include "chromeos/settings/cros_settings_names.h" | 19 #include "chromeos/settings/cros_settings_names.h" |
| 20 #include "components/user_manager/user_manager.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/test/browser_test_utils.h" | 22 #include "content/public/test/browser_test_utils.h" |
| 23 #include "content/public/test/test_utils.h" | 23 #include "content/public/test/test_utils.h" |
| 24 | 24 |
| 25 namespace chromeos { | 25 namespace chromeos { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const char* kTestUsers[] = { "test-user1@gmail.com", "test-user2@gmail.com" }; | 29 const char* kTestUsers[] = { "test-user1@gmail.com", "test-user2@gmail.com" }; |
| 30 | 30 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 RegisterUser(kTestUsers[1]); | 129 RegisterUser(kTestUsers[1]); |
| 130 StartupUtils::MarkOobeCompleted(); | 130 StartupUtils::MarkOobeCompleted(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 IN_PROC_BROWSER_TEST_F(AccountsOptionsTest, MultiProfilesAccountsOptions) { | 133 IN_PROC_BROWSER_TEST_F(AccountsOptionsTest, MultiProfilesAccountsOptions) { |
| 134 LoginUser(kTestUsers[0]); | 134 LoginUser(kTestUsers[0]); |
| 135 UserAddingScreen::Get()->Start(); | 135 UserAddingScreen::Get()->Start(); |
| 136 content::RunAllPendingInMessageLoop(); | 136 content::RunAllPendingInMessageLoop(); |
| 137 AddUser(kTestUsers[1]); | 137 AddUser(kTestUsers[1]); |
| 138 | 138 |
| 139 UserManager* manager = UserManager::Get(); | 139 user_manager::UserManager* manager = user_manager::UserManager::Get(); |
| 140 ASSERT_EQ(2u, manager->GetLoggedInUsers().size()); | 140 ASSERT_EQ(2u, manager->GetLoggedInUsers().size()); |
| 141 | 141 |
| 142 CheckAccountsUI(manager->FindUser(kTestUsers[0]), true /* is_owner */); | 142 CheckAccountsUI(manager->FindUser(kTestUsers[0]), true /* is_owner */); |
| 143 CheckAccountsUI(manager->FindUser(kTestUsers[1]), false /* is_owner */); | 143 CheckAccountsUI(manager->FindUser(kTestUsers[1]), false /* is_owner */); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace chromeos | 146 } // namespace chromeos |
| OLD | NEW |