chromium/chrome/browser/subresource_filter/subresource_filter_devtools_browsertest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <string>

#include "base/json/json_string_value_serializer.h"
#include "base/values.h"
#include "chrome/browser/subresource_filter/subresource_filter_browser_test_harness.h"
#include "chrome/common/chrome_features.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/subresource_filter/core/browser/subresource_filter_constants.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/devtools_agent_host_client.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

namespace subresource_filter {

namespace {

class TestClient : public content::DevToolsAgentHostClient {};

class ScopedDevtoolsOpener {};

}  // namespace

class SubresourceFilterDevtoolsBrowserTest
    : public SubresourceFilterBrowserTest {};

IN_PROC_BROWSER_TEST_F(SubresourceFilterDevtoolsBrowserTest,
                       ForceActivation_RequiresDevtools) {}

IN_PROC_BROWSER_TEST_F(SubresourceFilterListInsertingBrowserTest,
                       WarningSiteWithForceActivation_LogsWarning) {}

IN_PROC_BROWSER_TEST_F(SubresourceFilterDevtoolsBrowserTest,
                       ForceActivation_SubresourceLogging) {}

class SubresourceFilterDevtoolsBrowserTestWithSitePerProcess
    : public SubresourceFilterDevtoolsBrowserTest {};

// See crbug.com/813197, where agent hosts from subframes could send messages to
// disable ad blocking when they are detached (e.g. when the subframe goes
// away).
IN_PROC_BROWSER_TEST_F(SubresourceFilterDevtoolsBrowserTestWithSitePerProcess,
                       IsolatedSubframe_DoesNotSendAdBlockingMessages) {}

}  // namespace subresource_filter