From 9851176c25e065fff3599c9bdde3e50cbe416c9f Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Fri, 19 Jul 2024 23:25:33 +0200 Subject: [PATCH] headless-browser: Disable screenshot tests on macOS LibGfx's output is consistent across different platforms, which allows us to have one set of expectations for screenshot tests. This consistency will not hold for Skia, where features like antialiasing and gradient color interpolation vary slightly depending on the platform. In upcoming changes, we are going to switch to using Skia as the default painter, which leaves us with the following options: - Have per-platform screenshot test expectations. - Limit screenshot tests to run only on one platform and maintain a single set of expectation files. For now, I have decided to choose the latter option, using Linux as it seems to be the most popular platform among developers. --- Userland/Utilities/headless-browser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp index 56dee77b203..200092bf00f 100644 --- a/Userland/Utilities/headless-browser.cpp +++ b/Userland/Utilities/headless-browser.cpp @@ -554,7 +554,9 @@ static ErrorOr run_tests(HeadlessWebContentView& view, StringView test_root TRY(collect_dump_tests(tests, TRY(String::formatted("{}/Layout", test_root_path)), "."sv, TestMode::Layout)); TRY(collect_dump_tests(tests, TRY(String::formatted("{}/Text", test_root_path)), "."sv, TestMode::Text)); TRY(collect_ref_tests(tests, TRY(String::formatted("{}/Ref", test_root_path)))); +#ifndef AK_OS_MACOS TRY(collect_ref_tests(tests, TRY(String::formatted("{}/Screenshot", test_root_path)))); +#endif tests.remove_all_matching([&](auto const& test) { return !test.input_path.bytes_as_string_view().matches(test_glob, CaseSensitivity::CaseSensitive);