commit 83046f098280df2c9cd13377669f3cafd3052f87 parent 1f953987a547541e2ea17584485c5af3acba27b8 Author: Ziran Sun <zsun@igalia.com> Date: Tue, 21 Oct 2025 10:15:39 +0000 Bug 1994291 [wpt PR 55422] - Caret-shape: fix flakiness of caret-eol wpt tests., a=testonly Automatic update from web-platform-tests Caret-shape: fix flakiness of caret-eol wpt tests. Make sure that the caret is rendered and displayed by calling takeScreenshot(). This CL also cleans the reference test file. Bug: 353713061 Change-Id: I0b6041b8ae25e93bf64a499d39c840b20114afa6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7037656 Commit-Queue: Ziran Sun <zsun@igalia.com> Reviewed-by: Manuel Rego <rego@igalia.com> Cr-Commit-Position: refs/heads/main@{#1529718} -- wpt-commits: 0be1224b4892f2dcb969fd6e90fdb399bb22ab6d wpt-pr: 55422 Diffstat:
5 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/testing/web-platform/tests/css/css-ui/caret-eol-001.html b/testing/web-platform/tests/css/css-ui/caret-eol-001.html @@ -1,11 +1,12 @@ <!DOCTYPE html> -<html lang=en> +<html lang=en class="reftest-wait"> <meta charset="utf-8"> <title>CSS Basic User Interface Test: end-of-line carets should be visible</title> <link rel="author" title="Florian Rivoal" href="mailto:florian@rivoal.net"> <link rel="help" href="http://www.w3.org/TR/css4-ui/#caret-shape"> <link rel="mismatch" href=reference/caret-eol-001.html> <meta name="assert" content="Checks that carets positioned at the end of the line are shown even if they overflow."> +<script src="/common/reftest-wait.js"></script> <style> div { font-size: 40px; @@ -27,4 +28,5 @@ div { const t = document.querySelector("#test"); window.getSelection().selectAllChildren(t); window.getSelection().collapseToEnd(); +takeScreenshot(); </script> diff --git a/testing/web-platform/tests/css/css-ui/caret-eol-002.html b/testing/web-platform/tests/css/css-ui/caret-eol-002.html @@ -1,11 +1,12 @@ <!DOCTYPE html> -<html lang=en> +<html lang=en class="reftest-wait"> <meta charset="utf-8"> <title>CSS Basic User Interface Test: end-of-line carets should be visible</title> <link rel="author" title="Florian Rivoal" href="mailto:florian@rivoal.net"> <link rel="help" href="http://www.w3.org/TR/css4-ui/#caret-shape"> <link rel="mismatch" href=reference/caret-eol-001.html> <meta name="assert" content="Checks that carets positioned at the end of the line are shown even if they overflow, even if the box has hidden overflow."> +<script src="/common/reftest-wait.js"></script> <style> div { font-size: 40px; @@ -28,4 +29,5 @@ div { const t = document.querySelector("#test"); window.getSelection().selectAllChildren(t); window.getSelection().collapseToEnd(); +takeScreenshot(); </script> diff --git a/testing/web-platform/tests/css/css-ui/caret-eol-003.html b/testing/web-platform/tests/css/css-ui/caret-eol-003.html @@ -1,11 +1,12 @@ <!DOCTYPE html> -<html lang=en> +<html lang=en class="reftest-wait"> <meta charset="utf-8"> <title>CSS Basic User Interface Test: end-of-line carets should be visible</title> <link rel="author" title="Florian Rivoal" href="mailto:florian@rivoal.net"> <link rel="help" href="http://www.w3.org/TR/css4-ui/#caret-shape"> <link rel="mismatch" href=reference/caret-eol-001.html> <meta name="assert" content="Checks that carets positioned at the end of the line are shown even if they overflow, even if the box has overflow: clip."> +<script src="/common/reftest-wait.js"></script> <style> div { font-size: 40px; @@ -28,4 +29,5 @@ div { const t = document.querySelector("#test"); window.getSelection().selectAllChildren(t); window.getSelection().collapseToEnd(); -</script> -\ No newline at end of file +takeScreenshot(); +</script> diff --git a/testing/web-platform/tests/css/css-ui/caret-eol-004.tentative.html b/testing/web-platform/tests/css/css-ui/caret-eol-004.tentative.html @@ -1,11 +1,12 @@ <!DOCTYPE html> -<html lang=en> +<html lang=en class="reftest-wait"> <meta charset="utf-8"> <title>CSS Basic User Interface Test: end-of-line carets should be visible</title> <link rel="author" title="Florian Rivoal" href="mailto:florian@rivoal.net"> <link rel="help" href="http://www.w3.org/TR/css4-ui/#caret-shape"> <link rel="mismatch" href=reference/caret-eol-001.html> <meta name="assert" content="Checks that carets positioned at the end of the line are shown even if they overflow. If the box has hidden overflow extending past the scrollport, the caret is display at the end of the visible line."> +<script src="/common/reftest-wait.js"></script> <style> div { font-size: 40px; @@ -28,4 +29,5 @@ div { const t = document.querySelector("#test"); window.getSelection().selectAllChildren(t); window.getSelection().collapseToEnd(); +takeScreenshot(); </script> diff --git a/testing/web-platform/tests/css/css-ui/reference/caret-eol-001.html b/testing/web-platform/tests/css/css-ui/reference/caret-eol-001.html @@ -8,9 +8,6 @@ div { font-size: 40px; font-family: monospace; width: 5ch; - caret-color: orange; - caret-shape: block; - caret-animation: manual; outline: none; white-space: pre; } @@ -18,10 +15,4 @@ div { <p>Test passes if you see a orange text insertion caret at the end of the line below. -<div id=test spellcheck="false">abcde</div> - -<script> -const t = document.querySelector("#test"); -window.getSelection().selectAllChildren(t); -window.getSelection().collapseToEnd(); -</script> +<div id=test>abcde</div>