AK+Everywhere: Store JSON object keys as String

This commit is contained in:
Timothy Flynn
2025-02-17 12:18:27 -05:00
committed by Tim Flynn
parent 70eb0ba1cd
commit e591636419
23 changed files with 119 additions and 111 deletions

View File

@@ -76,10 +76,10 @@ Web::WebDriver::Response Client::new_session(Web::WebDriver::Parameters, JsonVal
JsonObject body;
// "sessionId"
// session's session ID.
body.set("sessionId", JsonValue { session->session_id() });
body.set("sessionId"sv, JsonValue { session->session_id() });
// "capabilities"
// capabilities
body.set("capabilities", move(capabilities));
body.set("capabilities"sv, move(capabilities));
// 8. Set session' current top-level browsing context to one of the endpoint node's top-level browsing contexts,
// preferring the top-level browsing context that has system focus, or otherwise preferring any top-level
@@ -130,8 +130,8 @@ Web::WebDriver::Response Client::get_status(Web::WebDriver::Parameters, JsonValu
// "message"
// An implementation-defined string explaining the remote end's readiness state.
JsonObject body;
body.set("ready", readiness_state);
body.set("message", ByteString::formatted("{} to accept a new session", readiness_state ? "Ready"sv : "Not ready"sv));
body.set("ready"sv, readiness_state);
body.set("message"sv, ByteString::formatted("{} to accept a new session", readiness_state ? "Ready"sv : "Not ready"sv));
// 2. Return success with data body.
return JsonValue { body };

View File

@@ -47,7 +47,7 @@ ErrorOr<NonnullRefPtr<Session>> Session::create(NonnullRefPtr<Client> client, Js
// -> Otherwise
else {
// Set a property of capabilities with name "proxy" and a value that is a new JSON Object.
capabilities.set("proxy", JsonObject {});
capabilities.set("proxy"sv, JsonObject {});
}
// FIXME: 4. If capabilites has a property named "acceptInsecureCerts", set the endpoint node's accept insecure TLS flag