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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |