summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebDriver
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-06 01:12:49 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-06 08:54:33 +0100
commit57dc179b1fce5d4b7171311b04667debfe693095 (patch)
treea459d1aef92dc4e49bbf03b32621b1e7e30d4e64 /Userland/Libraries/LibWeb/WebDriver
parent6e19ab2bbce0b113b628e6f8e9b5c0640053933e (diff)
downloadserenity-57dc179b1fce5d4b7171311b04667debfe693095.zip
Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
Diffstat (limited to 'Userland/Libraries/LibWeb/WebDriver')
-rw-r--r--Userland/Libraries/LibWeb/WebDriver/Client.cpp8
-rw-r--r--Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/WebDriver/Client.cpp b/Userland/Libraries/LibWeb/WebDriver/Client.cpp
index 175e6bc87f..05e1d0564a 100644
--- a/Userland/Libraries/LibWeb/WebDriver/Client.cpp
+++ b/Userland/Libraries/LibWeb/WebDriver/Client.cpp
@@ -106,7 +106,7 @@ static constexpr auto s_webdriver_endpoints = Array {
// https://w3c.github.io/webdriver/#dfn-match-a-request
static ErrorOr<MatchedRoute, Error> match_route(HTTP::HttpRequest const& request)
{
- dbgln_if(WEBDRIVER_DEBUG, "match_route({}, {})", HTTP::to_string(request.method()), request.resource());
+ dbgln_if(WEBDRIVER_DEBUG, "match_route({}, {})", HTTP::to_deprecated_string(request.method()), request.resource());
auto request_path = request.resource().view();
Vector<StringView> parameters;
@@ -125,7 +125,7 @@ static ErrorOr<MatchedRoute, Error> match_route(HTTP::HttpRequest const& request
};
for (auto const& route : s_webdriver_endpoints) {
- dbgln_if(WEBDRIVER_DEBUG, "- Checking {} {}", HTTP::to_string(route.method), route.path);
+ dbgln_if(WEBDRIVER_DEBUG, "- Checking {} {}", HTTP::to_deprecated_string(route.method), route.path);
if (route.method != request.method())
continue;
@@ -252,7 +252,7 @@ ErrorOr<void, Client::WrappedError> Client::handle_request(JsonValue body)
if constexpr (WEBDRIVER_DEBUG) {
dbgln("Got HTTP request: {} {}", m_request->method_name(), m_request->resource());
if (!body.is_null())
- dbgln("Body: {}", body.to_string());
+ dbgln("Body: {}", body.to_deprecated_string());
}
auto const& [handler, parameters] = TRY(match_route(*m_request));
@@ -325,7 +325,7 @@ ErrorOr<void, Client::WrappedError> Client::send_error_response(Error const& err
void Client::log_response(unsigned code)
{
- outln("{} :: {:03d} :: {} {}", Core::DateTime::now().to_string(), code, m_request->method_name(), m_request->resource());
+ outln("{} :: {:03d} :: {} {}", Core::DateTime::now().to_deprecated_string(), code, m_request->method_name(), m_request->resource());
}
}
diff --git a/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp b/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp
index 0909fbf36e..28a801f15a 100644
--- a/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp
+++ b/Userland/Libraries/LibWeb/WebDriver/ExecuteScript.cpp
@@ -95,7 +95,7 @@ static ErrorOr<JsonValue, ExecuteScriptResultType> internal_json_clone_algorithm
if (value.is_number())
return JsonValue { value.as_double() };
if (value.is_string())
- return JsonValue { value.as_string().string() };
+ return JsonValue { value.as_string().deprecated_string() };
// NOTE: BigInt and Symbol not mentioned anywhere in the WebDriver spec, as it references ES5.
// It assumes that all primitives are handled above, and the value is an object for the remaining steps.
@@ -114,7 +114,7 @@ static ErrorOr<JsonValue, ExecuteScriptResultType> internal_json_clone_algorithm
auto to_json_result = TRY_OR_JS_ERROR(to_json.as_function().internal_call(value, JS::MarkedVector<JS::Value> { vm.heap() }));
if (!to_json_result.is_string())
return ExecuteScriptResultType::JavaScriptError;
- return to_json_result.as_string().string();
+ return to_json_result.as_string().deprecated_string();
}
// -> Otherwise