chromium/components/affiliations/core/browser/affiliation_fetch_throttler_unittest.cc

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

#include "components/affiliations/core/browser/affiliation_fetch_throttler.h"

#include <stddef.h>
#include <stdint.h>

#include <cmath>
#include <memory>

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "base/numerics/safe_math.h"
#include "base/test/task_environment.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
#include "components/affiliations/core/browser/affiliation_fetch_throttler_delegate.h"
#include "services/network/test/test_network_connection_tracker.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace affiliations {
namespace {

class MockAffiliationFetchThrottlerDelegate
    : public AffiliationFetchThrottlerDelegate {};

}  // namespace

class AffiliationFetchThrottlerTest : public testing::Test {};

TEST_F(AffiliationFetchThrottlerTest, SuccessfulRequests) {}

TEST_F(AffiliationFetchThrottlerTest, FailedRequests) {}

TEST_F(AffiliationFetchThrottlerTest, OnCanSendNetworkRequestReturnsFalse) {}

TEST_F(AffiliationFetchThrottlerTest, GracePeriodAfterConnectivityIsRestored) {}

// Same as GracePeriodAfterConnectivityIsRestored, but the network comes back
// just before SignalNetworkRequestNeeded() is called.
TEST_F(AffiliationFetchThrottlerTest, GracePeriodAfterConnectivityIsRestored2) {}

TEST_F(AffiliationFetchThrottlerTest, ConnectivityLostDuringBackoff) {}

TEST_F(AffiliationFetchThrottlerTest,
       ConnectivityLostAndRestoredDuringBackoff) {}

TEST_F(AffiliationFetchThrottlerTest, FlakyConnectivity) {}

TEST_F(AffiliationFetchThrottlerTest, ConnectivityLostDuringRequest) {}

TEST_F(AffiliationFetchThrottlerTest,
       ConnectivityLostAndRestoredDuringRequest) {}

TEST_F(AffiliationFetchThrottlerTest,
       ConnectivityLostAndRestoredDuringRequest2) {}

TEST_F(AffiliationFetchThrottlerTest, InstanceDestroyedWhileInBackoff) {}

}  // namespace affiliations