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

headless-browser: Load test page after callbacks are registered

Eliminates possibility that page will load before callbacks are added.
This commit is contained in:
Aliaksandr Kalenik 2023-12-20 18:44:35 +01:00 committed by Andreas Kling
parent 2f09bfeff2
commit d28c400fcb

View file

@ -215,7 +215,6 @@ static ErrorOr<TestResult> run_dump_test(HeadlessWebContentView& view, StringVie
}));
auto url = URL::create_with_file_scheme(TRY(FileSystem::real_path(input_path)).to_byte_string());
view.load(url);
String result;
auto did_finish_test = false;
@ -253,6 +252,8 @@ static ErrorOr<TestResult> run_dump_test(HeadlessWebContentView& view, StringVie
};
}
view.load(url);
timeout_timer->start();
loop.exec();