Commit c8a29b4e authored by Nela Kaczmarek's avatar Nela Kaczmarek Committed by Commit Bot

Move MockAffiliationFetcherDelegate to a new file.

This change moves the implementation of MockAffiliationFetcherDelegate from affiliation_fetcher_unittest.cc to mock_affiliation_fetcher_delegate.h.
It is required to use the instance of MockAffiliationFetcherDelegate in the unit tests of HashAffiliationFetcher yet to be implemented.

Bug: 1108279
Change-Id: I902cc13f1c66bc079a28b76d904353196a1cb157
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2426584Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Nela Kaczmarek <nelakaczmarek@google.com>
Cr-Commit-Position: refs/heads/master@{#810681}
parent ccc55de6
...@@ -486,6 +486,8 @@ static_library("test_support") { ...@@ -486,6 +486,8 @@ static_library("test_support") {
"android_affiliation/mock_affiliation_consumer.h", "android_affiliation/mock_affiliation_consumer.h",
"android_affiliation/mock_affiliation_fetcher.cc", "android_affiliation/mock_affiliation_fetcher.cc",
"android_affiliation/mock_affiliation_fetcher.h", "android_affiliation/mock_affiliation_fetcher.h",
"android_affiliation/mock_affiliation_fetcher_delegate.cc",
"android_affiliation/mock_affiliation_fetcher_delegate.h",
"fake_form_fetcher.cc", "fake_form_fetcher.cc",
"fake_form_fetcher.h", "fake_form_fetcher.h",
"mock_bulk_leak_check_service.cc", "mock_bulk_leak_check_service.cc",
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/password_manager/core/browser/android_affiliation/mock_affiliation_fetcher_delegate.h"
namespace password_manager {
MockAffiliationFetcherDelegate::MockAffiliationFetcherDelegate() = default;
MockAffiliationFetcherDelegate::~MockAffiliationFetcherDelegate() = default;
} // namespace password_manager
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_ANDROID_AFFILIATION_MOCK_AFFILIATION_FETCHER_DELEGATE_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_ANDROID_AFFILIATION_MOCK_AFFILIATION_FETCHER_DELEGATE_H_
#include <memory>
#include <vector>
#include "components/password_manager/core/browser/android_affiliation/affiliation_fetcher_delegate.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace password_manager {
class MockAffiliationFetcherDelegate : public AffiliationFetcherDelegate {
public:
MockAffiliationFetcherDelegate();
~MockAffiliationFetcherDelegate() override;
MOCK_METHOD(void,
OnFetchSucceeded,
(std::unique_ptr<Result> result),
(override));
MOCK_METHOD(void, OnFetchFailed, (), (override));
MOCK_METHOD(void, OnMalformedResponse, (), (override));
};
} // namespace password_manager
#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_ANDROID_AFFILIATION_MOCK_AFFILIATION_FETCHER_DELEGATE_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment