| 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/location.h" |
| 9 #include "base/single_thread_task_runner.h" |
| 8 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "base/threading/thread_task_runner_handle.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/chromeos/login/login_manager_test.h" | 13 #include "chrome/browser/chromeos/login/login_manager_test.h" |
| 11 #include "chrome/browser/chromeos/login/login_wizard.h" | 14 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 12 #include "chrome/browser/chromeos/login/startup_utils.h" | 15 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 13 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 16 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 14 #include "chrome/browser/chromeos/login/wizard_controller.h" | 17 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 15 #include "chrome/browser/chromeos/settings/cros_settings.h" | 18 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 16 #include "chrome/browser/profiles/profile_manager.h" | 19 #include "chrome/browser/profiles/profile_manager.h" |
| 17 #include "chrome/browser/profiles/profiles_state.h" | 20 #include "chrome/browser/profiles/profiles_state.h" |
| 18 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // Login screen needs to be shown explicitly when running test. | 230 // Login screen needs to be shown explicitly when running test. |
| 228 ShowLoginWizard(WizardController::kLoginScreenName); | 231 ShowLoginWizard(WizardController::kLoginScreenName); |
| 229 | 232 |
| 230 // Cursor should be hidden at startup | 233 // Cursor should be hidden at startup |
| 231 EXPECT_FALSE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); | 234 EXPECT_FALSE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); |
| 232 | 235 |
| 233 // Cursor should be shown after cursor is moved. | 236 // Cursor should be shown after cursor is moved. |
| 234 EXPECT_TRUE(ui_test_utils::SendMouseMoveSync(gfx::Point())); | 237 EXPECT_TRUE(ui_test_utils::SendMouseMoveSync(gfx::Point())); |
| 235 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); | 238 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); |
| 236 | 239 |
| 237 base::MessageLoop::current()->DeleteSoon(FROM_HERE, | 240 base::ThreadTaskRunnerHandle::Get()->DeleteSoon( |
| 238 LoginDisplayHost::default_host()); | 241 FROM_HERE, LoginDisplayHost::default_host()); |
| 239 | 242 |
| 240 TestSystemTrayIsVisible(); | 243 TestSystemTrayIsVisible(); |
| 241 } | 244 } |
| 242 | 245 |
| 243 // Verifies that the webui for login comes up successfully. | 246 // Verifies that the webui for login comes up successfully. |
| 244 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) { | 247 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) { |
| 245 base::TimeDelta no_timeout; | 248 base::TimeDelta no_timeout; |
| 246 EXPECT_TRUE(tracing::WaitForWatchEvent(no_timeout)); | 249 EXPECT_TRUE(tracing::WaitForWatchEvent(no_timeout)); |
| 247 std::string json_events; | 250 std::string json_events; |
| 248 ASSERT_TRUE(tracing::EndTracing(&json_events)); | 251 ASSERT_TRUE(tracing::EndTracing(&json_events)); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 260 content::WindowedNotificationObserver session_start_waiter( | 263 content::WindowedNotificationObserver session_start_waiter( |
| 261 chrome::NOTIFICATION_SESSION_STARTED, | 264 chrome::NOTIFICATION_SESSION_STARTED, |
| 262 content::NotificationService::AllSources()); | 265 content::NotificationService::AllSources()); |
| 263 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); | 266 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); |
| 264 session_start_waiter.Wait(); | 267 session_start_waiter.Wait(); |
| 265 | 268 |
| 266 TestSystemTrayIsVisible(); | 269 TestSystemTrayIsVisible(); |
| 267 } | 270 } |
| 268 | 271 |
| 269 } // namespace chromeos | 272 } // namespace chromeos |
| OLD | NEW |