| 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" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h" | 41 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h" |
| 42 #include "chrome/browser/chromeos/login/startup_utils.h" | 42 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 43 #include "chrome/browser/chromeos/login/test/wizard_in_process_browser_test.h" | 43 #include "chrome/browser/chromeos/login/test/wizard_in_process_browser_test.h" |
| 44 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 44 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 45 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 45 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
| 46 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" | 46 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" |
| 47 #include "chrome/browser/chromeos/policy/enrollment_config.h" | 47 #include "chrome/browser/chromeos/policy/enrollment_config.h" |
| 48 #include "chrome/browser/chromeos/policy/server_backed_device_state.h" | 48 #include "chrome/browser/chromeos/policy/server_backed_device_state.h" |
| 49 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" | 49 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" |
| 50 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 50 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 51 #include "chrome/browser/profiles/profile_manager.h" |
| 51 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 52 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 52 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 53 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 53 #include "chrome/common/chrome_constants.h" | 54 #include "chrome/common/chrome_constants.h" |
| 54 #include "chrome/common/chrome_paths.h" | 55 #include "chrome/common/chrome_paths.h" |
| 55 #include "chrome/common/chrome_switches.h" | 56 #include "chrome/common/chrome_switches.h" |
| 56 #include "chrome/common/pref_names.h" | 57 #include "chrome/common/pref_names.h" |
| 57 #include "chrome/grit/generated_resources.h" | 58 #include "chrome/grit/generated_resources.h" |
| 58 #include "chromeos/audio/cras_audio_handler.h" | 59 #include "chromeos/audio/cras_audio_handler.h" |
| 59 #include "chromeos/chromeos_switches.h" | 60 #include "chromeos/chromeos_switches.h" |
| 60 #include "chromeos/chromeos_test_utils.h" | 61 #include "chromeos/chromeos_test_utils.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 self->result = result; | 141 self->result = result; |
| 141 self->done = true; | 142 self->done = true; |
| 142 } | 143 } |
| 143 | 144 |
| 144 void RunSwitchLanguageTest(const std::string& locale, | 145 void RunSwitchLanguageTest(const std::string& locale, |
| 145 const std::string& expected_locale, | 146 const std::string& expected_locale, |
| 146 const bool expect_success) { | 147 const bool expect_success) { |
| 147 SwitchLanguageTestData data; | 148 SwitchLanguageTestData data; |
| 148 locale_util::SwitchLanguageCallback callback( | 149 locale_util::SwitchLanguageCallback callback( |
| 149 base::Bind(&OnLocaleSwitched, base::Unretained(&data))); | 150 base::Bind(&OnLocaleSwitched, base::Unretained(&data))); |
| 150 locale_util::SwitchLanguage(locale, true, false, callback); | 151 locale_util::SwitchLanguage(locale, true, false, callback, |
| 152 ProfileManager::GetActiveUserProfile()); |
| 151 | 153 |
| 152 // Token writing moves control to BlockingPool and back. | 154 // Token writing moves control to BlockingPool and back. |
| 153 content::RunAllBlockingPoolTasksUntilIdle(); | 155 content::RunAllBlockingPoolTasksUntilIdle(); |
| 154 | 156 |
| 155 EXPECT_EQ(data.done, true); | 157 EXPECT_EQ(data.done, true); |
| 156 EXPECT_EQ(data.result.requested_locale, locale); | 158 EXPECT_EQ(data.result.requested_locale, locale); |
| 157 EXPECT_EQ(data.result.loaded_locale, expected_locale); | 159 EXPECT_EQ(data.result.loaded_locale, expected_locale); |
| 158 EXPECT_EQ(data.result.success, expect_success); | 160 EXPECT_EQ(data.result.success, expect_success); |
| 159 } | 161 } |
| 160 | 162 |
| (...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when | 1263 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when |
| 1262 // UI and logic is ready. http://crbug.com/127016 | 1264 // UI and logic is ready. http://crbug.com/127016 |
| 1263 | 1265 |
| 1264 // TODO(dzhioev): Add tests for controller/host pairing flow. | 1266 // TODO(dzhioev): Add tests for controller/host pairing flow. |
| 1265 // http://crbug.com/375191 | 1267 // http://crbug.com/375191 |
| 1266 | 1268 |
| 1267 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24, | 1269 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24, |
| 1268 "tests for new control flow are missing"); | 1270 "tests for new control flow are missing"); |
| 1269 | 1271 |
| 1270 } // namespace chromeos | 1272 } // namespace chromeos |
| OLD | NEW |