chromium/content/web_test/renderer/test_runner.cc

// Copyright 2014 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/342213636): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "content/web_test/renderer/test_runner.h"

#include <stddef.h>

#include <algorithm>
#include <clocale>
#include <limits>
#include <string_view>
#include <utility>
#include <vector>

#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/containers/unique_ptr_adapters.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "build/build_config.h"
#include "cc/paint/paint_canvas.h"
#include "cc/paint/skia_paint_canvas.h"
#include "content/public/common/isolated_world_ids.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/renderer/render_thread_impl.h"
#include "content/web_test/common/web_test_constants.h"
#include "content/web_test/common/web_test_string_util.h"
#include "content/web_test/renderer/app_banner_service.h"
#include "content/web_test/renderer/blink_test_helpers.h"
#include "content/web_test/renderer/fake_subresource_filter.h"
#include "content/web_test/renderer/spell_check_client.h"
#include "content/web_test/renderer/test_preferences.h"
#include "content/web_test/renderer/web_frame_test_proxy.h"
#include "gin/arguments.h"
#include "gin/array_buffer.h"
#include "gin/dictionary.h"
#include "gin/handle.h"
#include "gin/object_template_builder.h"
#include "gin/wrappable.h"
#include "mojo/public/mojom/base/text_direction.mojom-forward.h"
#include "net/base/filename_util.h"
#include "printing/metafile_skia.h"
#include "printing/mojom/print.mojom.h"
#include "printing/page_number.h"
#include "printing/page_range.h"
#include "printing/print_settings.h"
#include "services/network/public/mojom/cors.mojom.h"
#include "third_party/blink/public/common/page/page_zoom.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "third_party/blink/public/mojom/app_banner/app_banner.mojom.h"
#include "third_party/blink/public/mojom/clipboard/clipboard.mojom.h"
#include "third_party/blink/public/platform/file_path_conversion.h"
#include "third_party/blink/public/platform/web_cache.h"
#include "third_party/blink/public/platform/web_data.h"
#include "third_party/blink/public/platform/web_isolated_world_info.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url_response.h"
#include "third_party/blink/public/test/frame_widget_test_helper.h"
#include "third_party/blink/public/web/blink.h"
#include "third_party/blink/public/web/web_array_buffer.h"
#include "third_party/blink/public/web/web_array_buffer_converter.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_document_loader.h"
#include "third_party/blink/public/web/web_element_collection.h"
#include "third_party/blink/public/web/web_frame.h"
#include "third_party/blink/public/web/web_frame_widget.h"
#include "third_party/blink/public/web/web_input_element.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_manifest_manager.h"
#include "third_party/blink/public/web/web_print_params.h"
#include "third_party/blink/public/web/web_render_theme.h"
#include "third_party/blink/public/web/web_script_source.h"
#include "third_party/blink/public/web/web_security_policy.h"
#include "third_party/blink/public/web/web_serialized_script_value.h"
#include "third_party/blink/public/web/web_settings.h"
#include "third_party/blink/public/web/web_testing_support.h"
#include "third_party/blink/public/web/web_view.h"
#include "third_party/blink/public/web/web_view_observer.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/color_space.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/test/icc_profiles.h"

#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
#include "third_party/blink/public/platform/web_font_render_style.h"
#endif

namespace content {

namespace {

// TODO(https://github.com/web-platform-tests/wpt/issues/40788): According to
// http://web-platform-tests.org/writing-tests/print-reftests.html the default
// page size for print reftests is 5 by 3 inches. Margins are not mentioned, but
// there are tests that expect them to be 0.5in. Firefox also does this. There
// are 96 CSS pixels per inch, so multiply by that.
const int kWPTPrintWidth =;
const int kWPTPrintHeight =;
const int kWPTPrintMargins =;

// A V8 callback with bound arguments, and the ability to pass additional
// arguments at time of calling Run().
BoundV8Callback;
// Returns an empty set of args for running the BoundV8Callback.
v8::LocalVector<v8::Value> NoV8Args(v8::Isolate* isolate) {}

// Returns 3 arguments, width, height, and an array of pixel values. Takes a
// v8::Context::Scope just to prove one exists in the caller.
v8::LocalVector<v8::Value> ConvertBitmapToV8(
    v8::Isolate* isolate,
    const v8::Context::Scope& context_scope,
    const SkBitmap& bitmap) {}

void ConvertAndSet(gin::Arguments* args, int* set_param) {}

void ConvertAndSet(gin::Arguments* args, bool* set_param) {}

void ConvertAndSet(gin::Arguments* args, blink::WebString* set_param) {}

}  // namespace

class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {};

gin::WrapperInfo TestRunnerBindings::kWrapperInfo =;

// static
void TestRunnerBindings::Install(TestRunner* test_runner,
                                 WebFrameTestProxy* frame,
                                 SpellCheckClient* spell_check,
                                 bool is_wpt_test,
                                 bool is_main_test_window) {}

TestRunnerBindings::TestRunnerBindings(TestRunner* runner,
                                       WebFrameTestProxy* frame,
                                       SpellCheckClient* spell_check)
    :{}

TestRunnerBindings::~TestRunnerBindings() = default;

gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
    v8::Isolate* isolate) {}

BoundV8Callback TestRunnerBindings::WrapV8Callback(
    v8::Local<v8::Function> v8_callback) {}

BoundV8Callback TestRunnerBindings::WrapV8Callback(
    v8::Local<v8::Function> v8_callback,
    v8::LocalVector<v8::Value> args_to_bind) {}

base::OnceClosure TestRunnerBindings::WrapV8Closure(
    v8::Local<v8::Function> v8_callback) {}

base::OnceClosure TestRunnerBindings::WrapV8Closure(
    v8::Local<v8::Function> v8_callback,
    v8::LocalVector<v8::Value> args_to_bind) {}

void TestRunnerBindings::PostV8Callback(v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::PostV8Callback(v8::Local<v8::Function> v8_callback,
                                        v8::LocalVector<v8::Value> args) {}

void TestRunnerBindings::InvokeV8Callback(
    v8::UniquePersistent<v8::Function> callback,
    std::vector<v8::UniquePersistent<v8::Value>> bound_args,
    const v8::LocalVector<v8::Value>& runtime_args) {}

void TestRunnerBindings::LogToStderr(const std::string& output) {}

void TestRunnerBindings::NotifyDone() {}

void TestRunnerBindings::WaitUntilDone() {}

void TestRunnerBindings::QueueBackNavigation(int how_far_back) {}

void TestRunnerBindings::QueueForwardNavigation(int how_far_forward) {}

void TestRunnerBindings::QueueReload() {}

void TestRunnerBindings::QueueLoadingScript(const std::string& script) {}

void TestRunnerBindings::QueueNonLoadingScript(const std::string& script) {}

void TestRunnerBindings::QueueLoad(gin::Arguments* args) {}

void TestRunnerBindings::SetCustomPolicyDelegate(gin::Arguments* args) {}

void TestRunnerBindings::WaitForPolicyDelegate() {}

int TestRunnerBindings::WindowCount() {}

void TestRunnerBindings::SetTabKeyCyclesThroughElements(
    bool tab_key_cycles_through_elements) {}

void TestRunnerBindings::ExecCommand(gin::Arguments* args) {}

void TestRunnerBindings::TriggerTestInspectorIssue(gin::Arguments* args) {}

bool TestRunnerBindings::IsCommandEnabled(const std::string& command) {}

void TestRunnerBindings::SetDomainRelaxationForbiddenForURLScheme(
    bool forbidden,
    const std::string& scheme) {}

void TestRunnerBindings::SetDumpConsoleMessages(bool enabled) {}

void TestRunnerBindings::SetDumpJavaScriptDialogs(bool enabled) {}

void TestRunnerBindings::SetEffectiveConnectionType(
    const std::string& connection_type) {}

std::string TestRunnerBindings::GetWritableDirectory() {}

void TestRunnerBindings::SetFilePathForMockFileDialog(const std::string& path) {}

void TestRunnerBindings::SetMockSpellCheckerEnabled(bool enabled) {}

void TestRunnerBindings::SetSpellCheckResolvedCallback(
    v8::Local<v8::Function> callback) {}

void TestRunnerBindings::RemoveSpellCheckResolvedCallback() {}

v8::Local<v8::Value>
TestRunnerBindings::EvaluateScriptInIsolatedWorldAndReturnValue(
    int world_id,
    const std::string& script) {}

void TestRunnerBindings::EvaluateScriptInIsolatedWorld(
    int world_id,
    const std::string& script) {}

void TestRunnerBindings::EvaluateScriptInOwnTask(
    const std::string& script,
    const std::string& url,
    v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::SetIsolatedWorldInfo(
    int world_id,
    v8::Local<v8::Value> security_origin,
    v8::Local<v8::Value> content_security_policy) {}

void TestRunnerBindings::AddOriginAccessAllowListEntry(
    const std::string& source_origin,
    const std::string& destination_protocol,
    const std::string& destination_host,
    bool allow_destination_subdomains) {}

void TestRunnerBindings::InsertStyleSheet(const std::string& source_code) {}

bool TestRunnerBindings::FindString(
    const std::string& search_text,
    const std::vector<std::string>& options_array) {}

std::string TestRunnerBindings::SelectionAsMarkup() {}

void TestRunnerBindings::SetTextSubpixelPositioning(bool value) {}

void TestRunnerBindings::SetTrustTokenKeyCommitments(
    const std::string& raw_commitments,
    v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::SetMainWindowHidden(bool hidden) {}

void TestRunnerBindings::SetFrameWindowHidden(bool hidden) {}

void TestRunnerBindings::SetWindowRect(const gin::Dictionary& bounds) {}

void TestRunnerBindings::SetTextDirection(const std::string& direction_name) {}

void TestRunnerBindings::EnableAutoResizeMode(int min_width,
                                              int min_height,
                                              int max_width,
                                              int max_height) {}

void TestRunnerBindings::DisableAutoResizeMode(int new_width, int new_height) {}

void TestRunnerBindings::SetMockScreenOrientation(
    const std::string& orientation) {}

void TestRunnerBindings::DisableMockScreenOrientation() {}

void TestRunnerBindings::SetDisallowedSubresourcePathSuffixes(
    std::vector<std::string> suffixes,
    bool block_subresources) {}

void TestRunnerBindings::SetPopupBlockingEnabled(bool block_popups) {}

void TestRunnerBindings::SetJavaScriptCanAccessClipboard(bool can_access) {}

void TestRunnerBindings::SetAllowFileAccessFromFileURLs(bool allow) {}

void TestRunnerBindings::OverridePreference(gin::Arguments* args) {}

void TestRunnerBindings::SetAcceptLanguages(
    const std::string& accept_languages) {}

void TestRunnerBindings::SetPluginsEnabled(bool enabled) {}

void TestRunnerBindings::DumpEditingCallbacks() {}

void TestRunnerBindings::DumpAsMarkup() {}

void TestRunnerBindings::DumpAsText() {}

void TestRunnerBindings::DumpAsTextWithPixelResults() {}

void TestRunnerBindings::DumpAsLayout() {}

void TestRunnerBindings::DumpAsLayoutWithPixelResults() {}

void TestRunnerBindings::DumpChildFrames() {}

void TestRunnerBindings::DumpIconChanges() {}

void TestRunnerBindings::SetAudioData(const gin::ArrayBufferView& view) {}

void TestRunnerBindings::DumpFrameLoadCallbacks() {}

void TestRunnerBindings::DumpPingLoaderCallbacks() {}

void TestRunnerBindings::DumpUserGestureInFrameLoadCallbacks() {}

void TestRunnerBindings::DumpTitleChanges() {}

void TestRunnerBindings::SetCaretBrowsingEnabled() {}

void TestRunnerBindings::SetStorageAllowed(bool allowed) {}

void TestRunnerBindings::SetPluginsAllowed(bool allowed) {}

void TestRunnerBindings::SetAllowRunningOfInsecureContent(bool allowed) {}

void TestRunnerBindings::DumpPermissionClientCallbacks() {}

void TestRunnerBindings::DumpBackForwardList() {}

void TestRunnerBindings::DumpSelectionRect() {}

void TestRunnerBindings::SetPrinting() {}

void TestRunnerBindings::SetPrintingForFrame(const std::string& frame_name) {}

void TestRunnerBindings::SetPrintingSize(int width, int height) {}

void TestRunnerBindings::SetPrintingMargin(int margin) {}

void TestRunnerBindings::SetShouldCenterAndShrinkToFitPaper(bool b) {}

void TestRunnerBindings::SetPrintingScaleFactor(float factor) {}

void TestRunnerBindings::ClearTrustTokenState(
    v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::SetShouldGeneratePixelResults(bool value) {}

void TestRunnerBindings::SetShouldStayOnPageAfterHandlingBeforeUnload(
    bool value) {}

void TestRunnerBindings::SetWillSendRequestClearHeader(
    const std::string& header) {}

void TestRunnerBindings::SetWillSendRequestClearReferrer() {}

void TestRunnerBindings::WaitUntilExternalURLLoad() {}

void TestRunnerBindings::DumpDragImage() {}

void TestRunnerBindings::DumpNavigationPolicy() {}

void TestRunnerBindings::ClearAllDatabases() {}

void TestRunnerBindings::SetDatabaseQuota(int quota) {}

void TestRunnerBindings::SetBlockThirdPartyCookies(bool block) {}

void TestRunnerBindings::SimulateBrowserWindowFocus(bool value) {}

std::string TestRunnerBindings::PathToLocalResource(const std::string& path) {}

void TestRunnerBindings::SetBackingScaleFactor(
    double value,
    v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::SetColorProfile(const std::string& name,
                                         v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::SetBluetoothFakeAdapter(
    const std::string& adapter_name,
    v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::SetBluetoothManualChooser(bool enable) {}

static void GetBluetoothManualChooserEventsReply(
    base::WeakPtr<TestRunnerBindings> test_runner,
    blink::WebLocalFrame* frame,
    BoundV8Callback callback,
    const std::vector<std::string>& events) {}

void TestRunnerBindings::GetBluetoothManualChooserEvents(
    v8::Local<v8::Function> callback) {}

void TestRunnerBindings::SetBrowserHandlesFocus(bool enable) {}

void TestRunnerBindings::SendBluetoothManualChooserEvent(
    const std::string& event,
    const std::string& argument) {}

void TestRunnerBindings::SetPOSIXLocale(const std::string& locale) {}

void TestRunnerBindings::SimulateWebNotificationClick(gin::Arguments* args) {}

void TestRunnerBindings::SimulateWebNotificationClose(const std::string& title,
                                                      bool by_user) {}

void TestRunnerBindings::SimulateWebContentIndexDelete(const std::string& id) {}

void TestRunnerBindings::SetHighlightAds() {}

void TestRunnerBindings::AddWebPageOverlay() {}

void TestRunnerBindings::RemoveWebPageOverlay() {}

void TestRunnerBindings::UpdateAllLifecyclePhasesAndComposite() {}

void TestRunnerBindings::UpdateAllLifecyclePhasesAndCompositeThen(
    v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::SetAnimationRequiresRaster(bool do_raster) {}

static void GetManifestReply(v8::Isolate* isolate,
                             BoundV8Callback callback,
                             const blink::WebURL& manifest_url) {}

void TestRunnerBindings::GetManifestThen(v8::Local<v8::Function> v8_callback) {}

#if BUILDFLAG(ENABLE_PRINTING)
void TestRunnerBindings::CapturePrintingPixelsThen(
    v8::Local<v8::Function> v8_callback) {}
#endif  // BUILDFLAG(ENABLE_PRINTING)

void TestRunnerBindings::CheckForLeakedWindows() {}

void TestRunnerBindings::CopyImageThen(int x,
                                       int y,
                                       v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::DropPointerLock() {}

void TestRunnerBindings::SetPointerLockWillFail() {}

void TestRunnerBindings::SetPointerLockWillRespondAsynchronously() {}

void TestRunnerBindings::AllowPointerLock() {}

void TestRunnerBindings::SetCustomTextOutput(const std::string& output) {}

void TestRunnerBindings::SetPermission(const std::string& name,
                                       const std::string& value,
                                       const std::string& origin,
                                       const std::string& embedding_origin) {}

static void DispatchBeforeInstallPromptEventReply(v8::Isolate* isolate,
                                                  BoundV8Callback callback,
                                                  bool cancelled) {}

void TestRunnerBindings::DispatchBeforeInstallPromptEvent(
    const std::vector<std::string>& event_platforms,
    v8::Local<v8::Function> v8_callback) {}

void TestRunnerBindings::ResolveBeforeInstallPromptPromise(
    const std::string& platform) {}

std::string TestRunnerBindings::PlatformName() {}

void TestRunnerBindings::TextZoomIn() {}

void TestRunnerBindings::TextZoomOut() {}

void TestRunnerBindings::ZoomPageIn() {}

void TestRunnerBindings::ZoomPageOut() {}

void TestRunnerBindings::SetPageZoomFactor(double zoom_factor) {}

std::string TestRunnerBindings::TooltipText() {}

int TestRunnerBindings::WebHistoryItemCount() {}

void TestRunnerBindings::ForceNextWebGLContextCreationToFail() {}

void TestRunnerBindings::FocusDevtoolsSecondaryWindow() {}

void TestRunnerBindings::ForceNextDrawingBufferCreationToFail() {}

void TestRunnerBindings::DisableAutomaticDragDrop() {}

void TestRunnerBindings::GoToOffset(int offset) {}

void TestRunnerBindings::SetRphRegistrationMode(gin::Arguments* args) {}

void TestRunnerBindings::NotImplemented(const gin::Arguments& args) {}

// This class helps track active main windows and when the `blink::WebView` is
// destroyed it will remove it from TestRunner's list.
class TestRunner::MainWindowTracker : public blink::WebViewObserver {};

TestRunner::WorkQueue::WorkQueue(TestRunner* controller)
    :{}

void TestRunner::WorkQueue::Reset() {}

void TestRunner::WorkQueue::AddWork(mojom::WorkItemPtr work_item,
                                    WebFrameTestProxy& source) {}

void TestRunner::WorkQueue::RequestWork(WebFrameTestProxy& source) {}

void TestRunner::WorkQueue::ProcessWorkItem(mojom::WorkItemPtr work_item,
                                            WebFrameTestProxy& source) {}

bool TestRunner::WorkQueue::ProcessWorkItemInternal(
    mojom::WorkItemPtr work_item,
    WebFrameTestProxy& source) {}

void TestRunner::WorkQueue::ReplicateStates(const base::Value::Dict& values,
                                            WebFrameTestProxy& source) {}

void TestRunner::WorkQueue::OnStatesChanged(WebFrameTestProxy& source) {}

TestRunner::TestRunner() :{}

TestRunner::~TestRunner() = default;

void TestRunner::Install(WebFrameTestProxy* frame,
                         SpellCheckClient* spell_check) {}

void TestRunner::Reset() {}

void TestRunner::ResetWebView(blink::WebView* web_view) {}

void TestRunner::ResetWebFrameWidget(blink::WebFrameWidget* web_frame_widget) {}

void TestRunner::SetTestIsRunning(bool running) {}

bool TestRunner::ShouldDumpSelectionRect() const {}

bool TestRunner::ShouldDumpEditingCallbacks() const {}

void TestRunner::SetShouldDumpAsLayout(bool value, WebFrameTestProxy& source) {}

bool TestRunner::ShouldDumpAsCustomText() const {}

std::string TestRunner::CustomDumpText() const {}

void TestRunner::SetCustomTextOutput(const std::string& text,
                                     WebFrameTestProxy& source) {}

bool TestRunner::ShouldGeneratePixelResults() {}

TextResultType TestRunner::ShouldGenerateTextResults() {}

bool TestRunner::ShouldStayOnPageAfterHandlingBeforeUnload() const {}

void TestRunner::SetShouldGeneratePixelResults(bool value,
                                               WebFrameTestProxy& source) {}

bool TestRunner::ShouldDumpAsAudio() const {}

const std::vector<uint8_t>& TestRunner::GetAudioData() const {}

bool TestRunner::IsRecursiveLayoutDumpRequested() {}

bool TestRunner::CanDumpPixelsFromRenderer() const {}

bool TestRunner::IsPrinting() const {}

#if BUILDFLAG(ENABLE_PRINTING)
gfx::Size TestRunner::GetPrintingPageSize(blink::WebLocalFrame* frame) const {}

int TestRunner::GetPrintingMargin() const {}

static std::string GetPageRangesStringFromMetadata(
    blink::WebLocalFrame* frame) {}

printing::PageRanges TestRunner::GetPrintingPageRanges(
    blink::WebLocalFrame* frame) const {}

SkBitmap TestRunner::PrintFrameToBitmap(blink::WebLocalFrame* frame) {}
#endif  // BUILDFLAG(ENABLE_PRINTING)

SkBitmap TestRunner::DumpPixelsInRenderer(blink::WebLocalFrame* main_frame) {}

void TestRunner::ReplicateWebTestRuntimeFlagsChanges(
    const base::Value::Dict& changed_values) {}

bool TestRunner::HasCustomTextDump(std::string* custom_text_dump) const {}

bool TestRunner::ShouldDumpFrameLoadCallbacks() const {}

void TestRunner::SetShouldDumpFrameLoadCallbacks(bool value,
                                                 WebFrameTestProxy& source) {}

bool TestRunner::ShouldDumpPingLoaderCallbacks() const {}

bool TestRunner::ShouldDumpUserGestureInFrameLoadCallbacks() const {}

bool TestRunner::ShouldDumpTitleChanges() const {}

bool TestRunner::ShouldDumpIconChanges() const {}

bool TestRunner::ShouldDumpBackForwardList() const {}

bool TestRunner::ShouldWaitUntilExternalURLLoad() const {}

const std::set<std::string>* TestRunner::HttpHeadersToClear() const {}

bool TestRunner::ClearReferrer() const {}

void TestRunner::AddLoadingFrame(blink::WebLocalFrame* frame) {}

void TestRunner::RemoveLoadingFrame(blink::WebLocalFrame* frame) {}

void TestRunner::OnFrameDeactivated(WebFrameTestProxy& frame) {}

void TestRunner::OnFrameReactivated(WebFrameTestProxy& frame) {}

void TestRunner::FinishTestIfReady(blink::WebLocalFrame& source) {}

void TestRunner::FinishTestIfReady(WebFrameTestProxy& source) {}

void TestRunner::TestFinishedFromSecondaryRenderer(WebFrameTestProxy& source) {}

void TestRunner::ResetRendererAfterWebTest() {}

void TestRunner::AddMainFrame(WebFrameTestProxy& frame) {}

void TestRunner::RemoveMainFrame(WebFrameTestProxy& frame) {}

void TestRunner::PolicyDelegateDone(WebFrameTestProxy& source) {}

bool TestRunner::PolicyDelegateEnabled() const {}

bool TestRunner::PolicyDelegateIsPermissive() const {}

bool TestRunner::PolicyDelegateShouldNotifyDone() const {}

void TestRunner::SetDragImage(const SkBitmap& drag_image) {}

bool TestRunner::ShouldDumpNavigationPolicy() const {}

WebFrameTestProxy* TestRunner::FindInProcessMainWindowMainFrame() {}

void TestRunner::WaitUntilDone(WebFrameTestProxy& source) {}

void TestRunner::NotifyDone(WebFrameTestProxy& source) {}

void TestRunner::QueueBackNavigation(int how_far_back,
                                     WebFrameTestProxy& source) {}

void TestRunner::QueueForwardNavigation(int how_far_forward,
                                        WebFrameTestProxy& source) {}

void TestRunner::QueueReload(WebFrameTestProxy& source) {}

void TestRunner::QueueLoadingScript(const std::string& script,
                                    WebFrameTestProxy& source) {}

void TestRunner::QueueNonLoadingScript(const std::string& script,
                                       WebFrameTestProxy& source) {}

void TestRunner::QueueLoad(const GURL& current_url,
                           const std::string& relative_url,
                           const std::string& target,
                           WebFrameTestProxy& source) {}

void TestRunner::ProcessWorkItem(mojom::WorkItemPtr work_item,
                                 WebFrameTestProxy& source) {}

void TestRunner::ReplicateWorkQueueStates(const base::Value::Dict& values,
                                          WebFrameTestProxy& source) {}

bool TestRunner::IsFrameInMainWindow(blink::WebLocalFrame* frame) {}

void TestRunner::SetMainWindowAndTestConfiguration(
    blink::WebLocalFrame* frame,
    mojom::WebTestRunTestConfigurationPtr config) {}

blink::WebString TestRunner::GetAbsoluteWebStringFromUTF8Path(
    const std::string& utf8_path) {}

const mojom::WebTestRunTestConfiguration& TestRunner::TestConfig() const {}

void TestRunner::OnTestPreferencesChanged(const TestPreferences& test_prefs,
                                          WebFrameTestProxy& frame) {}

void TestRunner::SetCustomPolicyDelegate(gin::Arguments* args,
                                         WebFrameTestProxy& source) {}

void TestRunner::WaitForPolicyDelegate(WebFrameTestProxy& source) {}

int TestRunner::InProcessWindowCount() {}

void TestRunner::AddOriginAccessAllowListEntry(
    const std::string& source_origin,
    const std::string& destination_protocol,
    const std::string& destination_host,
    bool allow_destination_subdomains) {}

void TestRunner::SetTextSubpixelPositioning(bool value) {}

void TestRunner::SetMockScreenOrientation(const std::string& orientation_str,
                                          WebFrameTestProxy& frame) {}

void TestRunner::DisableMockScreenOrientation(blink::WebView* view) {}

void TestRunner::DumpEditingCallbacks(WebFrameTestProxy& source) {}

void TestRunner::DumpAsMarkup(WebFrameTestProxy& source) {}

void TestRunner::DumpAsText(WebFrameTestProxy& source) {}

void TestRunner::DumpAsTextWithPixelResults(WebFrameTestProxy& source) {}

void TestRunner::DumpAsLayout(WebFrameTestProxy& source) {}

void TestRunner::DumpAsLayoutWithPixelResults(WebFrameTestProxy& source) {}

void TestRunner::DumpChildFrames(WebFrameTestProxy& source) {}

void TestRunner::DumpIconChanges(WebFrameTestProxy& source) {}

void TestRunner::SetAudioData(const gin::ArrayBufferView& view) {}

void TestRunner::DumpFrameLoadCallbacks(WebFrameTestProxy& source) {}

void TestRunner::DumpPingLoaderCallbacks(WebFrameTestProxy& source) {}

void TestRunner::DumpUserGestureInFrameLoadCallbacks(
    WebFrameTestProxy& source) {}

void TestRunner::DumpTitleChanges(WebFrameTestProxy& source) {}

void TestRunner::SetStorageAllowed(bool allowed, WebFrameTestProxy& source) {}

void TestRunner::SetAllowRunningOfInsecureContent(bool allowed,
                                                  WebFrameTestProxy& source) {}

void TestRunner::DumpPermissionClientCallbacks(WebFrameTestProxy& source) {}

void TestRunner::DumpBackForwardList() {}

void TestRunner::DumpSelectionRect(WebFrameTestProxy& source) {}

void TestRunner::SetPrinting(WebFrameTestProxy& source) {}

void TestRunner::SetPrintingForFrame(const std::string& frame_name,
                                     WebFrameTestProxy& source) {}

void TestRunner::SetPrintingSize(int width,
                                 int height,
                                 WebFrameTestProxy& source) {}

void TestRunner::SetPrintingMargin(int size, WebFrameTestProxy& source) {}

void TestRunner::SetShouldStayOnPageAfterHandlingBeforeUnload(
    bool value,
    WebFrameTestProxy& source) {}

void TestRunner::SetWillSendRequestClearHeader(const std::string& header) {}

void TestRunner::SetWillSendRequestClearReferrer() {}

void TestRunner::WaitUntilExternalURLLoad(WebFrameTestProxy& source) {}

void TestRunner::DumpDragImage(WebFrameTestProxy& source) {}

void TestRunner::DumpNavigationPolicy(WebFrameTestProxy& source) {}

void TestRunner::SetDumpConsoleMessages(bool value, WebFrameTestProxy& source) {}

void TestRunner::SetIsWebPlatformTestsMode(WebFrameTestProxy& source) {}

bool TestRunner::IsWebPlatformTestsMode() const {}

void TestRunner::SetDumpJavaScriptDialogs(bool value,
                                          WebFrameTestProxy& source) {}

void TestRunner::SetEffectiveConnectionType(
    blink::WebEffectiveConnectionType connection_type) {}

bool TestRunner::ShouldDumpConsoleMessages() const {}

void TestRunner::PrintMessage(const std::string& message,
                              WebFrameTestProxy& source) {}

blink::WebString TestRunner::RegisterIsolatedFileSystem(
    const std::vector<base::FilePath>& file_paths,
    WebFrameTestProxy& source) {}

void TestRunner::FocusWindow(RenderFrame* main_frame, bool focus) {}

void TestRunner::SetAnimationRequiresRaster(bool do_raster) {}

void TestRunner::OnWebTestRuntimeFlagsChanged(WebFrameTestProxy& source) {}

void TestRunner::FinishTest(WebFrameTestProxy& source) {}

mojom::WebTestBluetoothFakeAdapterSetter&
TestRunner::GetBluetoothFakeAdapterSetter() {}

void TestRunner::HandleBluetoothFakeAdapterSetterDisconnected() {}

void TestRunner::DisableAutomaticDragDrop(WebFrameTestProxy& source) {}

bool TestRunner::AutomaticDragDropEnabled() {}

const WebTestRuntimeFlags& TestRunner::GetFlags() {}

}  // namespace content