OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <memory> | 5 #include <memory> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 | 136 |
137 IN_PROC_BROWSER_TEST_F(DeviceDisablingTest, DisableDuringNormalOperation) { | 137 IN_PROC_BROWSER_TEST_F(DeviceDisablingTest, DisableDuringNormalOperation) { |
138 // Mark the device as disabled and wait until cros settings update. | 138 // Mark the device as disabled and wait until cros settings update. |
139 MarkDisabledAndWaitForPolicyFetch(); | 139 MarkDisabledAndWaitForPolicyFetch(); |
140 | 140 |
141 // Verify that the device disabled screen is being shown. | 141 // Verify that the device disabled screen is being shown. |
142 WizardController* const wizard_controller = | 142 WizardController* const wizard_controller = |
143 WizardController::default_controller(); | 143 WizardController::default_controller(); |
144 ASSERT_TRUE(wizard_controller); | 144 ASSERT_TRUE(wizard_controller); |
145 EXPECT_EQ(wizard_controller->GetScreen( | 145 EXPECT_EQ(wizard_controller->GetScreen(OobeScreen::SCREEN_DEVICE_DISABLED), |
146 WizardController::kDeviceDisabledScreenName), | |
147 wizard_controller->current_screen()); | 146 wizard_controller->current_screen()); |
148 } | 147 } |
149 | 148 |
150 // Verifies that device disabling works when the ephemeral users policy is | 149 // Verifies that device disabling works when the ephemeral users policy is |
151 // enabled. This case warrants its own test because the UI behaves somewhat | 150 // enabled. This case warrants its own test because the UI behaves somewhat |
152 // differently when the policy is set: A background job runs on startup that | 151 // differently when the policy is set: A background job runs on startup that |
153 // causes the UI to try and show the login screen after some delay. It must | 152 // causes the UI to try and show the login screen after some delay. It must |
154 // be ensured that the login screen does not show and does not clobber the | 153 // be ensured that the login screen does not show and does not clobber the |
155 // disabled screen. | 154 // disabled screen. |
156 IN_PROC_BROWSER_TEST_F(DeviceDisablingTest, DisableWithEphemeralUsers) { | 155 IN_PROC_BROWSER_TEST_F(DeviceDisablingTest, DisableWithEphemeralUsers) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 base::RunLoop().RunUntilIdle(); | 212 base::RunLoop().RunUntilIdle(); |
214 | 213 |
215 // Verify that the offline error screen was not shown and the device disabled | 214 // Verify that the offline error screen was not shown and the device disabled |
216 // screen is still being shown instead. | 215 // screen is still being shown instead. |
217 EXPECT_EQ(GetOobeScreenName(OobeScreen::SCREEN_DEVICE_DISABLED), | 216 EXPECT_EQ(GetOobeScreenName(OobeScreen::SCREEN_DEVICE_DISABLED), |
218 GetCurrentScreenName(web_contents)); | 217 GetCurrentScreenName(web_contents)); |
219 } | 218 } |
220 | 219 |
221 } // namespace system | 220 } // namespace system |
222 } // namespace chromeos | 221 } // namespace chromeos |
OLD | NEW |