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
34 lines
1.1 KiB
HTML
34 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<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;
|
|
font-family: monospace;
|
|
width: 5ch;
|
|
caret-color: orange;
|
|
caret-shape: block;
|
|
caret-animation: manual;
|
|
outline: none;
|
|
overflow: hidden;
|
|
white-space: pre;
|
|
}
|
|
</style>
|
|
|
|
<p>Test passes if you see a orange text insertion caret at the end of the line below.
|
|
|
|
<div id=test contenteditable spellcheck="false">abcde</div>
|
|
|
|
<script>
|
|
const t = document.querySelector("#test");
|
|
window.getSelection().selectAllChildren(t);
|
|
window.getSelection().collapseToEnd();
|
|
takeScreenshot();
|
|
</script>
|