| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_MO
CK_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_MO
CK_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_MO
CK_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_MO
CK_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.
h" | 10 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.
h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 | 15 |
| 16 // Mocks out EnterpriseEnrollmentHelper. | 16 // Mocks out EnterpriseEnrollmentHelper. |
| 17 class EnterpriseEnrollmentHelperMock : public EnterpriseEnrollmentHelper { | 17 class EnterpriseEnrollmentHelperMock : public EnterpriseEnrollmentHelper { |
| 18 public: | 18 public: |
| 19 explicit EnterpriseEnrollmentHelperMock( | 19 explicit EnterpriseEnrollmentHelperMock( |
| 20 EnrollmentStatusConsumer* status_consumer); | 20 EnrollmentStatusConsumer* status_consumer); |
| 21 ~EnterpriseEnrollmentHelperMock() override; | 21 ~EnterpriseEnrollmentHelperMock() override; |
| 22 | 22 |
| 23 EnrollmentStatusConsumer* status_consumer(); | 23 EnrollmentStatusConsumer* status_consumer(); |
| 24 void TryEnrollment(); |
| 24 | 25 |
| 25 MOCK_METHOD2(EnrollUsingAuthCode, | 26 MOCK_METHOD2(EnrollUsingAuthCode, |
| 26 void(const std::string& auth_code, bool fetch_additional_token)); | 27 void(const std::string& auth_code, bool fetch_additional_token)); |
| 27 MOCK_METHOD1(EnrollUsingToken, void(const std::string& token)); | 28 MOCK_METHOD1(EnrollUsingToken, void(const std::string& token)); |
| 28 MOCK_METHOD0(EnrollUsingAttestation, void()); | 29 MOCK_METHOD0(EnrollUsingAttestation, void()); |
| 29 MOCK_METHOD0(GetDeviceAttributeUpdatePermission, void()); | 30 MOCK_METHOD0(GetDeviceAttributeUpdatePermission, void()); |
| 30 MOCK_METHOD2(UpdateDeviceAttributes, | 31 MOCK_METHOD2(UpdateDeviceAttributes, |
| 31 void(const std::string& asset_id, const std::string& location)); | 32 void(const std::string& asset_id, const std::string& location)); |
| 32 MOCK_METHOD1(ClearAuth, void(const base::Closure& callback)); | 33 MOCK_METHOD1(ClearAuth, void(const base::Closure& callback)); |
| 34 |
| 35 static bool should_enroll; |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 } // namespace chromeos | 38 } // namespace chromeos |
| 36 | 39 |
| 37 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER
_MOCK_H_ | 40 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER
_MOCK_H_ |
| OLD | NEW |