mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
LibWeb+WebContent+WebDriver: Bring session start and close up to spec
Lots of editorial spec bugs here, but these changes largely affect how the unhandledPromptBehavior capability is handled. We also now set an additional capability for the default User Agent string.
This commit is contained in:
parent
2583996e18
commit
ee649fc13b
Notes:
github-actions[bot]
2025-02-06 14:02:15 +00:00
Author: https://github.com/trflynn89
Commit: ee649fc13b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3471
Reviewed-by: https://github.com/AtkinsSJ
9 changed files with 290 additions and 131 deletions
|
@ -223,9 +223,11 @@ void WebDriverConnection::close_session()
|
|||
// 1. Set the webdriver-active flag to false.
|
||||
set_is_webdriver_active(false);
|
||||
|
||||
// 2. An endpoint node must close any top-level browsing contexts associated with the session, without prompting to unload.
|
||||
if (auto browsing_context = current_top_level_browsing_context())
|
||||
browsing_context->top_level_traversable()->close_top_level_traversable();
|
||||
// 5. Optionally, close all top-level browsing contexts, without prompting to unload.
|
||||
for (auto navigable : Web::HTML::all_navigables()) {
|
||||
if (auto traversable = navigable->top_level_traversable())
|
||||
traversable->close_top_level_traversable();
|
||||
}
|
||||
}
|
||||
|
||||
void WebDriverConnection::set_page_load_strategy(Web::WebDriver::PageLoadStrategy const& page_load_strategy)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue