1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:14:58 +00:00

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.
This commit is contained in:
MacDue 2024-02-17 22:21:58 +00:00 committed by Alexander Kalenik
parent 957c20b676
commit 012cb7f71e

View file

@ -283,7 +283,7 @@ static ErrorOr<TestResult> 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.