Bug 1591441 [wpt PR 19868] - [css-lists] Add test for list-style-type:<string> with Ahem font, a=testonly

Automatic update from web-platform-tests
[css-lists] Add test for list-style-type:<string> with Ahem font

In the other reftests the width of the marker text is not known, so the
references have to rely on some tricks with the ::before pseudo-element.

This patch adds a test that uses the Ahem font, so that the width of the
characters is known. Then the result can be checked with a simpler
reference file.

Note it fails in LayoutNG due to the lack of scrollbar (bug 1012294),
but it passes in legacy.

Bug: 687946
Change-Id: I7fd0856e93d4e489af65b5c767ec81c109804c5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879067
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Reviewed-by: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709405}

--

wpt-commits: 52aeca2db20bd3304407bf1a1fca4e5a827db243
wpt-pr: 19868

Differential Revision: https://phabricator.services.mozilla.com/D53467
This commit is contained in:
Oriol Brufau 2019-11-04 10:46:40 +00:00 коммит произвёл moz-wptsync-bot
Родитель 5c9707282b
Коммит d033a98b8d
2 изменённых файлов: 97 добавлений и 0 удалений

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

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Reference: String value of list-style-type with Ahem font</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@gmail.com">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
main {
width: 300px;
overflow: auto;
padding: 10px 0;
}
pre {
font: 10px/1 Ahem;
margin: 0;
width: 100%;
padding-right: 70px;
}
</style>
</head>
<body>
<main>
<pre> É1 1É </pre>
<pre> XXXÉ2 2ÉXXX </pre>
<pre> XXXpppÉ3 3ÉXXXppp </pre>
<pre> XXX ppp É4 4É XXX ppp </pre>
<pre> XXX pppÉ5 5ÉXXX ppp </pre>
<pre>XX Xp pp É6 6É XX Xp pp</pre>
<pre>X X Xp p pÉ7 7ÉX X Xp p p</pre>
<pre>XX XXXpXXXÉ8 8ÉXXXXpXX XX</pre>
<pre>X XXXpXXX É9 9É XXXXpXX X</pre>
</main>
</body>
</html>

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

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>String value of list-style-type with Ahem font</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@gmail.com">
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#valdef-list-style-type-string">
<link rel="match" href="list-style-type-string-007-ref.html">
<meta name="assert" content="This test checks that list-style-type can set the marker string with the Ahem font.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
main {
width: 300px;
overflow: auto;
padding: 10px 0;
}
.list {
font: 10px/1 Ahem;
padding-inline-start: 100px;
margin: 0;
width: 50px;
float: left;
}
.rtl { direction: rtl; }
.list > :nth-child(1) { list-style-type: ""; }
.list > :nth-child(2) { list-style-type: "XXX"; }
.list > :nth-child(3) { list-style-type: "XXXppp"; }
.list > :nth-child(4) { list-style-type: " XXX ppp "; }
.list > :nth-child(5) { list-style-type: "XXX ppp"; }
.list > :nth-child(6) { list-style-type: " XX Xp pp "; }
.list > :nth-child(7) { list-style-type: "X X Xp p p"; }
.list > :nth-child(8) { list-style-type: "XXXXpXX XXXpXXX"; }
.list > :nth-child(9) { list-style-type: " XXXXpXX XXXpXXX "; }
</style>
</head>
<body>
<main>
<ol class="list">
<li>É1</li>
<li>É2</li>
<li>É3</li>
<li>É4</li>
<li>É5</li>
<li>É6</li>
<li>É7</li>
<li>É8</li>
<li>É9</li>
</ol>
<ul class="list rtl">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</main>
</body>
</html>