headless-browser: Do not immediately exit when running under WebDriver

We need to spin the Application's event loop.
This commit is contained in:
Timothy Flynn 2024-10-21 18:52:12 -04:00 committed by Tim Ledbetter
parent d08d305399
commit 34b8784dd9
Notes: github-actions[bot] 2024-10-22 03:25:53 +00:00

View file

@ -98,10 +98,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return completion.result == Ladybird::TestResult::Pass ? 0 : 1;
}
if (!WebView::Application::chrome_options().webdriver_content_ipc_path.has_value()) {
auto timer = TRY(load_page_for_screenshot_and_exit(Core::EventLoop::current(), view, url, app->screenshot_timeout));
return app->execute();
}
RefPtr<Core::Timer> timer;
if (!WebView::Application::chrome_options().webdriver_content_ipc_path.has_value())
timer = TRY(load_page_for_screenshot_and_exit(Core::EventLoop::current(), view, url, app->screenshot_timeout));
return 0;
return app->execute();
}