#include "components/manta/base_provider_test_helper.h"
#include "base/strings/stringprintf.h"
#include "components/endpoint_fetcher/endpoint_fetcher.h"
#include "components/manta/base_provider.h"
#include "components/manta/manta_service_callbacks.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/signin/public/identity_manager/identity_test_environment.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
namespace manta {
namespace {
constexpr base::TimeDelta kMockTimeout = …;
constexpr char kMockOAuthConsumerName[] = …;
constexpr char kMockScope[] = …;
constexpr char kMockEndpoint[] = …;
constexpr char kHttpMethod[] = …;
constexpr char kMockContentType[] = …;
constexpr char kEmail[] = …;
}
FakeBaseProvider::FakeBaseProvider(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
signin::IdentityManager* identity_manager)
: … { … }
FakeBaseProvider::~FakeBaseProvider() = default;
void FakeBaseProvider::RequestInternal(
const GURL& url,
const std::string& oauth_consumer_name,
const net::NetworkTrafficAnnotationTag& annotation_tag,
manta::proto::Request& request,
const MantaMetricType metric_type,
MantaProtoResponseCallback done_callback) { … }
BaseProviderTest::BaseProviderTest()
: … { … }
BaseProviderTest::~BaseProviderTest() = default;
void BaseProviderTest::SetUp() { … }
void BaseProviderTest::SetEndpointMockResponse(
const GURL& request_url,
const std::string& response_data,
net::HttpStatusCode response_code,
net::Error error) { … }
}