chromium/content/browser/client_hints/client_hints_unittest.cc

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

#include "content/browser/client_hints/client_hints.h"

#include "base/memory/raw_ptr.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "content/public/test/mock_client_hints_controller_delegate.h"
#include "content/public/test/test_browser_context.h"
#include "content/test/test_render_frame_host.h"
#include "content/test/test_render_view_host.h"
#include "content/test/test_web_contents.h"
#include "net/http/http_response_headers.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "services/network/public/cpp/client_hints.h"
#include "services/network/public/cpp/is_potentially_trustworthy.h"

namespace content {

namespace {

ClientHintsVector;
WebClientHintsType;

}  // namespace

class ClientHintsTest : public RenderViewHostImplTestHarness {};

TEST_F(ClientHintsTest, RttRoundedOff) {}

TEST_F(ClientHintsTest, DownlinkRoundedOff) {}

// Verify that the value of RTT after adding noise is within approximately 10%
// of the original value. Note that the difference between the final value of
// RTT and the original value may be slightly more than 10% due to rounding off.
// To handle that, the maximum absolute difference allowed is set to a value
// slightly larger than 10% of the original metric value.
TEST_F(ClientHintsTest, FinalRttWithin10PercentValue) {}

// Verify that the value of downlink after adding noise is within approximately
// 10% of the original value. Note that the difference between the final value
// of downlink and the original value may be slightly more than 10% due to
// rounding off. To handle that, the maximum absolute difference allowed is set
// to a value slightly larger than 10% of the original metric value.
TEST_F(ClientHintsTest, FinalDownlinkWithin10PercentValue) {}

TEST_F(ClientHintsTest, RttMaxValue) {}

TEST_F(ClientHintsTest, DownlinkMaxValue) {}

TEST_F(ClientHintsTest, RttRandomized) {}

TEST_F(ClientHintsTest, DownlinkRandomized) {}

TEST_F(ClientHintsTest, IntegrationTestsOnParseLookUp) {}

TEST_F(ClientHintsTest, SubFrame) {}

}  // namespace content