OLD | NEW |
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 Loading... |
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(kTestUser); | 164 UserContext user_context(AccountId::FromUserEmail(kTestUser)); |
165 user_context.SetGaiaID(kGaiaId); | 165 user_context.SetGaiaID(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(); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |