| 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 "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "chrome/browser/chrome_browser_main.h" | 7 #include "chrome/browser/chrome_browser_main.h" |
| 8 #include "chrome/browser/chrome_browser_main_extra_parts.h" | 8 #include "chrome/browser/chrome_browser_main_extra_parts.h" |
| 9 #include "chrome/browser/chrome_content_browser_client.h" | 9 #include "chrome/browser/chrome_content_browser_client.h" |
| 10 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 10 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 } | 193 } |
| 194 | 194 |
| 195 // Verifies the cursor is not hidden at startup when running guest session. | 195 // Verifies the cursor is not hidden at startup when running guest session. |
| 196 IN_PROC_BROWSER_TEST_F(LoginGuestTest, CursorShown) { | 196 IN_PROC_BROWSER_TEST_F(LoginGuestTest, CursorShown) { |
| 197 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); | 197 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); |
| 198 } | 198 } |
| 199 | 199 |
| 200 // Verifies the cursor is hidden at startup on login screen. | 200 // Verifies the cursor is hidden at startup on login screen. |
| 201 IN_PROC_BROWSER_TEST_F(LoginCursorTest, CursorHidden) { | 201 IN_PROC_BROWSER_TEST_F(LoginCursorTest, CursorHidden) { |
| 202 // Login screen needs to be shown explicitly when running test. | 202 // Login screen needs to be shown explicitly when running test. |
| 203 chromeos::ShowLoginWizard(chromeos::WizardController::kLoginScreenName, | 203 chromeos::ShowLoginWizard(chromeos::WizardController::kLoginScreenName); |
| 204 gfx::Size()); | |
| 205 | 204 |
| 206 // Cursor should be hidden at startup | 205 // Cursor should be hidden at startup |
| 207 EXPECT_FALSE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); | 206 EXPECT_FALSE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); |
| 208 | 207 |
| 209 // Cursor should be shown after cursor is moved. | 208 // Cursor should be shown after cursor is moved. |
| 210 EXPECT_TRUE(ui_test_utils::SendMouseMoveSync(gfx::Point())); | 209 EXPECT_TRUE(ui_test_utils::SendMouseMoveSync(gfx::Point())); |
| 211 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); | 210 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()); |
| 212 | 211 |
| 213 MessageLoop::current()->DeleteSoon( | 212 MessageLoop::current()->DeleteSoon( |
| 214 FROM_HERE, chromeos::LoginDisplayHostImpl::default_host()); | 213 FROM_HERE, chromeos::LoginDisplayHostImpl::default_host()); |
| 215 } | 214 } |
| 216 | 215 |
| 217 // Verifies that the webui for login comes up successfully. | 216 // Verifies that the webui for login comes up successfully. |
| 218 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) { | 217 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) { |
| 219 scoped_refptr<content::MessageLoopRunner> runner = | 218 scoped_refptr<content::MessageLoopRunner> runner = |
| 220 new content::MessageLoopRunner; | 219 new content::MessageLoopRunner; |
| 221 content_browser_client_->browser_main_extra_parts_->set_quit_task( | 220 content_browser_client_->browser_main_extra_parts_->set_quit_task( |
| 222 runner->QuitClosure()); | 221 runner->QuitClosure()); |
| 223 runner->Run(); | 222 runner->Run(); |
| 224 } | 223 } |
| 225 | 224 |
| 226 } | 225 } |
| OLD | NEW |