| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/location.h" |
| 6 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/threading/thread_task_runner_handle.h" |
| 7 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 11 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 9 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" | 12 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" |
| 10 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" | 13 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" |
| 11 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 14 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 12 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" | 15 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" |
| 13 #include "chrome/browser/chromeos/login/wizard_controller.h" | 16 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 14 #include "chrome/browser/lifetime/application_lifetime.h" | 17 #include "chrome/browser/lifetime/application_lifetime.h" |
| 15 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 18 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 16 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 36 | 39 |
| 37 void SetUpCommandLine(base::CommandLine* command_line) override { | 40 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 38 command_line->AppendSwitch(switches::kOobeSkipPostLogin); | 41 command_line->AppendSwitch(switches::kOobeSkipPostLogin); |
| 39 | 42 |
| 40 OobeBaseTest::SetUpCommandLine(command_line); | 43 OobeBaseTest::SetUpCommandLine(command_line); |
| 41 } | 44 } |
| 42 | 45 |
| 43 void TearDownOnMainThread() override { | 46 void TearDownOnMainThread() override { |
| 44 // If the login display is still showing, exit gracefully. | 47 // If the login display is still showing, exit gracefully. |
| 45 if (LoginDisplayHost::default_host()) { | 48 if (LoginDisplayHost::default_host()) { |
| 46 base::MessageLoop::current()->PostTask(FROM_HERE, | 49 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 47 base::Bind(&chrome::AttemptExit)); | 50 FROM_HERE, base::Bind(&chrome::AttemptExit)); |
| 48 content::RunMessageLoop(); | 51 content::RunMessageLoop(); |
| 49 } | 52 } |
| 50 | 53 |
| 51 OobeBaseTest::TearDownOnMainThread(); | 54 OobeBaseTest::TearDownOnMainThread(); |
| 52 } | 55 } |
| 53 | 56 |
| 54 WebUILoginDisplay* GetLoginDisplay() { | 57 WebUILoginDisplay* GetLoginDisplay() { |
| 55 return static_cast<WebUILoginDisplay*>( | 58 return static_cast<WebUILoginDisplay*>( |
| 56 ExistingUserController::current_controller()->login_display()); | 59 ExistingUserController::current_controller()->login_display()); |
| 57 } | 60 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 86 ui_controls::SendKeyPress(login_window, | 89 ui_controls::SendKeyPress(login_window, |
| 87 ui::VKEY_E, | 90 ui::VKEY_E, |
| 88 true, // control | 91 true, // control |
| 89 false, // shift | 92 false, // shift |
| 90 true, // alt | 93 true, // alt |
| 91 false); // command | 94 false); // command |
| 92 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT).Wait(); | 95 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT).Wait(); |
| 93 } | 96 } |
| 94 | 97 |
| 95 } // namespace chromeos | 98 } // namespace chromeos |
| OLD | NEW |