Automatic update from web-platform-tests css-text-5: Update specification URL in text-fit tests Change-Id: Ie3c1ffa11d0ac25e04a7fe5790ca6f393efb54d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7904980 Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Auto-Submit: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/main@{#1643098} -- wpt-commits: eca981421a06cb6898eb31878579df4c4c16547a wpt-pr: 60463
36 lines
1018 B
HTML
36 lines
1018 B
HTML
<!DOCTYPE html>
|
|
<link rel="help" href="https://drafts.csswg.org/css-text-5/#text-fit-property">
|
|
<meta name="flags" content="ahem">
|
|
<link rel="stylesheet" href="/fonts/ahem.css">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/testdriver.js"></script>
|
|
<script src="/resources/testdriver-actions.js"></script>
|
|
<script src='/resources/testdriver-vendor.js'></script>
|
|
<style>
|
|
#target {
|
|
font: 20px/2 Ahem;
|
|
width: 160px;
|
|
text-fit: grow consistent;
|
|
white-space: pre;
|
|
}
|
|
</style>
|
|
|
|
<div id="target">123
|
|
4567</div>
|
|
|
|
<script>
|
|
promise_test(async () => {
|
|
const target = document.querySelector('#target');
|
|
const W = 40;
|
|
const H = 80;
|
|
await new test_driver.Actions()
|
|
.pointerMove(W * 2.1, H * 1.4, target)
|
|
.pointerDown()
|
|
.pointerMove(W * 3.9, H * 1.6, target)
|
|
.pointerUp()
|
|
.send();
|
|
assert_equals(getSelection().toString(), "67");
|
|
}, 'Text selection by a pointer device should work correctly');
|
|
</script>
|