chromium/chrome/browser/user_bypass/user_bypass_web_contents_observer_browsertest.cc

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

#include "chrome/browser/user_bypass/user_bypass_web_contents_observer.h"

#include "base/memory/raw_ptr.h"
#include "base/strings/strcat.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "chrome/test/base/chrome_test_utils.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/common/features.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/render_frame_host_test_support.h"
#include "net/base/features.h"
#include "net/dns/mock_host_resolver.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

namespace user_bypass {

namespace {
constexpr char kUserBypassEnabledHost[] =;
constexpr char kUserBypassDisabledHost[] =;
constexpr char kArbitraryPage[] =;
}  // anonymous namespace

class UserBypassWebContentsObserverBrowserTest : public InProcessBrowserTest {};

IN_PROC_BROWSER_TEST_F(UserBypassWebContentsObserverBrowserTest,
                       LoadUserBypassWithDisabledState) {}

// Ensures we can enable Blink Runtime-Enabled Feature (BREF) per top-level
// frame's user-specified content settings for User Bypass.
IN_PROC_BROWSER_TEST_F(UserBypassWebContentsObserverBrowserTest,
                       LoadUserBypassWithEnabledState) {}

// Similar to |LoadUserBypassWithEnabledState| but makes sure the BREF's desired
// state is as expected even with redirects.
IN_PROC_BROWSER_TEST_F(UserBypassWebContentsObserverBrowserTest,
                       LoadUserBypassWithEnabledStateOnRedirectedNavigation) {}

}  // namespace user_bypass