| 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" |
| 11 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" | 11 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" |
| 12 #include "chrome/browser/chromeos/cros/mock_network_library.h" | 12 #include "chrome/browser/chromeos/cros/mock_network_library.h" |
| 13 #include "chrome/browser/chromeos/login/base_login_display_host.h" | 13 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
| 14 #include "chrome/browser/chromeos/login/login_wizard.h" | 14 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 15 #include "chrome/browser/chromeos/login/wizard_controller.h" | 15 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 16 #include "chrome/browser/extensions/extension_system.h" | 16 #include "chrome/browser/extensions/extension_system.h" |
| 17 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
| 18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
| 19 #include "chrome/common/chrome_notification_types.h" | 19 #include "chrome/common/chrome_notification_types.h" |
| 20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
| 21 #include "chrome/test/base/interactive_test_utils.h" | 21 #include "chrome/test/base/interactive_test_utils.h" |
| 22 #include "chrome/test/base/in_process_browser_test.h" | 22 #include "chrome/test/base/in_process_browser_test.h" |
| 23 #include "chrome/test/base/ui_test_utils.h" | 23 #include "chrome/test/base/ui_test_utils.h" |
| 24 #include "chromeos/chromeos_switches.h" |
| 24 #include "content/public/browser/notification_observer.h" | 25 #include "content/public/browser/notification_observer.h" |
| 25 #include "content/public/browser/notification_registrar.h" | 26 #include "content/public/browser/notification_registrar.h" |
| 26 #include "content/public/browser/notification_service.h" | 27 #include "content/public/browser/notification_service.h" |
| 27 #include "content/public/test/test_utils.h" | 28 #include "content/public/test/test_utils.h" |
| 28 #include "testing/gmock/include/gmock/gmock.h" | 29 #include "testing/gmock/include/gmock/gmock.h" |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
| 30 | 31 |
| 31 using ::testing::_; | 32 using ::testing::_; |
| 32 using ::testing::AnyNumber; | 33 using ::testing::AnyNumber; |
| 33 using ::testing::Return; | 34 using ::testing::Return; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 68 |
| 68 class LoginUserTest : public LoginTestBase { | 69 class LoginUserTest : public LoginTestBase { |
| 69 protected: | 70 protected: |
| 70 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 71 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 71 LoginTestBase::SetUpInProcessBrowserTestFixture(); | 72 LoginTestBase::SetUpInProcessBrowserTestFixture(); |
| 72 } | 73 } |
| 73 | 74 |
| 74 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 75 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 75 command_line->AppendSwitchASCII(switches::kLoginUser, "TestUser@gmail.com"); | 76 command_line->AppendSwitchASCII(switches::kLoginUser, "TestUser@gmail.com"); |
| 76 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 77 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
| 77 command_line->AppendSwitch(switches::kNoFirstRun); | 78 command_line->AppendSwitch(::switches::kNoFirstRun); |
| 78 } | 79 } |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 class LoginGuestTest : public LoginTestBase { | 82 class LoginGuestTest : public LoginTestBase { |
| 82 protected: | 83 protected: |
| 83 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 84 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 84 command_line->AppendSwitch(switches::kGuestSession); | 85 command_line->AppendSwitch(switches::kGuestSession); |
| 85 command_line->AppendSwitch(switches::kIncognito); | 86 command_line->AppendSwitch(::switches::kIncognito); |
| 86 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 87 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
| 87 command_line->AppendSwitch(switches::kNoFirstRun); | 88 command_line->AppendSwitch(::switches::kNoFirstRun); |
| 88 } | 89 } |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 class LoginCursorTest : public LoginTestBase { | 92 class LoginCursorTest : public LoginTestBase { |
| 92 protected: | 93 protected: |
| 93 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 94 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 94 command_line->AppendSwitch(switches::kLoginManager); | 95 command_line->AppendSwitch(switches::kLoginManager); |
| 95 } | 96 } |
| 96 }; | 97 }; |
| 97 | 98 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // Verifies that the webui for login comes up successfully. | 218 // Verifies that the webui for login comes up successfully. |
| 218 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) { | 219 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) { |
| 219 scoped_refptr<content::MessageLoopRunner> runner = | 220 scoped_refptr<content::MessageLoopRunner> runner = |
| 220 new content::MessageLoopRunner; | 221 new content::MessageLoopRunner; |
| 221 content_browser_client_->browser_main_extra_parts_->set_quit_task( | 222 content_browser_client_->browser_main_extra_parts_->set_quit_task( |
| 222 runner->QuitClosure()); | 223 runner->QuitClosure()); |
| 223 runner->Run(); | 224 runner->Run(); |
| 224 } | 225 } |
| 225 | 226 |
| 226 } // namespace chromeos | 227 } // namespace chromeos |
| OLD | NEW |