Bug 1718181 [wpt PR 29497] - Add test case for text-transform uppercase and selection, a=testonly

Automatic update from web-platform-tests
Add test case for text-transform uppercase and selection

This is just a test to show the effects of https://crbug.com/750990
when selecting text that has changed the number of characters
due to text-transform.

BUG=750990
TEST=external/wpt/css/css-text/text-transform/text-transform-upperlower-105.html

Change-Id: If7cbde1f1e480c98d0ad4586f93729cbca1d0d1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2987819
Commit-Queue: Manuel Rego <rego@igalia.com>
Reviewed-by: Frédéric Wang <fwang@igalia.com>
Cr-Commit-Position: refs/heads/master@{#895958}

--

wpt-commits: c660b404f53e49f4ce2932b7ccf39188082dc2da
wpt-pr: 29497
This commit is contained in:
Manuel Rego Casasnovas 2021-06-25 22:18:33 +00:00 коммит произвёл moz-wptsync-bot
Родитель c08eccd212
Коммит 990ff2bb90
2 изменённых файлов: 46 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: text-transform uppercase German sharp S and selection reference file</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<style>
#target {
color: white;
background: red;
}
#target::selection {
background: green;
}
</style>
<p>The test passes if you see no red below (when you select the text below you can select the whole "SS" text).</p>
<span id="target" lang="de">SS</span>
<script>
window.getSelection().setBaseAndExtent(target, 0, target, 1);
</script>

Просмотреть файл

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: text-transform uppercase German sharp S and selection</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text/#propdef-text-transform">
<link rel="match" href="reference/text-transform-upperlower-105-ref.html">
<meta name="assert" content="text-transform: uppercase will uppercase the German sharp S as SS, and the whole 2 characters width is selectable.">
<style>
#target {
text-transform: uppercase;
color: white;
background: red;
}
#target::selection {
background: green;
}
</style>
<p>The test passes if you see no red below (when you select the text below you can select the whole "SS" text).</p>
<span id="target" lang="de">&#x00DF;</span>
<script>
window.getSelection().setBaseAndExtent(target, 0, target, 1);
</script>