#include "content/test/test_blink_web_unit_test_support.h"
#include <memory>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/message_loop/message_pump.h"
#include "base/message_loop/message_pump_type.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/null_task_runner.h"
#include "base/test/task_environment.h"
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#include "cc/trees/layer_tree_settings.h"
#include "content/child/child_process.h"
#include "media/base/media.h"
#include "media/media_buildflags.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "net/cookies/cookie_monster.h"
#include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/public/platform/scheduler/web_thread_scheduler.h"
#include "third_party/blink/public/platform/web_connection_type.h"
#include "third_party/blink/public/platform/web_data.h"
#include "third_party/blink/public/platform/web_network_state_notifier.h"
#include "third_party/blink/public/platform/web_runtime_features.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/strings/grit/blink_strings.h"
#include "third_party/blink/public/web/blink.h"
#include "tools/v8_context_snapshot/buildflags.h"
#include "v8/include/v8.h"
#if BUILDFLAG(IS_APPLE)
#include "base/apple/foundation_util.h"
#include "base/apple/scoped_nsautorelease_pool.h"
#endif
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
#include "gin/v8_initializer.h"
#endif
#include "third_party/webrtc/rtc_base/rtc_certificate.h"
WebString;
namespace {
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
#if BUILDFLAG(USE_V8_CONTEXT_SNAPSHOT)
constexpr gin::V8SnapshotFileType kSnapshotType = …;
#else
constexpr gin::V8SnapshotFileType kSnapshotType =
gin::V8SnapshotFileType::kDefault;
#endif
#endif
content::TestBlinkWebUnitTestSupport* g_test_platform = …;
}
namespace content {
TestBlinkWebUnitTestSupport::TestBlinkWebUnitTestSupport(
SchedulerType scheduler_type,
std::string additional_v8_flags) { … }
TestBlinkWebUnitTestSupport::~TestBlinkWebUnitTestSupport() { … }
blink::WebString TestBlinkWebUnitTestSupport::UserAgent() { … }
blink::WebString TestBlinkWebUnitTestSupport::QueryLocalizedString(
int resource_id) { … }
blink::WebString TestBlinkWebUnitTestSupport::QueryLocalizedString(
int resource_id,
const blink::WebString& value) { … }
blink::WebString TestBlinkWebUnitTestSupport::QueryLocalizedString(
int resource_id,
const blink::WebString& value1,
const blink::WebString& value2) { … }
blink::WebString TestBlinkWebUnitTestSupport::DefaultLocale() { … }
scoped_refptr<base::SingleThreadTaskRunner>
TestBlinkWebUnitTestSupport::GetIOTaskRunner() const { … }
bool TestBlinkWebUnitTestSupport::IsThreadedAnimationEnabled() { … }
bool TestBlinkWebUnitTestSupport::SetThreadedAnimationEnabled(bool enabled) { … }
}