mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-20 01:11:07 +00:00
headless-browser: Don't choke on subframe load completions
This didn't break any existing tests, but I have to do this for an upcoming test to not bring everything down.
This commit is contained in:
parent
9759f44faf
commit
8586897928
Notes:
sideshowbarker
2024-07-17 14:33:07 +09:00
Author: https://github.com/awesomekling
Commit: 8586897928
Pull-request: https://github.com/SerenityOS/serenity/pull/23328
Reviewed-by: https://github.com/tcl3
1 changed files with 3 additions and 1 deletions
|
@ -303,7 +303,9 @@ static ErrorOr<TestResult> run_dump_test(HeadlessWebContentView& view, StringVie
|
|||
} else if (mode == TestMode::Text) {
|
||||
|
||||
view.on_load_finish = [&](auto const& loaded_url) {
|
||||
VERIFY(url.equals(loaded_url, URL::ExcludeFragment::Yes));
|
||||
// NOTE: We don't want subframe loads to trigger the test finish.
|
||||
if (!url.equals(loaded_url, URL::ExcludeFragment::Yes))
|
||||
return;
|
||||
did_finish_loading = true;
|
||||
if (did_finish_test)
|
||||
loop.quit(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue