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

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

Issue 2471993002: Remove calls to User::email() from chrome/browser/ui/webui/* (Closed)
Patch Set: Created 4 years, 1 month 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 <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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698