From 2b25844f7ef4ca0940d13daa9502a465b0681c25 Mon Sep 17 00:00:00 2001 From: Sam Davis Omekara Date: Tue, 12 Nov 2024 14:48:00 -0800 Subject: [PATCH] [Headless]: Fix Forced Colors Tests for Headless Shell This CL resolves issues with the forced colors mode tests in the headless shell test environment. The errors occurred because the link color in some reference files was not explicitly set to "VisitedText", as is currently done in forced colors mode. Consequently, many actual results did not match the expected results solely due to the link color discrepancy. For more details, refer to this test bucket[1]. Most errors in the Windows scenario should be resolved with this change, except for `forced-colors-mode-03.html`, which requires further restructuring based on recent findings about the test's structure. This will be addressed in a subsequent CL. Failures on MacOS and Linux platforms will also be handled in a subsequent CL. [1]: https://chromium-layout-test-archives.storage.googleapis.com/results.html?json=chromium/ci/win10-wpt-chromium-rel/3919/headless_shell_wpt_tests_include_all%20%28experimental%29/full_results_jsonp.js Bug: 368396826 Change-Id: Ifc925637e0f1438a5241017de7a2f3023380997e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6012900 Reviewed-by: Alison Maher Commit-Queue: Sam Davis Omekara Cr-Commit-Position: refs/heads/main@{#1382010} --- .../backplate/forced-colors-mode-backplate-04-ref.html | 3 +++ forced-colors-mode/forced-colors-mode-36-ref.html | 1 + forced-colors-mode/forced-colors-mode-37-ref.html | 1 + forced-colors-mode/forced-colors-mode-38-ref.html | 1 + forced-colors-mode/forced-colors-mode-42-ref.html | 1 + forced-colors-mode/forced-colors-mode-44-ref.html | 1 + 6 files changed, 8 insertions(+) diff --git a/forced-colors-mode/backplate/forced-colors-mode-backplate-04-ref.html b/forced-colors-mode/backplate/forced-colors-mode-backplate-04-ref.html index ddf54c6b8f756d..848e02440ca819 100644 --- a/forced-colors-mode/backplate/forced-colors-mode-backplate-04-ref.html +++ b/forced-colors-mode/backplate/forced-colors-mode-backplate-04-ref.html @@ -25,6 +25,9 @@ #a { background-color: Canvas; } + #a a { + color: LinkText; + }
diff --git a/forced-colors-mode/forced-colors-mode-36-ref.html b/forced-colors-mode/forced-colors-mode-36-ref.html index 838b10da953c32..afa1623bef6cb6 100644 --- a/forced-colors-mode/forced-colors-mode-36-ref.html +++ b/forced-colors-mode/forced-colors-mode-36-ref.html @@ -7,6 +7,7 @@ fill: CanvasText; forced-color-adjust: none; stroke: LinkText; + color: VisitedText; } diff --git a/forced-colors-mode/forced-colors-mode-37-ref.html b/forced-colors-mode/forced-colors-mode-37-ref.html index a2cc4b7efee30d..b652247391fcac 100644 --- a/forced-colors-mode/forced-colors-mode-37-ref.html +++ b/forced-colors-mode/forced-colors-mode-37-ref.html @@ -10,6 +10,7 @@ column-gap: 40px; column-rule-color: VisitedText; column-rule-style: solid; + color: VisitedText; } diff --git a/forced-colors-mode/forced-colors-mode-38-ref.html b/forced-colors-mode/forced-colors-mode-38-ref.html index e72a73fcef72f1..b2c9b74aac4efd 100644 --- a/forced-colors-mode/forced-colors-mode-38-ref.html +++ b/forced-colors-mode/forced-colors-mode-38-ref.html @@ -10,6 +10,7 @@ column-gap: 40px; column-rule-color: GrayText; column-rule-style: solid; + color: VisitedText; } diff --git a/forced-colors-mode/forced-colors-mode-42-ref.html b/forced-colors-mode/forced-colors-mode-42-ref.html index 7133c893cea0a1..f0245e63ab66a3 100644 --- a/forced-colors-mode/forced-colors-mode-42-ref.html +++ b/forced-colors-mode/forced-colors-mode-42-ref.html @@ -5,6 +5,7 @@ a { caret-color: VisitedText; forced-color-adjust: none; + color: VisitedText; } [contenteditable] { outline: none; diff --git a/forced-colors-mode/forced-colors-mode-44-ref.html b/forced-colors-mode/forced-colors-mode-44-ref.html index 46398de8829733..1da46dd4fa1b98 100644 --- a/forced-colors-mode/forced-colors-mode-44-ref.html +++ b/forced-colors-mode/forced-colors-mode-44-ref.html @@ -5,6 +5,7 @@ a { caret-color: GrayText; forced-color-adjust: none; + color: VisitedText; } [contenteditable] { outline: none;