| 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 "chrome/browser/chromeos/login/wizard_controller.h" |
| 6 |
| 5 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 6 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 7 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 8 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 9 #include "base/prefs/pref_registry_simple.h" | 11 #include "base/prefs/pref_registry_simple.h" |
| 10 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 11 #include "base/prefs/pref_service_factory.h" | 13 #include "base/prefs/pref_service_factory.h" |
| 12 #include "base/prefs/testing_pref_store.h" | 14 #include "base/prefs/testing_pref_store.h" |
| 13 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 14 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 30 #include "chrome/browser/chromeos/login/screens/mock_update_screen.h" | 32 #include "chrome/browser/chromeos/login/screens/mock_update_screen.h" |
| 31 #include "chrome/browser/chromeos/login/screens/network_screen.h" | 33 #include "chrome/browser/chromeos/login/screens/network_screen.h" |
| 32 #include "chrome/browser/chromeos/login/screens/reset_screen.h" | 34 #include "chrome/browser/chromeos/login/screens/reset_screen.h" |
| 33 #include "chrome/browser/chromeos/login/screens/user_image_screen.h" | 35 #include "chrome/browser/chromeos/login/screens/user_image_screen.h" |
| 34 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h" | 36 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h" |
| 35 #include "chrome/browser/chromeos/login/startup_utils.h" | 37 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 36 #include "chrome/browser/chromeos/login/test/wizard_in_process_browser_test.h" | 38 #include "chrome/browser/chromeos/login/test/wizard_in_process_browser_test.h" |
| 37 #include "chrome/browser/chromeos/login/test_login_utils.h" | 39 #include "chrome/browser/chromeos/login/test_login_utils.h" |
| 38 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 40 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 39 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 41 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
| 40 #include "chrome/browser/chromeos/login/wizard_controller.h" | |
| 41 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" | 42 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" |
| 42 #include "chrome/browser/chromeos/policy/server_backed_device_state.h" | 43 #include "chrome/browser/chromeos/policy/server_backed_device_state.h" |
| 43 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 44 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 44 #include "chrome/browser/chromeos/timezone/timezone_request.h" | 45 #include "chrome/browser/chromeos/timezone/timezone_request.h" |
| 45 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 46 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 46 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 47 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 47 #include "chrome/common/chrome_paths.h" | 48 #include "chrome/common/chrome_paths.h" |
| 48 #include "chrome/common/chrome_switches.h" | 49 #include "chrome/common/chrome_switches.h" |
| 49 #include "chrome/common/pref_names.h" | 50 #include "chrome/common/pref_names.h" |
| 50 #include "chrome/grit/generated_resources.h" | 51 #include "chrome/grit/generated_resources.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void RunSwitchLanguageTest(const std::string& locale, | 141 void RunSwitchLanguageTest(const std::string& locale, |
| 141 const std::string& expected_locale, | 142 const std::string& expected_locale, |
| 142 const bool expect_success) { | 143 const bool expect_success) { |
| 143 SwitchLanguageTestData data; | 144 SwitchLanguageTestData data; |
| 144 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 145 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
| 145 new locale_util::SwitchLanguageCallback( | 146 new locale_util::SwitchLanguageCallback( |
| 146 base::Bind(&OnLocaleSwitched, base::Unretained(&data)))); | 147 base::Bind(&OnLocaleSwitched, base::Unretained(&data)))); |
| 147 locale_util::SwitchLanguage(locale, true, false, callback.Pass()); | 148 locale_util::SwitchLanguage(locale, true, false, callback.Pass()); |
| 148 | 149 |
| 149 // Token writing moves control to BlockingPool and back. | 150 // Token writing moves control to BlockingPool and back. |
| 150 base::RunLoop().RunUntilIdle(); | 151 content::RunAllBlockingPoolTasksUntilIdle(); |
| 151 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | |
| 152 base::RunLoop().RunUntilIdle(); | |
| 153 | 152 |
| 154 EXPECT_EQ(data.done, true); | 153 EXPECT_EQ(data.done, true); |
| 155 EXPECT_EQ(data.requested_locale, locale); | 154 EXPECT_EQ(data.requested_locale, locale); |
| 156 EXPECT_EQ(data.loaded_locale, expected_locale); | 155 EXPECT_EQ(data.loaded_locale, expected_locale); |
| 157 EXPECT_EQ(data.success, expect_success); | 156 EXPECT_EQ(data.success, expect_success); |
| 158 } | 157 } |
| 159 | 158 |
| 160 void SetUpCrasAndEnableChromeVox(int volume_percent, bool mute_on) { | 159 void SetUpCrasAndEnableChromeVox(int volume_percent, bool mute_on) { |
| 161 AccessibilityManager* a11y = AccessibilityManager::Get(); | 160 AccessibilityManager* a11y = AccessibilityManager::Get(); |
| 162 CrasAudioHandler* cras = CrasAudioHandler::Get(); | 161 CrasAudioHandler* cras = CrasAudioHandler::Get(); |
| (...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when | 1065 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when |
| 1067 // UI and logic is ready. http://crbug.com/127016 | 1066 // UI and logic is ready. http://crbug.com/127016 |
| 1068 | 1067 |
| 1069 // TODO(dzhioev): Add tests for controller/host pairing flow. | 1068 // TODO(dzhioev): Add tests for controller/host pairing flow. |
| 1070 // http://crbug.com/375191 | 1069 // http://crbug.com/375191 |
| 1071 | 1070 |
| 1072 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 23, | 1071 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 23, |
| 1073 add_tests_for_new_control_flow_you_just_introduced); | 1072 add_tests_for_new_control_flow_you_just_introduced); |
| 1074 | 1073 |
| 1075 } // namespace chromeos | 1074 } // namespace chromeos |
| OLD | NEW |