WebContent+WebDriver: Convert all user prompt handlers to be async

Making these async were all actually pretty trivial. This patch does so,
and removes the deprecated synchronous user prompt handler.
This commit is contained in:
Timothy Flynn 2024-11-03 09:39:18 -05:00 committed by Andreas Kling
commit 3da20aca65
Notes: github-actions[bot] 2024-11-03 21:12:10 +00:00
4 changed files with 510 additions and 385 deletions

View file

@ -131,7 +131,9 @@ Web::WebDriver::Response Session::close_window()
ScopeGuard guard { [this] { m_windows.remove(m_current_window_handle); m_current_window_handle = "NoSuchWindowPleaseSelectANewOne"_string; } };
// 3. Close the current top-level browsing context.
TRY(web_content_connection().close_window());
TRY(perform_async_action([&](auto& connection) {
return connection.close_window();
}));
// 4. If there are no more open top-level browsing contexts, then close the session.
if (m_windows.size() == 1)