mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
WebContent+WebDriver: Ensure Get Window Handle checks for closed BCs
This commit is contained in:
parent
010be9b7c2
commit
0524bc1d13
4 changed files with 13 additions and 2 deletions
|
@ -290,7 +290,8 @@ Web::WebDriver::Response Client::get_window_handle(Web::WebDriver::Parameters pa
|
|||
dbgln_if(WEBDRIVER_DEBUG, "Handling GET /session/<session_id>/window");
|
||||
auto session = TRY(find_session_with_id(parameters[0]));
|
||||
|
||||
// FIXME: 1. If the current top-level browsing context is no longer open, return error with error code no such window.
|
||||
// 1. If the current top-level browsing context is no longer open, return error with error code no such window.
|
||||
TRY(session->web_content_connection().ensure_top_level_browsing_context_is_open());
|
||||
|
||||
// 2. Return success with data being the window handle associated with the current top-level browsing context.
|
||||
return JsonValue { session->current_window_handle() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue