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.
This commit is contained in:
Aliaksandr Kalenik 2024-07-19 23:25:33 +02:00 committed by Andreas Kling
commit 9851176c25
Notes: github-actions[bot] 2024-07-21 11:27:16 +00:00

View file

@ -554,7 +554,9 @@ static ErrorOr<int> 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);