| 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 "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "chrome/browser/chromeos/login/login_manager_test.h" | 9 #include "chrome/browser/chromeos/login/login_manager_test.h" |
| 10 #include "chrome/browser/chromeos/login/startup_utils.h" | 10 #include "chrome/browser/chromeos/login/startup_utils.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 CheckBanner(contents, is_primary); | 133 CheckBanner(contents, is_primary); |
| 134 CheckSharedSections(contents, is_primary); | 134 CheckSharedSections(contents, is_primary); |
| 135 CheckAccountsOverlay(contents, is_owner); | 135 CheckAccountsOverlay(contents, is_owner); |
| 136 } | 136 } |
| 137 | 137 |
| 138 // Creates a browser and navigates to the Settings page. | 138 // Creates a browser and navigates to the Settings page. |
| 139 Browser* CreateBrowserForUser(const user_manager::User* user) { | 139 Browser* CreateBrowserForUser(const user_manager::User* user) { |
| 140 Profile* profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user); | 140 Profile* profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user); |
| 141 SigninManagerFactory::GetForProfile(profile)-> | 141 SigninManagerFactory::GetForProfile(profile)-> |
| 142 SetAuthenticatedUsername(user->email()); | 142 SetAuthenticatedAccountInfo(GetGaiaIDForUserID(user->email()), |
| 143 user->email()); |
| 143 | 144 |
| 144 ui_test_utils::BrowserAddedObserver observer; | 145 ui_test_utils::BrowserAddedObserver observer; |
| 145 Browser* browser = CreateBrowser(profile); | 146 Browser* browser = CreateBrowser(profile); |
| 146 observer.WaitForSingleNewBrowser(); | 147 observer.WaitForSingleNewBrowser(); |
| 147 | 148 |
| 148 ui_test_utils::NavigateToURL(browser, | 149 ui_test_utils::NavigateToURL(browser, |
| 149 GURL("chrome://settings-frame")); | 150 GURL("chrome://settings-frame")); |
| 150 return browser; | 151 return browser; |
| 151 } | 152 } |
| 152 | 153 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 content::WaitForLoadStop(contents); | 429 content::WaitForLoadStop(contents); |
| 429 { | 430 { |
| 430 SCOPED_TRACE("Screen lock false for both users"); | 431 SCOPED_TRACE("Screen lock false for both users"); |
| 431 expected_value = false; | 432 expected_value = false; |
| 432 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, | 433 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, |
| 433 empty_controlled, expected_value); | 434 empty_controlled, expected_value); |
| 434 } | 435 } |
| 435 } | 436 } |
| 436 | 437 |
| 437 } // namespace chromeos | 438 } // namespace chromeos |
| OLD | NEW |