Skip to content

Commit a15d329

Browse files
AtkinsSJlinusg
authored andcommitted
WebDriver: Implement GET /status endpoint
1 parent 80603f1 commit a15d329

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Userland/Services/WebDriver/Client.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,18 @@ ErrorOr<JsonValue, HttpError> Client::handle_get_status(Vector<StringView>, Json
391391
{
392392
dbgln_if(WEBDRIVER_DEBUG, "Handling GET /status");
393393

394-
// FIXME: Implement the spec steps
395-
return HttpError { 400, "", "" };
394+
// 1. Let body be a new JSON Object with the following properties:
395+
// "ready"
396+
// The remote end’s readiness state.
397+
// "message"
398+
// An implementation-defined string explaining the remote end’s readiness state.
399+
// FIXME: Report if we are somehow not ready.
400+
JsonObject body;
401+
body.set("ready", true);
402+
body.set("message", "Ready to start some sessions!");
403+
404+
// 2. Return success with data body.
405+
return body;
396406
}
397407

398408
// POST /session/{session id}/url https://w3c.github.io/webdriver/#dfn-navigate-to

0 commit comments

Comments
 (0)