chromium/content/browser/network_service_instance_impl_unittest.cc

// Copyright 2022 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/network_service_instance_impl.h"

#include <stdint.h>

#include "base/command_line.h"
#include "base/no_destructor.h"
#include "base/strings/string_number_conversions.h"
#include "content/public/browser/network_service_instance.h"
#include "content/public/common/content_client.h"
#include "content/public/test/browser_task_environment.h"
#include "content/test/test_content_browser_client.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace content {

namespace {

// A leaky class that overrides Content Browser Client to say that shutdown has
// started.
class EarlyShutdownTestContentBrowserClient : public TestContentBrowserClient {};

}  // namespace

// This test exists as a regression test for https://crbug.com/1369808.
class NetworkServiceShutdownRaceTest : public testing::Test {};

// This should not crash.
TEST_F(NetworkServiceShutdownRaceTest, CreateNetworkContextDuringShutdown) {}

TEST(NetworkServiceInstanceImplParseCommandLineTest,
     ParseNetLogMaximumFileNoSwitch) {}

TEST(NetworkServiceInstanceImplParseCommandLineTest,
     ParseNetLogMaximumFileSizeZero) {}

TEST(NetworkServiceInstanceImplParseCommandLineTest,
     ParseNetLogMaximumFileSizeSmall) {}

// Regression test for <https://crbug.com/352496169>.
TEST(NetworkServiceInstanceImplParseCommandLineTest,
     ParseNetLogMaximumFileSizeLargeButInRange) {}

TEST(NetworkServiceInstanceImplParseCommandLineTest,
     ParseNetLogMaximumFileSizeTooLarge) {}

TEST(NetworkServiceInstanceImplParseCommandLineTest,
     ParseNetLogMaximumFileSizeNotNumeric) {}

}  // namespace content