| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 !is_owner && kPrefTests[i].indicator ? "owner" : std::string()); | 144 !is_owner && kPrefTests[i].indicator ? "owner" : std::string()); |
| 145 } | 145 } |
| 146 CheckBanner(contents, is_primary); | 146 CheckBanner(contents, is_primary); |
| 147 CheckSharedSections(contents, is_primary); | 147 CheckSharedSections(contents, is_primary); |
| 148 CheckAccountsOverlay(contents, is_owner); | 148 CheckAccountsOverlay(contents, is_owner); |
| 149 } | 149 } |
| 150 | 150 |
| 151 // Creates a browser and navigates to the Settings page. | 151 // Creates a browser and navigates to the Settings page. |
| 152 Browser* CreateBrowserForUser(const user_manager::User* user) { | 152 Browser* CreateBrowserForUser(const user_manager::User* user) { |
| 153 Profile* profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user); | 153 Profile* profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user); |
| 154 SigninManagerFactory::GetForProfile(profile)-> | 154 SigninManagerFactory::GetForProfile(profile)->SetAuthenticatedAccountInfo( |
| 155 SetAuthenticatedAccountInfo(GetGaiaIDForUserID(user->email()), | 155 GetGaiaIDForUserID(user->GetAccountId().GetUserEmail()), |
| 156 user->email()); | 156 user->GetAccountId().GetUserEmail()); |
| 157 | 157 |
| 158 ui_test_utils::BrowserAddedObserver observer; | 158 ui_test_utils::BrowserAddedObserver observer; |
| 159 Browser* browser = CreateBrowser(profile); | 159 Browser* browser = CreateBrowser(profile); |
| 160 observer.WaitForSingleNewBrowser(); | 160 observer.WaitForSingleNewBrowser(); |
| 161 | 161 |
| 162 ui_test_utils::NavigateToURL(browser, | 162 ui_test_utils::NavigateToURL(browser, |
| 163 GURL("chrome://settings-frame")); | 163 GURL("chrome://settings-frame")); |
| 164 return browser; | 164 return browser; |
| 165 } | 165 } |
| 166 | 166 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 content::WaitForLoadStop(contents); | 447 content::WaitForLoadStop(contents); |
| 448 { | 448 { |
| 449 SCOPED_TRACE("Screen lock false for both users"); | 449 SCOPED_TRACE("Screen lock false for both users"); |
| 450 expected_value = false; | 450 expected_value = false; |
| 451 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, | 451 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, |
| 452 empty_controlled, expected_value); | 452 empty_controlled, expected_value); |
| 453 } | 453 } |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace chromeos | 456 } // namespace chromeos |
| OLD | NEW |