chromium/components/cronet/url_request_context_config_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/cronet/url_request_context_config.h"

#include <memory>
#include <string_view>

#include "base/check.h"
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/json/json_writer.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "base/test/task_environment.h"
#include "base/test/values_test_util.h"
#include "base/values.h"
#include "build/build_config.h"
#include "net/base/features.h"
#include "net/base/host_port_pair.h"
#include "net/base/http_user_agent_settings.h"
#include "net/base/net_errors.h"
#include "net/base/network_isolation_key.h"
#include "net/cert/cert_verifier.h"
#include "net/dns/host_resolver.h"
#include "net/dns/host_resolver_manager.h"
#include "net/http/http_network_session.h"
#include "net/log/net_log_with_source.h"
#include "net/proxy_resolution/proxy_config.h"
#include "net/proxy_resolution/proxy_config_service_fixed.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "testing/gtest/include/gtest/gtest.h"

#if BUILDFLAG(ENABLE_REPORTING)
#include "net/network_error_logging/network_error_logging_service.h"
#include "net/reporting/reporting_service.h"
#endif  // BUILDFLAG(ENABLE_REPORTING)

namespace cronet {

namespace {

std::string WrapJsonHeader(std::string_view value) {}

// Returns whether two JSON-encoded headers contain the same content, ignoring
// irrelevant encoding issues like whitespace and map element ordering.
bool JsonHeaderEquals(std::string_view expected, std::string_view actual) {}

}  // namespace

TEST(URLRequestContextConfigTest, TestExperimentalOptionParsing) {}

TEST(URLRequestContextConfigTest, SetSupportedQuicVersionByAlpn) {}

TEST(URLRequestContextConfigTest, SetUnsupportedQuicVersion) {}

TEST(URLRequestContextConfigTest, SetObsoleteQuicVersion) {}

TEST(URLRequestContextConfigTest, SetQuicServerMigrationOptions) {}

// Tests that goaway_sessions_on_ip_changes can be set on via
// experimental options.
TEST(URLRequestContextConfigTest,
     SetQuicGoAwaySessionsOnIPChangeViaExperimentOptions) {}

TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationV2Options) {}

TEST(URLRequestContextConfigTest, SetQuicAllowPortMigration) {}

TEST(URLRequestContextConfigTest, DisableQuicRetryWithoutAltSvcOnQuicErrors) {}

TEST(URLRequestContextConfigTest, BrokenAlternativeServiceDelayParams1) {}

TEST(URLRequestContextConfigTest, BrokenAlternativeServiceDelayParams2) {}

TEST(URLRequestContextConfigTest, DelayMainJobWithAvailableSpdySession) {}

TEST(URLRequestContextConfigTest, SetDisableTlsZeroRtt) {}

TEST(URLRequestContextConfigTest, SetQuicHostWhitelist) {}

TEST(URLRequestContextConfigTest, SetQuicMaxTimeBeforeCryptoHandshake) {}

TEST(URLURLRequestContextConfigTest, SetQuicConnectionOptions) {}

TEST(URLURLRequestContextConfigTest, SetAcceptLanguageAndUserAgent) {}

TEST(URLURLRequestContextConfigTest, TurningOffQuic) {}

TEST(URLURLRequestContextConfigTest, DefaultEnableQuic) {}

TEST(URLRequestContextConfigTest, SetSpdyGoAwayOnIPChange) {}

TEST(URLRequestContextConfigTest, WrongSpdyGoAwayOnIPChangeValue) {}

TEST(URLRequestContextConfigTest, BidiStreamDetectBrokenConnection) {}

TEST(URLRequestContextConfigTest, WrongBidiStreamDetectBrokenConnectionValue) {}

TEST(URLRequestContextConfigTest, HttpsSvcbOptions) {}

// See stale_host_resolver_unittest.cc for test of StaleDNS options.

}  // namespace cronet