chromium/net/reporting/reporting_endpoint_manager_unittest.cc

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

#include "net/reporting/reporting_endpoint_manager.h"

#include <optional>
#include <string>

#include "base/memory/raw_ptr.h"
#include "base/strings/stringprintf.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/time/time.h"
#include "base/unguessable_token.h"
#include "net/base/backoff_entry.h"
#include "net/base/isolation_info.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/schemeful_site.h"
#include "net/reporting/reporting_cache.h"
#include "net/reporting/reporting_endpoint.h"
#include "net/reporting/reporting_policy.h"
#include "net/reporting/reporting_target_type.h"
#include "net/reporting/reporting_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"

namespace net {
namespace {

class TestReportingCache : public ReportingCache {};

class ReportingEndpointManagerTest : public testing::Test {};

TEST_F(ReportingEndpointManagerTest, NoEndpoint) {}

TEST_F(ReportingEndpointManagerTest, DeveloperEndpoint) {}

TEST_F(ReportingEndpointManagerTest, EnterpriseEndpoint) {}

TEST_F(ReportingEndpointManagerTest, BackedOffEndpoint) {}

// Make sure that multiple endpoints will all be returned at some point, to
// avoid accidentally or intentionally implementing any priority ordering.
TEST_F(ReportingEndpointManagerTest, RandomEndpoint) {}

TEST_F(ReportingEndpointManagerTest, Priority) {}

// Note: This test depends on the deterministic mock RandIntCallback set up in
// TestReportingContext, which returns consecutive integers starting at 0
// (modulo the requested range, plus the requested minimum).
TEST_F(ReportingEndpointManagerTest, Weight) {}

TEST_F(ReportingEndpointManagerTest, ZeroWeights) {}

// Check that ReportingEndpointManager distinguishes NetworkAnonymizationKeys.
TEST_F(ReportingEndpointManagerTest, NetworkAnonymizationKey) {}

TEST_F(ReportingEndpointManagerTest,
       NetworkAnonymizationKeyWithMultipleEndpoints) {}

TEST_F(ReportingEndpointManagerTest, CacheEviction) {}

}  // namespace
}  // namespace net