Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: rebased Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698