mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 23:12:56 +00:00
WebDriver: Implement POST /session/{session id}/timeouts
endpoint
This commit is contained in:
parent
5c32eacac9
commit
0064d2e8c8
Notes:
sideshowbarker
2024-07-17 05:20:55 +09:00
Author: https://github.com/linusg
Commit: 0064d2e8c8
Pull-request: https://github.com/SerenityOS/serenity/pull/15700
Reviewed-by: https://github.com/TobyAsE ✅
6 changed files with 85 additions and 0 deletions
|
@ -83,6 +83,19 @@ JsonObject Session::get_timeouts()
|
|||
return timeouts;
|
||||
}
|
||||
|
||||
// 9.2 Set Timeouts, https://w3c.github.io/webdriver/#dfn-set-timeouts
|
||||
ErrorOr<JsonValue, HttpError> Session::set_timeouts(JsonValue const& payload)
|
||||
{
|
||||
// 1. Let timeouts be the result of trying to JSON deserialize as a timeouts configuration the request’s parameters.
|
||||
auto timeouts = TRY(json_deserialize_as_a_timeouts_configuration(payload));
|
||||
|
||||
// 2. Make the session timeouts the new timeouts.
|
||||
m_timeouts_configuration = move(timeouts);
|
||||
|
||||
// 3. Return success with data null.
|
||||
return JsonValue {};
|
||||
}
|
||||
|
||||
// 10.1 Navigate To, https://w3c.github.io/webdriver/#dfn-navigate-to
|
||||
ErrorOr<JsonValue, HttpError> Session::navigate_to(JsonValue const& payload)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue