diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-12-21 11:42:06 +0000 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-01-17 19:52:52 -0500 |
commit | 1dd6b7f5b787e1893b708ddf58492f9fdd50ae51 (patch) | |
tree | 3f9f665b573fa3097b707b1cc8cb08e1572b34cd /Userland/Libraries/LibWeb/WebDriver | |
parent | efe4329f9fe448eb17784d7a9b9e6e519ec4fa57 (diff) | |
download | serenity-1dd6b7f5b787e1893b708ddf58492f9fdd50ae51.zip |
AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()
This is a preparatory step to making `get()` return `ErrorOr`.
Diffstat (limited to 'Userland/Libraries/LibWeb/WebDriver')
-rw-r--r-- | Userland/Libraries/LibWeb/WebDriver/Capabilities.cpp | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/WebDriver/TimeoutsConfiguration.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/WebDriver/Capabilities.cpp b/Userland/Libraries/LibWeb/WebDriver/Capabilities.cpp index d8f671ea65..125feeab3f 100644 --- a/Userland/Libraries/LibWeb/WebDriver/Capabilities.cpp +++ b/Userland/Libraries/LibWeb/WebDriver/Capabilities.cpp @@ -267,20 +267,20 @@ static JsonValue match_capabilities(JsonObject const& capabilities) // -> "browserName" if (name == "browserName"sv) { // If value is not a string equal to the "browserName" entry in matched capabilities, return success with data null. - if (value.as_string() != matched_capabilities.get(name).as_string()) + if (value.as_string() != matched_capabilities.get_deprecated(name).as_string()) return AK::Error::from_string_view("browserName"sv); } // -> "browserVersion" else if (name == "browserVersion"sv) { // Compare value to the "browserVersion" entry in matched capabilities using an implementation-defined comparison algorithm. The comparison is to accept a value that places constraints on the version using the "<", "<=", ">", and ">=" operators. // If the two values do not match, return success with data null. - if (!matches_browser_version(value.as_string(), matched_capabilities.get(name).as_string())) + if (!matches_browser_version(value.as_string(), matched_capabilities.get_deprecated(name).as_string())) return AK::Error::from_string_view("browserVersion"sv); } // -> "platformName" else if (name == "platformName"sv) { // If value is not a string equal to the "platformName" entry in matched capabilities, return success with data null. - if (!matches_platform_name(value.as_string(), matched_capabilities.get(name).as_string())) + if (!matches_platform_name(value.as_string(), matched_capabilities.get_deprecated(name).as_string())) return AK::Error::from_string_view("platformName"sv); } // -> "acceptInsecureCerts" diff --git a/Userland/Libraries/LibWeb/WebDriver/TimeoutsConfiguration.cpp b/Userland/Libraries/LibWeb/WebDriver/TimeoutsConfiguration.cpp index 95d70290a5..dd129616f5 100644 --- a/Userland/Libraries/LibWeb/WebDriver/TimeoutsConfiguration.cpp +++ b/Userland/Libraries/LibWeb/WebDriver/TimeoutsConfiguration.cpp @@ -48,7 +48,7 @@ ErrorOr<TimeoutsConfiguration, Error> json_deserialize_as_a_timeouts_configurati // 3. If value has a property with the key "script": if (value.as_object().has("script"sv)) { // 1. Let script duration be the value of property "script". - auto const& script_duration = value.as_object().get("script"sv); + auto const& script_duration = value.as_object().get_deprecated("script"sv); // 2. If script duration is a number and less than 0 or greater than maximum safe integer, or it is not null, return error with error code invalid argument. if (script_duration.is_number() && (script_duration.to_i64() < 0 || script_duration.to_i64() > max_safe_integer)) @@ -63,7 +63,7 @@ ErrorOr<TimeoutsConfiguration, Error> json_deserialize_as_a_timeouts_configurati // 4. If value has a property with the key "pageLoad": if (value.as_object().has("pageLoad"sv)) { // 1. Let page load duration be the value of property "pageLoad". - auto const& page_load_duration = value.as_object().get("pageLoad"sv); + auto const& page_load_duration = value.as_object().get_deprecated("pageLoad"sv); // 2. If page load duration is less than 0 or greater than maximum safe integer, return error with error code invalid argument. if (!page_load_duration.is_number() || page_load_duration.to_i64() < 0 || page_load_duration.to_i64() > max_safe_integer) @@ -76,7 +76,7 @@ ErrorOr<TimeoutsConfiguration, Error> json_deserialize_as_a_timeouts_configurati // 5. If value has a property with the key "implicit": if (value.as_object().has("implicit"sv)) { // 1. Let implicit duration be the value of property "implicit". - auto const& implicit_duration = value.as_object().get("implicit"sv); + auto const& implicit_duration = value.as_object().get_deprecated("implicit"sv); // 2. If implicit duration is less than 0 or greater than maximum safe integer, return error with error code invalid argument. if (!implicit_duration.is_number() || implicit_duration.to_i64() < 0 || implicit_duration.to_i64() > max_safe_integer) |