| 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/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 screen->Start(); | 878 screen->Start(); |
| 879 | 879 |
| 880 // Wait for auto-enrollment controller to encounter the connection error. | 880 // Wait for auto-enrollment controller to encounter the connection error. |
| 881 WaitForAutoEnrollmentState(policy::AUTO_ENROLLMENT_STATE_CONNECTION_ERROR); | 881 WaitForAutoEnrollmentState(policy::AUTO_ENROLLMENT_STATE_CONNECTION_ERROR); |
| 882 | 882 |
| 883 // The error screen shows up if device state could not be retrieved. | 883 // The error screen shows up if device state could not be retrieved. |
| 884 EXPECT_FALSE(StartupUtils::IsOobeCompleted()); | 884 EXPECT_FALSE(StartupUtils::IsOobeCompleted()); |
| 885 EXPECT_EQ(GetErrorScreen(), | 885 EXPECT_EQ(GetErrorScreen(), |
| 886 WizardController::default_controller()->current_screen()); | 886 WizardController::default_controller()->current_screen()); |
| 887 base::DictionaryValue device_state; | 887 base::DictionaryValue device_state; |
| 888 device_state.SetBoolean(policy::kDeviceStateDisabled, true); | 888 device_state.SetString(policy::kDeviceStateRestoreMode, |
| 889 policy::kDeviceStateRestoreModeDisabled); |
| 889 device_state.SetString(policy::kDeviceStateDisabledMessage, kDisabledMessage); | 890 device_state.SetString(policy::kDeviceStateDisabledMessage, kDisabledMessage); |
| 890 g_browser_process->local_state()->Set(prefs::kServerBackedDeviceState, | 891 g_browser_process->local_state()->Set(prefs::kServerBackedDeviceState, |
| 891 device_state); | 892 device_state); |
| 892 EXPECT_CALL(*device_disabled_screen_actor_, Show(kDisabledMessage)).Times(1); | 893 EXPECT_CALL(*device_disabled_screen_actor_, Show(kDisabledMessage)).Times(1); |
| 893 OnExit(BaseScreenDelegate::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED); | 894 OnExit(BaseScreenDelegate::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED); |
| 894 | 895 |
| 895 ResetAutoEnrollmentCheckScreen(); | 896 ResetAutoEnrollmentCheckScreen(); |
| 896 | 897 |
| 897 // Make sure the device disabled screen is shown. | 898 // Make sure the device disabled screen is shown. |
| 898 CheckCurrentScreen(WizardController::kDeviceDisabledScreenName); | 899 CheckCurrentScreen(WizardController::kDeviceDisabledScreenName); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when | 1190 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when |
| 1190 // UI and logic is ready. http://crbug.com/127016 | 1191 // UI and logic is ready. http://crbug.com/127016 |
| 1191 | 1192 |
| 1192 // TODO(dzhioev): Add tests for controller/host pairing flow. | 1193 // TODO(dzhioev): Add tests for controller/host pairing flow. |
| 1193 // http://crbug.com/375191 | 1194 // http://crbug.com/375191 |
| 1194 | 1195 |
| 1195 COMPILE_ASSERT(BaseScreenDelegate::EXIT_CODES_COUNT == 24, | 1196 COMPILE_ASSERT(BaseScreenDelegate::EXIT_CODES_COUNT == 24, |
| 1196 add_tests_for_new_control_flow_you_just_introduced); | 1197 add_tests_for_new_control_flow_you_just_introduced); |
| 1197 | 1198 |
| 1198 } // namespace chromeos | 1199 } // namespace chromeos |
| OLD | NEW |