OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "base/macros.h" | 5 #include "base/macros.h" |
6 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" | 6 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" |
7 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.
h" | 7 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.
h" |
8 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_
impl.h" | 8 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_
impl.h" |
9 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_
mock.h" | 9 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_
mock.h" |
10 #include "chrome/browser/chromeos/login/login_manager_test.h" | 10 #include "chrome/browser/chromeos/login/login_manager_test.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 ASSERT_TRUE(host != nullptr); | 194 ASSERT_TRUE(host != nullptr); |
195 host->StartWizard(OobeScreen::SCREEN_OOBE_ENROLLMENT); | 195 host->StartWizard(OobeScreen::SCREEN_OOBE_ENROLLMENT); |
196 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT).Wait(); | 196 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT).Wait(); |
197 ASSERT_TRUE(enrollment_screen() != nullptr); | 197 ASSERT_TRUE(enrollment_screen() != nullptr); |
198 ASSERT_TRUE(WizardController::default_controller() != nullptr); | 198 ASSERT_TRUE(WizardController::default_controller() != nullptr); |
199 ASSERT_FALSE(StartupUtils::IsOobeCompleted()); | 199 ASSERT_FALSE(StartupUtils::IsOobeCompleted()); |
200 } | 200 } |
201 | 201 |
202 // Helper method to return the current EnrollmentScreen instance. | 202 // Helper method to return the current EnrollmentScreen instance. |
203 EnrollmentScreen* enrollment_screen() { | 203 EnrollmentScreen* enrollment_screen() { |
204 return EnrollmentScreen::Get(WizardController::default_controller()); | 204 return EnrollmentScreen::Get( |
| 205 WizardController::default_controller()->screen_manager()); |
205 } | 206 } |
206 | 207 |
207 private: | 208 private: |
208 static std::vector<OnSetupEnrollmentHelper> enrollment_setup_functions_; | 209 static std::vector<OnSetupEnrollmentHelper> enrollment_setup_functions_; |
209 | 210 |
210 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentTest); | 211 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentTest); |
211 }; | 212 }; |
212 | 213 |
213 std::vector<EnterpriseEnrollmentTest::OnSetupEnrollmentHelper> | 214 std::vector<EnterpriseEnrollmentTest::OnSetupEnrollmentHelper> |
214 EnterpriseEnrollmentTest::enrollment_setup_functions_; | 215 EnterpriseEnrollmentTest::enrollment_setup_functions_; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 EXPECT_TRUE(IsStepDisplayed("ad-join")); | 345 EXPECT_TRUE(IsStepDisplayed("ad-join")); |
345 js_checker().ExpectFalse(std::string(kAdMachineNameInput) + ".isInvalid"); | 346 js_checker().ExpectFalse(std::string(kAdMachineNameInput) + ".isInvalid"); |
346 js_checker().ExpectTrue(std::string(kAdUsernameInput) + ".isInvalid"); | 347 js_checker().ExpectTrue(std::string(kAdUsernameInput) + ".isInvalid"); |
347 js_checker().ExpectFalse(std::string(kAdPasswordInput) + ".isInvalid"); | 348 js_checker().ExpectFalse(std::string(kAdPasswordInput) + ".isInvalid"); |
348 | 349 |
349 // We have to remove the enrollment_helper before the dtor gets called. | 350 // We have to remove the enrollment_helper before the dtor gets called. |
350 enrollment_screen()->enrollment_helper_.reset(); | 351 enrollment_screen()->enrollment_helper_.reset(); |
351 } | 352 } |
352 | 353 |
353 } // namespace chromeos | 354 } // namespace chromeos |
OLD | NEW |