chromium/components/domain_reliability/test_util.h

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_DOMAIN_RELIABILITY_TEST_UTIL_H_
#define COMPONENTS_DOMAIN_RELIABILITY_TEST_UTIL_H_

#include <memory>

#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
#include "components/domain_reliability/config.h"
#include "components/domain_reliability/scheduler.h"
#include "components/domain_reliability/uploader.h"
#include "components/domain_reliability/util.h"
#include "net/base/host_port_pair.h"
#include "url/gurl.h"

namespace net {
class NetworkAnonymizationKey;
}  // namespace net

namespace domain_reliability {

// A simple test callback that remembers whether it's been called.
class TestCallback {};

class MockUploader : public DomainReliabilityUploader {};

class MockTime;

class MockTickClock : public base::TickClock {};

class MockTime : public MockableTime {};

std::unique_ptr<DomainReliabilityConfig> MakeTestConfig();
std::unique_ptr<DomainReliabilityConfig> MakeTestConfigWithOrigin(
    const url::Origin& origin);
DomainReliabilityScheduler::Params MakeTestSchedulerParams();

}  // namespace domain_reliability

#endif  // COMPONENTS_DOMAIN_RELIABILITY_TEST_UTIL_H_