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

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

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. Created 4 years, 9 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 (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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 void PrepareOfflineLogin() { 156 void PrepareOfflineLogin() {
157 bool show_user; 157 bool show_user;
158 ASSERT_TRUE(CrosSettings::Get()->GetBoolean( 158 ASSERT_TRUE(CrosSettings::Get()->GetBoolean(
159 kAccountsPrefShowUserNamesOnSignIn, &show_user)); 159 kAccountsPrefShowUserNamesOnSignIn, &show_user));
160 ASSERT_FALSE(show_user); 160 ASSERT_FALSE(show_user);
161 161
162 StartGaiaAuthOffline(); 162 StartGaiaAuthOffline();
163 163
164 UserContext user_context(AccountId::FromUserEmail(kTestUser)); 164 UserContext user_context(
165 user_context.SetGaiaID(kGaiaId); 165 AccountId::FromUserEmailGaiaId(kTestUser, kGaiaId));
166 user_context.SetKey(Key(kPassword)); 166 user_context.SetKey(Key(kPassword));
167 SetExpectedCredentials(user_context); 167 SetExpectedCredentials(user_context);
168 } 168 }
169 }; 169 };
170 170
171 // Used to make sure that the system tray is visible and within the screen 171 // Used to make sure that the system tray is visible and within the screen
172 // bounds after login. 172 // bounds after login.
173 void TestSystemTrayIsVisible() { 173 void TestSystemTrayIsVisible() {
174 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); 174 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
175 aura::Window* primary_win = ash::Shell::GetPrimaryRootWindow(); 175 aura::Window* primary_win = ash::Shell::GetPrimaryRootWindow();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 content::WindowedNotificationObserver session_start_waiter( 254 content::WindowedNotificationObserver session_start_waiter(
255 chrome::NOTIFICATION_SESSION_STARTED, 255 chrome::NOTIFICATION_SESSION_STARTED,
256 content::NotificationService::AllSources()); 256 content::NotificationService::AllSources());
257 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); 257 SubmitGaiaAuthOfflineForm(kTestUser, kPassword);
258 session_start_waiter.Wait(); 258 session_start_waiter.Wait();
259 259
260 TestSystemTrayIsVisible(); 260 TestSystemTrayIsVisible();
261 } 261 }
262 262
263 } // namespace chromeos 263 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698