mock_in_session_auth_dialog_client.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_IN_SESSION_AUTH_MOCK_IN_SESSION_AUTH_DIALOG_CLIENT_H_
  5. #define ASH_IN_SESSION_AUTH_MOCK_IN_SESSION_AUTH_DIALOG_CLIENT_H_
  6. #include "ash/public/cpp/in_session_auth_dialog_client.h"
  7. #include "base/callback.h"
  8. #include "testing/gmock/include/gmock/gmock.h"
  9. namespace ash {
  10. class MockInSessionAuthDialogClient : public InSessionAuthDialogClient {
  11. public:
  12. MockInSessionAuthDialogClient();
  13. MockInSessionAuthDialogClient(const MockInSessionAuthDialogClient&) = delete;
  14. MockInSessionAuthDialogClient& operator=(
  15. const MockInSessionAuthDialogClient&) = delete;
  16. ~MockInSessionAuthDialogClient() override;
  17. // InSessionAuthDialogClient:
  18. MOCK_METHOD(void,
  19. AuthenticateUserWithPasswordOrPin,
  20. (const std::string& password,
  21. bool authenticated_by_pin,
  22. base::OnceCallback<void(bool)> callback),
  23. (override));
  24. MOCK_METHOD(bool,
  25. IsFingerprintAuthAvailable,
  26. (const AccountId& account_id),
  27. (override));
  28. MOCK_METHOD(void,
  29. StartFingerprintAuthSession,
  30. (const AccountId& account_id,
  31. base::OnceCallback<void(bool)> callback),
  32. (override));
  33. MOCK_METHOD(void, EndFingerprintAuthSession, (), (override));
  34. MOCK_METHOD(void,
  35. CheckPinAuthAvailability,
  36. (const AccountId& account_id,
  37. base::OnceCallback<void(bool)> callback),
  38. (override));
  39. MOCK_METHOD(void,
  40. AuthenticateUserWithFingerprint,
  41. (base::OnceCallback<void(bool, FingerprintState)> callback),
  42. (override));
  43. MOCK_METHOD(aura::Window*, OpenInSessionAuthHelpPage, (), (const override));
  44. };
  45. } // namespace ash
  46. #endif // ASH_IN_SESSION_AUTH_MOCK_IN_SESSION_AUTH_DIALOG_CLIENT_H_