From 012cb7f71e0eb5b05fac213c012a4285d39e3d36 Mon Sep 17 00:00:00 2001 From: MacDue Date: Sat, 17 Feb 2024 22:21:58 +0000 Subject: [PATCH] headless-browser: Fix loaded URL about:blank check This check was meant to let about:blank through, but it checked the URL from the file path, not the `loaded_url`, so still crashed on about:blank. --- Userland/Utilities/headless-browser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp index 512ad59439..44a2df556e 100644 --- a/Userland/Utilities/headless-browser.cpp +++ b/Userland/Utilities/headless-browser.cpp @@ -283,7 +283,7 @@ static ErrorOr run_dump_test(HeadlessWebContentView& view, StringVie if (mode == TestMode::Layout) { view.on_load_finish = [&](auto const& loaded_url) { // This callback will be called for 'about:blank' first, then for the URL we actually want to dump - VERIFY(url.equals(loaded_url, URL::ExcludeFragment::Yes) || url.equals(URL("about:blank"))); + VERIFY(url.equals(loaded_url, URL::ExcludeFragment::Yes) || loaded_url.equals(URL("about:blank"))); if (url.equals(loaded_url, URL::ExcludeFragment::Yes)) { // NOTE: We take a screenshot here to force the lazy layout of SVG-as-image documents to happen.