diff --git a/Tests/LibWeb/test-web/Fuzzy.cpp b/Tests/LibWeb/test-web/Fuzzy.cpp index be12b003df3..17eec83f4fc 100644 --- a/Tests/LibWeb/test-web/Fuzzy.cpp +++ b/Tests/LibWeb/test-web/Fuzzy.cpp @@ -13,7 +13,7 @@ namespace TestWeb { // https://web-platform-tests.org/writing-tests/reftests.html#fuzzy-matching -bool fuzzy_screenshot_match(URL::URL const& reference, Gfx::Bitmap const& bitmap_a, Gfx::Bitmap const& bitmap_b, +bool fuzzy_screenshot_match(URL::URL const& test_url, URL::URL const& reference, Gfx::Bitmap const& bitmap_a, Gfx::Bitmap const& bitmap_b, Vector const& fuzzy_matches) { // If the bitmaps are identical, we don't perform fuzzy matching. @@ -28,18 +28,18 @@ bool fuzzy_screenshot_match(URL::URL const& reference, Gfx::Bitmap const& bitmap return true; }); if (!fuzzy_match.has_value()) { - warnln("Screenshot mismatch: pixel error count {}, with maximum error {}. (No fuzzy config defined)", diff.pixel_error_count, diff.maximum_error); + warnln("{}: Screenshot mismatch: pixel error count {}, with maximum error {}. (No fuzzy config defined)", test_url, diff.pixel_error_count, diff.maximum_error); return false; } // Apply fuzzy matching. auto color_error_matches = fuzzy_match->color_value_error.contains(diff.maximum_error); if (!color_error_matches) - warnln("Fuzzy mismatch: maximum error {} is outside {}", diff.maximum_error, fuzzy_match->color_value_error); + warnln("{}: Fuzzy mismatch: maximum error {} is outside {}", test_url, diff.maximum_error, fuzzy_match->color_value_error); auto pixel_error_matches = fuzzy_match->pixel_error_count.contains(diff.pixel_error_count); if (!pixel_error_matches) - warnln("Fuzzy mismatch: pixel error count {} is outside {}", diff.pixel_error_count, fuzzy_match->pixel_error_count); + warnln("{}: Fuzzy mismatch: pixel error count {} is outside {}", test_url, diff.pixel_error_count, fuzzy_match->pixel_error_count); return color_error_matches && pixel_error_matches; } diff --git a/Tests/LibWeb/test-web/Fuzzy.h b/Tests/LibWeb/test-web/Fuzzy.h index 4b90215d133..d4bbb2de8f1 100644 --- a/Tests/LibWeb/test-web/Fuzzy.h +++ b/Tests/LibWeb/test-web/Fuzzy.h @@ -28,7 +28,7 @@ struct FuzzyMatch { FuzzyRange pixel_error_count; }; -bool fuzzy_screenshot_match(URL::URL const& reference, Gfx::Bitmap const&, Gfx::Bitmap const&, Vector const&); +bool fuzzy_screenshot_match(URL::URL const& test_url, URL::URL const& reference, Gfx::Bitmap const&, Gfx::Bitmap const&, Vector const&); ErrorOr parse_fuzzy_match(Optional reference, String const&); ErrorOr parse_fuzzy_range(String const&); diff --git a/Tests/LibWeb/test-web/main.cpp b/Tests/LibWeb/test-web/main.cpp index 58194545382..011a810d0b7 100644 --- a/Tests/LibWeb/test-web/main.cpp +++ b/Tests/LibWeb/test-web/main.cpp @@ -369,7 +369,7 @@ static void run_ref_test(TestWebView& view, Test& test, URL::URL const& url, int VERIFY(test.ref_test_expectation_type.has_value()); auto should_match = test.ref_test_expectation_type == RefTestExpectationType::Match; auto screenshot_matches = fuzzy_screenshot_match( - view.url(), *test.actual_screenshot, *test.expectation_screenshot, test.fuzzy_matches); + url, view.url(), *test.actual_screenshot, *test.expectation_screenshot, test.fuzzy_matches); if (should_match == screenshot_matches) return TestResult::Pass;