Friedrich Horschig | d909251 | 2024-07-11 09:46:06 | [diff] [blame] | 1 | // Copyright 2024 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef COMPONENTS_WEBAUTHN_ANDROID_MOCK_WEBAUTHN_CRED_MAN_DELEGATE_H_ |
| 6 | #define COMPONENTS_WEBAUTHN_ANDROID_MOCK_WEBAUTHN_CRED_MAN_DELEGATE_H_ |
| 7 | |
Adem Derinel | a5b0c1a6 | 2025-01-14 11:17:43 | [diff] [blame] | 8 | #include "base/functional/callback.h" |
Friedrich Horschig | d909251 | 2024-07-11 09:46:06 | [diff] [blame] | 9 | #include "components/webauthn/android/webauthn_cred_man_delegate.h" |
| 10 | #include "testing/gmock/include/gmock/gmock.h" |
| 11 | |
| 12 | namespace webauthn { |
| 13 | |
| 14 | class MockWebAuthnCredManDelegate : public WebAuthnCredManDelegate { |
| 15 | public: |
| 16 | MockWebAuthnCredManDelegate(); |
| 17 | ~MockWebAuthnCredManDelegate() override; |
| 18 | |
| 19 | MOCK_METHOD(WebAuthnCredManDelegate::State, |
| 20 | HasPasskeys, |
| 21 | (), |
| 22 | (const, override)); |
| 23 | |
| 24 | MOCK_METHOD(void, |
| 25 | TriggerCredManUi, |
| 26 | (WebAuthnCredManDelegate::RequestPasswords), |
| 27 | (override)); |
| 28 | |
| 29 | MOCK_METHOD(void, |
| 30 | SetRequestCompletionCallback, |
| 31 | (base::RepeatingCallback<void(bool)>), |
| 32 | (override)); |
| 33 | }; |
| 34 | |
| 35 | } // namespace webauthn |
| 36 | |
| 37 | #endif // COMPONENTS_WEBAUTHN_ANDROID_MOCK_WEBAUTHN_CRED_MAN_DELEGATE_H_ |