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

Side by Side Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Update after review. Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "ash/system/tray/system_tray.h" 6 #include "ash/system/tray/system_tray.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/login/login_manager_test.h" 10 #include "chrome/browser/chromeos/login/login_manager_test.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 void PrepareOfflineLogin() { 155 void PrepareOfflineLogin() {
156 bool show_user; 156 bool show_user;
157 ASSERT_TRUE(CrosSettings::Get()->GetBoolean( 157 ASSERT_TRUE(CrosSettings::Get()->GetBoolean(
158 kAccountsPrefShowUserNamesOnSignIn, &show_user)); 158 kAccountsPrefShowUserNamesOnSignIn, &show_user));
159 ASSERT_FALSE(show_user); 159 ASSERT_FALSE(show_user);
160 160
161 StartGaiaAuthOffline(); 161 StartGaiaAuthOffline();
162 162
163 UserContext user_context(kTestUser); 163 UserContext user_context(AccountId::FromUserEmail(kTestUser));
164 user_context.SetGaiaID(kGaiaId); 164 user_context.SetGaiaID(kGaiaId);
165 user_context.SetKey(Key(kPassword)); 165 user_context.SetKey(Key(kPassword));
166 SetExpectedCredentials(user_context); 166 SetExpectedCredentials(user_context);
167 } 167 }
168 }; 168 };
169 169
170 // Used to make sure that the system tray is visible and within the screen 170 // Used to make sure that the system tray is visible and within the screen
171 // bounds after login. 171 // bounds after login.
172 void TestSystemTrayIsVisible() { 172 void TestSystemTrayIsVisible() {
173 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); 173 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 content::WindowedNotificationObserver session_start_waiter( 253 content::WindowedNotificationObserver session_start_waiter(
254 chrome::NOTIFICATION_SESSION_STARTED, 254 chrome::NOTIFICATION_SESSION_STARTED,
255 content::NotificationService::AllSources()); 255 content::NotificationService::AllSources());
256 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); 256 SubmitGaiaAuthOfflineForm(kTestUser, kPassword);
257 session_start_waiter.Wait(); 257 session_start_waiter.Wait();
258 258
259 TestSystemTrayIsVisible(); 259 TestSystemTrayIsVisible();
260 } 260 }
261 261
262 } // namespace chromeos 262 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698