| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 "document.getElementsByClassName('oauth-enroll-state-" + step + | 133 "document.getElementsByClassName('oauth-enroll-state-" + step + |
| 134 "').length"; | 134 "').length"; |
| 135 int count = js_checker().GetInt(js); | 135 int count = js_checker().GetInt(js); |
| 136 return count > 0; | 136 return count > 0; |
| 137 } | 137 } |
| 138 | 138 |
| 139 // Setup the enrollment screen. | 139 // Setup the enrollment screen. |
| 140 void ShowEnrollmentScreen() { | 140 void ShowEnrollmentScreen() { |
| 141 LoginDisplayHost* host = LoginDisplayHost::default_host(); | 141 LoginDisplayHost* host = LoginDisplayHost::default_host(); |
| 142 ASSERT_TRUE(host != nullptr); | 142 ASSERT_TRUE(host != nullptr); |
| 143 host->StartWizard(WizardController::kEnrollmentScreenName); | 143 host->StartWizard(OobeScreen::SCREEN_OOBE_ENROLLMENT); |
| 144 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT).Wait(); | 144 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT).Wait(); |
| 145 ASSERT_TRUE(enrollment_screen() != nullptr); | 145 ASSERT_TRUE(enrollment_screen() != nullptr); |
| 146 ASSERT_TRUE(WizardController::default_controller() != nullptr); | 146 ASSERT_TRUE(WizardController::default_controller() != nullptr); |
| 147 ASSERT_FALSE(StartupUtils::IsOobeCompleted()); | 147 ASSERT_FALSE(StartupUtils::IsOobeCompleted()); |
| 148 } | 148 } |
| 149 | 149 |
| 150 // Helper method to return the current EnrollmentScreen instance. | 150 // Helper method to return the current EnrollmentScreen instance. |
| 151 EnrollmentScreen* enrollment_screen() { | 151 EnrollmentScreen* enrollment_screen() { |
| 152 return EnrollmentScreen::Get(WizardController::default_controller()); | 152 return EnrollmentScreen::Get(WizardController::default_controller()); |
| 153 } | 153 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 EXPECT_FALSE(IsStepDisplayed("success")); | 222 EXPECT_FALSE(IsStepDisplayed("success")); |
| 223 EXPECT_FALSE(IsStepDisplayed("error")); | 223 EXPECT_FALSE(IsStepDisplayed("error")); |
| 224 | 224 |
| 225 SubmitAttributePromptUpdate(); | 225 SubmitAttributePromptUpdate(); |
| 226 | 226 |
| 227 // We have to remove the enrollment_helper before the dtor gets called. | 227 // We have to remove the enrollment_helper before the dtor gets called. |
| 228 enrollment_screen()->enrollment_helper_.reset(); | 228 enrollment_screen()->enrollment_helper_.reset(); |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // namespace chromeos | 231 } // namespace chromeos |
| OLD | NEW |