Commit f2ae34fa authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@85490ed4d7ecc55740c8152fcea3a0140dde22f8

Using wpt-import in Chromium e59817eb.

Build: https://build.chromium.org/p/chromium.infra.cron/builders/wpt-importer/builds/6556

Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

Directory owners for changes in this CL:
drott@chromium.org, kojii@chromium.org:
  external/wpt/css/css-fonts

TBR=qyearsley

No-Export: true
Change-Id: I8dccb65f75d393473fe8d67b3802e4725c0a0d0b
Reviewed-on: https://chromium-review.googlesource.com/804356
Commit-Queue: Blink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Reviewed-by: default avatarBlink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521104}
parent 73648c63
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS-fonts: reference file</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<style>
@font-face {
font-family: 'B';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
}
div {
width: 1ex;
height: 1ex;
font-size: 200px;
background: blue;
font-family: 'B';
}
</style>
<p>Test passes if there is <strong>a blue square</strong> below.
<div></div>
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS-fonts: first available font and the ex unit</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-fonts-3/#first-available-font">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#first-available-font">
<link rel="match" href="first-available-font-001-ref.html">
<meta name="flags" content="">
<meta name="assert" content="Fonts that do not include the U+0020 character are not considered the first available font (used to determine the ex unit), even when at the start of the font list.">
<style>
/* Two arbitrary fonts with different metrics */
@font-face {
font-family: 'A-no-space';
font-style: normal;
font-weight: 400;
src: url(support/Revalia.woff) format('woff');
unicode-range: U+0061; /* Not including U+0020, so it cannot be the first available font*/
}
@font-face {
font-family: 'B';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
}
div {
width: 1ex;
height: 0.5ex;
font-size: 200px;
background: blue;
position: absolute;
}
#t1 { font-family: 'B', sans-serif; margin-top: 0.5ex; } /* half a square, shifted down */
#t2 { font-family: 'A-no-space', 'B', monospace; } /* Should use B as the first available font, and therefore be the same size as t1 */
/* Both elements are using different generic fallback fonts, so that they end up being sized differently if web-fonts fail to load. */
</style>
<p>Test passes if there is <strong>a blue square</strong> below.
<div id=t1></div>
<div id=t2></div>
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS-fonts: reference file</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<style>
@font-face {
font-family: 'B';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
}
div {
width: 1ch;
height: 1ch;
font-size: 200px;
background: blue;
font-family: 'B';
}
</style>
<p>Test passes if there is <strong>a blue square</strong> below.
<div></div>
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS-fonts: first available font and the ch unit</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-fonts-3/#first-available-font">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#first-available-font">
<link rel="match" href="first-available-font-002-ref.html">
<meta name="flags" content="">
<meta name="assert" content="Fonts that do not include the U+0020 character are not considered the first available font (used to determine the ch unit), even when at the start of the font list.">
<style>
/* Two arbitrary fonts with different metrics */
@font-face {
font-family: 'A-no-space';
font-style: normal;
font-weight: 400;
src: url(support/Revalia.woff) format('woff');
unicode-range: U+0061; /* Not including U+0020, so it cannot be the first available font*/
}
@font-face {
font-family: 'B';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
}
div {
width: 1ch;
height: 0.5ch;
font-size: 200px;
background: blue;
position: absolute;
}
#t1 { font-family: 'B', sans-serif; margin-top: 0.5ch; } /* half a square, shifted down */
#t2 { font-family: 'A-no-space', 'B', monospace; } /* Should use B as the first available font, and therefore be the same size as t1 */
/* Both elements are using different generic fallback fonts, so that they end up being sized differently if web-fonts fail to load. */
</style>
<p>Test passes if there is <strong>a blue square</strong> below.
<div id=t1></div>
<div id=t2></div>
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS-fonts: reference file</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<style>
@font-face {
font-family: 'A';
font-style: normal;
font-weight: 400;
src: url(support/Revalia.woff) format('woff');
}
div {
position: absolute;
line-height: normal;
font-size: 100px;
color: transparent;
border: solid black 1px;
width: 100px;
font-family: A;
}
.ba { margin-left: 100px; }
</style>
<p>There should be <strong>two identically sized rectangles</strong> below.
<div class="ba">a</div>
<div class="a">a</div>
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS-fonts: first available font and the strut</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-fonts-3/#first-available-font">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#first-available-font">
<link rel="match" href="first-available-font-003-ref.html">
<meta name="flags" content="">
<meta name="assert" content="The strut, which impacts the line height, is taken from the primary font, which is the first font to include the U+0020 character.">
<style>
/* Two arbitrary fonts with different metrics */
@font-face {
font-family: 'A';
font-style: normal;
font-weight: 400;
src: url(support/Revalia.woff) format('woff');
}
@font-face {
font-family: 'B-no-space';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
unicode-range: U+0062;
}
div {
position: absolute;
line-height: normal;
font-size: 100px;
color: transparent;
border: solid black 1px;
width: 100px;
}
.a { font-family: A; }
.ba { font-family: B-no-space, A; margin-left: 100px; }
</style>
<p>There should be <strong>two identically sized rectangles</strong> below.
<!-- Both divs show the same content with the same font,
but the first div has an unused font earlier in the list,
while the second one does not.
However, that font does not include the U+0020 character,
and can therefore not be the first available font.
If it had been, it would affect the height of the strut,
making the height different.
Since it is not, both boxes are expected to be the same height. -->
<div class="ba">a</div>
<div class="a">a</div>
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS-fonts: first available font and the strut</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-fonts-3/#first-available-font">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#first-available-font">
<link rel="match" href="first-available-font-003-ref.html">
<meta name="flags" content="">
<meta name="assert" content="The strut, which impacts the line height, is taken from the primary font, which is the first font to include the U+0020 character.
The fact that that font is used somewhere else in the page makes no difference.">
<style>
/* Two arbitrary fonts with different metrics */
@font-face {
font-family: 'A';
font-style: normal;
font-weight: 400;
src: url(support/Revalia.woff) format('woff');
}
@font-face {
font-family: 'B-no-space';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
unicode-range: U+0062;
}
div {
position: absolute;
line-height: normal;
font-size: 100px;
color: transparent;
border: solid black 1px;
width: 100px;
}
.a { font-family: A; }
.ba { font-family: B-no-space, A; margin-left: 100px; }
.loader { font-family: B-no-space; border: none; }
</style>
<p>There should be <strong>two identically sized rectangles</strong> below.
<div class=loader>b</div>
<!-- Both divs show the same content with the same font,
but the first div has an unused font earlier in the list,
while the second one does not.
However, that font does not include the U+0020 character,
and can therefore not be the first available font.
If it had been, it would affect the height of the strut,
making the height different.
Since it is not, both boxes are expected to be the same height. -->
<div class="ba">a</div>
<div class="a">a</div>
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS fonts test: baseline position with explicit sizing, no space in first font</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<p>Test passes if there is <strong>no red</strong> below.
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS fonts test: baseline position with explicit sizing, no space in first font</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-fonts-3/#first-available-font">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#first-available-font">
<link rel="match" href="first-available-font-005-ref.html">
<meta name="flags" content="">
<meta name="assert" content="The position of the baseline in an inline-level box whose height is determined by a non-normal value of line-height
does depend on the primary font, which is the first that contains U+0020.">
<style>
@font-face {
font-family: 'A-no-space';
font-style: normal;
font-weight: 400;
src: url(support/Revalia.woff) format('woff');
unicode-range: U+0061;
}
@font-face {
font-family: 'B-no-space';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
unicode-range: U+0061;
}
@font-face {
font-family: 'B';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
}
div {
position: absolute;
line-height: 100px;
font-size: 100px;
width: 300px; /* plenty of room for the (invisible) text */
text-align: right;
color: transparent;
outline: solid;
}
span { /* visible thing aligned to the baseline, and small enough to not influence its position */
display: inline-block;
width: 20px;
height: 20px;
}
/* white #a is on top of red #b,
The first font in their respective lists do no contain U+0020,
and therfore the first available font should be the next one, which is the same.
Since the baseline should be based on the primary font,
their baselines should line up and red #b should be invisible.*/
#a { font-family: A-no-space, B; }
#a span { background: red; }
#b { font-family: B-no-space, B; }
#b span { background: white; }
</style>
<p>Test passes if there is <strong>no red</strong> below.
<div id=a>bb<span></span></div>
<div id=b>bb<span></span></div>
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS fonts test: baseline position with explicit sizing, no space in first font</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-fonts-3/#first-available-font">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#first-available-font">
<link rel="match" href="first-available-font-005-ref.html">
<meta name="flags" content="">
<meta name="assert" content="The position of the baseline in an inline-level box whose height is determined by a non-normal value of line-height
does depend on the primary font, which is the first that contains U+0020.">
<style>
@font-face {
font-family: 'A-no-space';
font-style: normal;
font-weight: 400;
src: url(support/Revalia.woff) format('woff');
unicode-range: U+0061;
}
@font-face {
font-family: 'B-no-space';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
unicode-range: U+0061;
}
@font-face {
font-family: 'B';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
}
div {
position: absolute;
line-height: 100px;
font-size: 100px;
width: 300px; /* plenty of room for the (invisible) text */
text-align: right;
color: transparent;
outline: solid;
}
span { /* visible thing aligned to the baseline, and small enough to not influence its position */
display: inline-block;
width: 20px;
height: 20px;
}
/* white #a is on top of red #b,
The first font in their respective lists do no contain U+0020,
and therfore the first available font should be the next one, which is the same.
Since the baseline should be based on the primary font,
their baselines should line up and red #b should be invisible.
The fact that that font is used should make no difference.
*/
#a { font-family: A-no-space, B; }
#a span { background: red; }
#b { font-family: B-no-space, B; }
#b span { background: white; }
</style>
<p>Test passes if there is <strong>no red</strong> below.
<div id=a>aa<span></span></div>
<div id=b>aa<span></span></div>
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS-fonts: inline level box content height and first available font, missing U+0020</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-fonts-3/#first-available-font">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#first-available-font">
<link rel="match" href="first-available-font-005-ref.html">
<meta name="flags" content="">
<meta name="assert" content="The height of the content area of an inline-level depends only on the first available font, which is the first one to include U+0020.">
<style>
/* Two Arbitrary fonts with different metrics. One has a taller ascender, the other a deeper descender. */
@font-face {
font-family: 'A-no-space';
font-style: normal;
font-weight: 400;
src: url(support/Revalia.woff) format('woff');
unicode-range: U+0061;
}
@font-face {
font-family: 'B';
font-style: normal;
font-weight: 400;
src: url(support/AD.woff) format('woff');
}
div {
font-size: 50px;
display: inline-block;
width: 40px;
overflow: hidden;
}
span { color: transparent; }
div:nth-of-type(1) {
font-family: B;
}
div:nth-of-type(1) span { background: red; }
/* The second div should have the same first available font as the first one, since A-no-space does no include U+0020.
Both div's span's should thefore overflap exactly, with the white one hiding the red.
*/
div:nth-of-type(2) {
font-family: A-no-space, B;
margin-left: -40px;
}
div:nth-of-type(2) span { background: white; }
</style>
<p>Test passes if there is <strong>no red</strong> below.
<div><span>aaaaa</span></div><div><span>aaaaa</span></div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment