Update web-platform-tests to revision d7afcb8708eac08a614d161d5622a48172daf7e3

This commit is contained in:
WPT Sync Bot 2019-05-15 10:40:54 -04:00 committed by Josh Matthews
parent 6f8bb4dd40
commit edff458e23
791 changed files with 17647 additions and 10322 deletions

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: support for the ch unit</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths">
<link rel="match" href="reference/ch-unit-013-ref.html">
<meta name="assert" content="When a zero glyph is not present, in horizontal writing modes the ch unit falls back to 0.5em.">
<style>
@font-face {
font-family: ChTestNoZero;
src: url(resources/ChTestNoZero.woff);
}
div {
height: 10px;
background-color: blue;
margin-top: 10px;
}
.test {
width: 5ch;
}
.ref {
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<!-- ChTestNoZero has no '0' glyph, so ch units should compute to 0.5em,
resulting in the div being 100px wide. -->
<div class="test" style="font: 40px ChTestNoZero;"></div>
<div class="ref"></div>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: support for the ch unit</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths">
<link rel="match" href="reference/ch-unit-013-ref.html">
<meta name="assert" content="When a zero glyph is not present, in vertical mixed writing modes the ch unit falls back to 0.5em.">
<style>
@font-face {
font-family: ChTestNoZero;
src: url(resources/ChTestNoZero.woff);
}
div {
height: 10px;
background-color: blue;
margin-top: 10px;
}
.test {
writing-mode: vertical-rl;
width: 5ch;
}
.ref {
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<!-- ChTestNoZero has no '0' glyph, so ch units should compute to 0.5em,
resulting in the div being 100px wide. -->
<div class="test" style="font: 40px ChTestNoZero;"></div>
<div class="ref"></div>

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: support for the ch unit</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths">
<link rel="match" href="reference/ch-unit-013-ref.html">
<meta name="assert" content="When a zero glyph is not present, in vertical upright writing modes the ch unit falls back to 1em.">
<style>
@font-face {
font-family: ChTestNoZero;
src: url(resources/ChTestNoZero.woff);
}
div {
height: 10px;
background-color: blue;
margin-top: 10px;
}
.test {
writing-mode: vertical-rl;
text-orientation: upright;
width: 5ch;
}
.ref {
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<!-- ChTestNoZero has no '0' glyph, and we have a vertical writing mode
with upright glyphs, so ch units should compute to 1em, resulting in
the div being 100px wide. -->
<div class="test" style="font: 20px ChTestNoZero;"></div>
<div class="ref"></div>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: support for the ch unit</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths">
<link rel="match" href="reference/ch-unit-013-ref.html">
<meta name="assert" content="The ch unit is equal to 0em if the zero glyph's advance is 0.">
<style>
@font-face {
font-family: ChTestZeroWidthZero;
src: url(resources/ChTestZeroWidthZero.woff);
}
div {
height: 10px;
background-color: blue;
margin-top: 10px;
}
.test {
width: calc(100px + 5ch);
}
.ref {
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<!-- The '0' glyph in ChTestZeroWidthZero has a horizontal advance of
zero, so ch units should compute to 0em, resulting in the div being
100px wide. -->
<div class="test" style="font: 20px ChTestZeroWidthZero;"></div>
<div class="ref"></div>

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: support for the ch unit</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths">
<link rel="match" href="reference/ch-unit-013-ref.html">
<meta name="assert" content="In vertical upright writing modes, the ch unit is equal to the vertical advance of the zero glyph.">
<style>
@font-face {
font-family: ChTestShortZero;
src: url(resources/ChTestShortZero.woff);
}
div {
height: 10px;
background-color: blue;
margin-top: 10px;
}
.test {
writing-mode: vertical-rl;
text-orientation: upright;
width: 5ch;
}
.ref {
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<!-- ChTestShortZero has a '0' glyph whose vertical advance is a quarter
of the units per em, so ch units in vertical upright writing modes
should compute to 0.25em, resulting in the div being 100px width. -->
<div class="test" style="font: 80px ChTestShortZero;"></div>
<div class="ref"></div>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: support for the ch unit</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths">
<link rel="match" href="reference/ch-unit-013-ref.html">
<meta name="assert" content="When a zero glyph is not present, in horizontal writing modes and with text-orientation set to upright, the ch unit falls back to 0.5em.">
<style>
@font-face {
font-family: ChTestNoZero;
src: url(resources/ChTestNoZero.woff);
}
div {
height: 10px;
background-color: blue;
margin-top: 10px;
}
.test {
text-orientation: upright;
width: 5ch;
}
.ref {
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<!-- ChTestNoZero has no '0' glyph, so ch units should compute to 0.5em,
resulting in the div being 100px wide. -->
<div class="test" style="font: 40px ChTestNoZero;"></div>
<div class="ref"></div>

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: ex unit computation and dependencies</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css-values/#font-relative-lengths">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1529537">
<link rel="match" href="reference/ex-unit-001-ref.html">
<meta name="flags" content="ahem">
<style>
@font-face {
font-family: foo;
src: local(Ahem);
}
@font-face {
font-family: foo;
font-weight: 900;
/* It doesn't really matter if Arial is not found, as
long as we fall-back to a font with different metrics
than Ahem */
src: local(Arial);
}
div {
font-family: foo, sans-serif;
width: 10ex;
height: 20px;
background: blue;
margin: 20px;
font-size: 20px;
}
</style>
<p>All lines except the first should be the same length</p>
<div></div>
<div style="font-weight: 900"></div>
<div style="font-weight: 900; width: 10ex;"></div>
<section style="font-weight: 900"><div></div></section>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: support for the ex unit</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths">
<link rel="match" href="reference/ex-unit-002-ref.html">
<meta name="assert" content="The ex unit equals the x-height of the first available font if it has reliable metrics for the x-height.">
<style>
@font-face {
font-family: ExTest;
src: url(resources/ExTest.woff);
}
div {
height: 10px;
background-color: blue;
margin-top: 10px;
}
.test {
width: 10ex;
}
.ref {
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<!-- ExTest is a font whose OS/2 table's sxHeight field is set to an
eighth of the font's units per em, so ex units should compute to
0.125em, resulting in the div being 100px wide. -->
<div class="test" style="font: 80px ExTest;"></div>
<div class="ref"></div>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: support for the ex unit</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths">
<link rel="match" href="reference/ex-unit-002-ref.html">
<meta name="assert" content="Even in vertical writing modes, the ex unit equals the x-height of the first available font if it has reliable metrics for the x-height.">
<style>
@font-face {
font-family: ExTest;
src: url(resources/ExTest.woff);
}
div {
height: 10px;
background-color: blue;
margin-top: 10px;
}
.test {
writing-mode: vertical-rl;
width: 10ex;
}
.ref {
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<!-- ExTest is a font whose OS/2 table's sxHeight field is set to an
eighth of the font's units per em, so ex units should compute to
0.125em, resulting in the div being 100px wide. -->
<div class="test" style="font: 80px ExTest;"></div>
<div class="ref"></div>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test Reference File</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<style>
div {
height: 10px;
background-color: blue;
margin-top: 10px;
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<div></div>
<div></div>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Test Reference</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<meta name="flags" content="ahem">
<style>
div {
font-family: Arial, sans-serif;
font-weight: 900;
width: 10ex;
height: 20px;
background: blue;
margin: 20px;
font-size: 20px;
}
</style>
<p>All lines except the first should be the same length</p>
<div style="font-family: Ahem; font-weight: normal;"></div>
<div></div>
<div></div>
<div></div>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test Reference File</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<style>
div {
height: 10px;
background-color: blue;
margin-top: 10px;
width: 100px;
}
</style>
<p>The test passes if there are two blue rectangles of equal length.</p>
<div></div>
<div></div>