chromium/content/web_test/renderer/blink_test_helpers.cc

// Copyright 2012 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/web_test/renderer/blink_test_helpers.h"

#include <string_view>

#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "content/public/common/content_switches.h"
#include "content/web_test/common/web_test_switches.h"
#include "content/web_test/renderer/test_preferences.h"
#include "net/base/filename_util.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "ui/display/display.h"

#if BUILDFLAG(IS_MAC)
#include "base/apple/bundle_locations.h"
#include "base/apple/foundation_util.h"
#endif

WebURL;

namespace {

constexpr std::string_view kFileScheme =;

base::FilePath GetWebTestsFilePath() {}

base::FilePath GetExternalWPTFilePath() {}

// WPT tests use absolute path links such as
//   <script src="/resources/testharness.js">.
// If we load the tests as local files (e.g. when we run
// `content_shell --run-web-tests manually for testing or debugging), such
// links don't work. This function fixes this issue by rewriting file: URLs
// which were produced from such links so that they point actual files under
// the WPT test directory.
//
// Note that this doesn't apply when the WPT tests are run by the python script.
WebURL RewriteWPTAbsolutePath(std::string_view utf8_url) {}

}  // namespace

namespace content {

void ExportWebTestSpecificPreferences(const TestPreferences& from,
                                      blink::web_pref::WebPreferences* to) {}

static base::FilePath GetBuildDirectory() {}

WebURL RewriteWebTestsURL(std::string_view utf8_url, bool is_wpt_mode) {}

WebURL RewriteFileURLToLocalResource(std::string_view resource) {}

bool IsWebPlatformTest(std::string_view test_url) {}

}  // namespace content