headless-browser: Navigate after attaching new callbacks for ref tests
This commit is contained in:
parent
1358fe85b0
commit
05ea3d6be0
Notes:
sideshowbarker
2024-07-18 05:37:06 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/05ea3d6be0 Pull-request: https://github.com/SerenityOS/serenity/pull/22850
1 changed files with 5 additions and 2 deletions
|
@ -364,8 +364,6 @@ static ErrorOr<TestResult> run_ref_test(HeadlessWebContentView& view, StringView
|
|||
loop.quit(0);
|
||||
}));
|
||||
|
||||
view.load(URL::create_with_file_scheme(TRY(FileSystem::real_path(input_path))));
|
||||
|
||||
RefPtr<Gfx::Bitmap> actual_screenshot, expectation_screenshot;
|
||||
view.on_load_finish = [&](auto const&) {
|
||||
if (actual_screenshot) {
|
||||
|
@ -376,6 +374,11 @@ static ErrorOr<TestResult> run_ref_test(HeadlessWebContentView& view, StringView
|
|||
view.debug_request("load-reference-page");
|
||||
}
|
||||
};
|
||||
view.on_text_test_finish = [&] {
|
||||
dbgln("Unexpected text test finished during ref test for {}", input_path);
|
||||
};
|
||||
|
||||
view.load(URL::create_with_file_scheme(TRY(FileSystem::real_path(input_path))));
|
||||
|
||||
timeout_timer->start();
|
||||
loop.exec();
|
||||
|
|
Loading…
Add table
Reference in a new issue