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