1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

Browser+WebContent+WebDriver: Move [Max,Min]imize Window to WebContent

This also lets us more fully implement the "iconify the window" method,
which requires we block until the document reaches the "hidden" state.
This commit is contained in:
Timothy Flynn 2022-11-09 11:00:53 -05:00 committed by Linus Groh
parent 1c398b32ce
commit 03d0c7a5b6
9 changed files with 75 additions and 86 deletions

View file

@ -600,8 +600,7 @@ Web::WebDriver::Response Client::handle_maximize_window(Vector<StringView> const
{
dbgln_if(WEBDRIVER_DEBUG, "Handling POST /session/<session_id>/window/maximize");
auto* session = TRY(find_session_with_id(parameters[0]));
auto result = TRY(session->maximize_window());
return make_json_value(result);
return session->web_content_connection().maximize_window();
}
// 11.8.4 Minimize Window, https://w3c.github.io/webdriver/#minimize-window
@ -610,8 +609,7 @@ Web::WebDriver::Response Client::handle_minimize_window(Vector<StringView> const
{
dbgln_if(WEBDRIVER_DEBUG, "Handling POST /session/<session_id>/window/minimize");
auto* session = TRY(find_session_with_id(parameters[0]));
auto result = TRY(session->minimize_window());
return make_json_value(result);
return session->web_content_connection().minimize_window();
}
// 12.3.2 Find Element, https://w3c.github.io/webdriver/#dfn-find-element