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
commit d28c400fcb
Notes: sideshowbarker 2024-07-17 09:48:50 +09:00

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();