chromium/chrome/browser/net/log_net_log_browsertest.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 <string>
#include <string_view>

#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/json/json_reader.h"
#include "base/path_service.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test.h"
#include "services/network/public/cpp/network_switches.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace chrome_browser_net {
namespace {

// Test fixture for running tests with --log-net-log with no explicit file
// specified.
class LogNetLogTest : public InProcessBrowserTest {};

IN_PROC_BROWSER_TEST_F(LogNetLogTest, Exists) {}

// Test fixture for running tests with --log-net-log, and a parameterized value
// for --net-log-capture-mode.
//
// Asserts that a netlog file was created, appears valid, and stripped cookies
// in accordance to the --net-log-capture-mode flag.
class LogNetLogExplicitFileTest
    : public InProcessBrowserTest,
      public testing::WithParamInterface<const char*> {};

INSTANTIATE_TEST_SUITE_P();

IN_PROC_BROWSER_TEST_P(LogNetLogExplicitFileTest, Basic) {}

}  // namespace

}  // namespace chrome_browser_net