#include "base/files/file_path.h"
#include "base/values.h"
#include "chrome/test/chromedriver/chrome/status.h"
#include "chrome/test/chromedriver/chrome/stub_web_view.h"
#include "chrome/test/chromedriver/chrome/ui_events.h"
StubWebView::StubWebView(const std::string& id) : … { … }
StubWebView::~StubWebView() { … }
bool StubWebView::IsServiceWorker() const { … }
std::string StubWebView::GetId() { … }
bool StubWebView::WasCrashed() { … }
Status StubWebView::HandleEventsUntil(const ConditionalFunc& conditional_func,
const Timeout& timeout) { … }
Status StubWebView::HandleReceivedEvents() { … }
Status StubWebView::GetUrl(std::string* url) { … }
Status StubWebView::Load(const std::string& url, const Timeout* timeout) { … }
Status StubWebView::Reload(const Timeout* timeout) { … }
Status StubWebView::Freeze(const Timeout* timeout) { … }
Status StubWebView::Resume(const Timeout* timeout) { … }
Status StubWebView::StartBidiServer(std::string bidi_mapper_script) { … }
Status StubWebView::PostBidiCommand(base::Value::Dict command) { … }
Status StubWebView::SendBidiCommand(base::Value::Dict command,
const Timeout& timeout,
base::Value::Dict& response) { … }
Status StubWebView::SendCommand(const std::string& cmd,
const base::Value::Dict& params) { … }
Status StubWebView::SendCommandFromWebSocket(const std::string& cmd,
const base::Value::Dict& params,
const int client_cmd_id) { … }
Status StubWebView::SendCommandAndGetResult(
const std::string& cmd,
const base::Value::Dict& params,
std::unique_ptr<base::Value>* value) { … }
Status StubWebView::TraverseHistory(int delta, const Timeout* timeout) { … }
Status StubWebView::EvaluateScript(const std::string& frame,
const std::string& function,
const bool await_promise,
std::unique_ptr<base::Value>* result) { … }
Status StubWebView::CallFunction(const std::string& frame,
const std::string& function,
const base::Value::List& args,
std::unique_ptr<base::Value>* result) { … }
Status StubWebView::CallUserAsyncFunction(
const std::string& frame,
const std::string& function,
const base::Value::List& args,
const base::TimeDelta& timeout,
std::unique_ptr<base::Value>* result) { … }
Status StubWebView::CallUserSyncScript(const std::string& frame,
const std::string& script,
const base::Value::List& args,
const base::TimeDelta& timeout,
std::unique_ptr<base::Value>* result) { … }
Status StubWebView::GetFrameByFunction(const std::string& frame,
const std::string& function,
const base::Value::List& args,
std::string* out_frame) { … }
Status StubWebView::DispatchMouseEvents(const std::vector<MouseEvent>& events,
const std::string& frame,
bool async_dispatch_events) { … }
Status StubWebView::DispatchTouchEvent(const TouchEvent& event,
bool async_dispatch_events) { … }
Status StubWebView::DispatchTouchEvents(const std::vector<TouchEvent>& events,
bool async_dispatch_events) { … }
Status StubWebView::DispatchTouchEventWithMultiPoints(
const std::vector<TouchEvent>& events,
bool async_dispatch_events) { … }
Status StubWebView::DispatchKeyEvents(const std::vector<KeyEvent>& events,
bool async_dispatch_events) { … }
Status StubWebView::GetCookies(base::Value* cookies,
const std::string& current_page_url) { … }
Status StubWebView::DeleteCookie(const std::string& name,
const std::string& url,
const std::string& domain,
const std::string& path) { … }
Status StubWebView::AddCookie(const std::string& name,
const std::string& url,
const std::string& value,
const std::string& domain,
const std::string& path,
const std::string& same_site,
bool secure,
bool http_only,
double expiry) { … }
Status StubWebView::WaitForPendingNavigations(const std::string& frame_id,
const Timeout& timeout,
bool stop_load_on_timeout) { … }
Status StubWebView::IsPendingNavigation(const Timeout* timeout,
bool* is_pending) const { … }
MobileEmulationOverrideManager* StubWebView::GetMobileEmulationOverrideManager()
const { … }
Status StubWebView::OverrideGeolocation(const Geoposition& geoposition) { … }
Status StubWebView::OverrideNetworkConditions(
const NetworkConditions& network_conditions) { … }
Status StubWebView::OverrideDownloadDirectoryIfNeeded(
const std::string& download_directory) { … }
Status StubWebView::CaptureScreenshot(std::string* screenshot,
const base::Value::Dict& params) { … }
Status StubWebView::PrintToPDF(const base::Value::Dict& params,
std::string* pdf) { … }
Status StubWebView::SetFileInputFiles(const std::string& frame,
const base::Value& element,
const std::vector<base::FilePath>& files,
const bool append) { … }
Status StubWebView::TakeHeapSnapshot(std::unique_ptr<base::Value>* snapshot) { … }
Status StubWebView::StartProfile() { … }
Status StubWebView::EndProfile(std::unique_ptr<base::Value>* profile_data) { … }
Status StubWebView::SynthesizeTapGesture(int x,
int y,
int tap_count,
bool is_long_press) { … }
Status StubWebView::SynthesizeScrollGesture(int x,
int y,
int xoffset,
int yoffset) { … }
bool StubWebView::IsNonBlocking() const { … }
Status StubWebView::GetFedCmTracker(FedCmTracker** out_tracker) { … }
FrameTracker* StubWebView::GetFrameTracker() const { … }
std::unique_ptr<base::Value> StubWebView::GetCastSinks() { … }
std::unique_ptr<base::Value> StubWebView::GetCastIssueMessage() { … }
void StubWebView::SetFrame(const std::string& new_frame_id) { … }
Status StubWebView::GetBackendNodeIdByElement(const std::string& frame,
const base::Value& element,
int* node_id) { … }
bool StubWebView::IsDetached() const { … }
Status StubWebView::CallFunctionWithTimeout(
const std::string& frame,
const std::string& function,
const base::Value::List& args,
const base::TimeDelta& timeout,
std::unique_ptr<base::Value>* result) { … }
bool StubWebView::IsDialogOpen() const { … }
Status StubWebView::GetDialogMessage(std::string& message) const { … }
Status StubWebView::GetTypeOfDialog(std::string& type) const { … }
Status StubWebView::HandleDialog(bool accept,
const std::optional<std::string>& text) { … }