diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-09-27 10:23:59 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-09-27 13:51:36 +0000 |
commit | 3f940e3f4cf9d16c34938bf44f3900b2694979dd (patch) | |
tree | 9197a9acb94b76a391fddb90922f0315540581c2 /tests/wpt/web-platform-tests/css/css-text | |
parent | 5fd4467cb3daae0e8cb6f2ceaa2d560f3566e952 (diff) | |
download | servo-3f940e3f4cf9d16c34938bf44f3900b2694979dd.tar.gz servo-3f940e3f4cf9d16c34938bf44f3900b2694979dd.zip |
Update web-platform-tests to revision 90e1ee27eede63cf117f19c1e55553cc1881aef0
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-text')
18 files changed, 452 insertions, 4 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-text/hanging-punctuation/hanging-punctuation-inline-001.html b/tests/wpt/web-platform-tests/css/css-text/hanging-punctuation/hanging-punctuation-inline-001.html new file mode 100644 index 00000000000..9be9947fe11 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/hanging-punctuation/hanging-punctuation-inline-001.html @@ -0,0 +1,24 @@ +<!doctype html> +<html lang=en> + +<title>CSS Test: hanging-punctuation - force-end - basic cases</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<link rel="help" href="http://www.w3.org/TR/css-text-3/#hanging-punctuation"> +<link rel="match" href="reference/hanging-punctuation-inline-001-ref.html"> +<meta name="assert" content="hanging punctuation applies to inlines"> +<style> +div { font-size: 2em; } +#ref { color: blue; } +#test { + width: 4em; + color: orange; +} +#test span { + hanging-punctuation: last; +} +</style> + +<p>Test passes if the orange and blue pieces of text are laid out identically. + +<div id=ref>字字字字」</div> +<div id=test>字字字字<span>」</span></div> diff --git a/tests/wpt/web-platform-tests/css/css-text/hanging-punctuation/reference/hanging-punctuation-inline-001-ref.html b/tests/wpt/web-platform-tests/css/css-text/hanging-punctuation/reference/hanging-punctuation-inline-001-ref.html new file mode 100644 index 00000000000..b679e5b9131 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/hanging-punctuation/reference/hanging-punctuation-inline-001-ref.html @@ -0,0 +1,15 @@ +<!doctype html> +<html lang=en> + +<title>test reference</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<style> +div { font-size: 2em; } +#ref { color: blue; } +#test { color: orange; } +</style> + +<p>Test passes if the orange and blue pieces of text are laid out identically. + +<div id=ref>字字字字」</div> +<div id=test>字字字字」</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-breaking/line-breaking-021.html b/tests/wpt/web-platform-tests/css/css-text/line-breaking/line-breaking-021.html new file mode 100644 index 00000000000..b3b907410e8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/line-breaking/line-breaking-021.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Test: Simple line breaking test</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-details"> +<link rel="match" href="reference/line-breaking-021-ref.html"> +<meta name=assert content="Line breaking behavior defined for the ZWJ line-breaking classes in [UAX14] must be honored."> +<style> +div { + width: 0; +} +</style> + +<p>This test passes if there the text below is on a single line. + +<div>じ‍字‍자‍😂‍😭</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-breaking/reference/line-breaking-021-ref.html b/tests/wpt/web-platform-tests/css/css-text/line-breaking/reference/line-breaking-021-ref.html new file mode 100644 index 00000000000..b1cc22bd204 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/line-breaking/reference/line-breaking-021-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>test reference</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net"> +</style> + +<p>This test passes if there the text below is on a single line. + +<div>じ‍字‍자‍😂‍😭</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/text-align/reference/text-align-last-wins-001-ref.html b/tests/wpt/web-platform-tests/css/css-text/text-align/reference/text-align-last-wins-001-ref.html new file mode 100644 index 00000000000..997d58a7988 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/text-align/reference/text-align-last-wins-001-ref.html @@ -0,0 +1,16 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>test reference</title> +<style> +div { + text-align: right; + width: 300px; + border: solid; +} +</style> + +<p>Test passes if the words below are aligned to the right of the box. + +<div>right<br>right</div> + diff --git a/tests/wpt/web-platform-tests/css/css-text/text-align/text-align-last-wins-001.html b/tests/wpt/web-platform-tests/css/css-text/text-align/text-align-last-wins-001.html new file mode 100644 index 00000000000..30f1a07864b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/text-align/text-align-last-wins-001.html @@ -0,0 +1,20 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS text test: text-align-last has precedence over text-align-all</title> +<link rel=help href="https://drafts.csswg.org/css-text-3/#text-align-all-property"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#text-align-last-property"> +<link rel="match" href="reference/text-align-last-wins-001-ref.html"> +<meta name=assert content="If a line is both the first and last line, text-align-last applies"> +<style> +div { + text-align-last: right; + width: 300px; + border: solid; +} +</style> + +<p>Test passes if the words below are aligned to the right of the box. + +<div>right<br>right</div> + diff --git a/tests/wpt/web-platform-tests/css/css-text/text-justify/reference/text-justify-006-ref.html b/tests/wpt/web-platform-tests/css/css-text/text-justify/reference/text-justify-006-ref.html new file mode 100644 index 00000000000..595485c5f4e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/text-justify/reference/text-justify-006-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html lang="en" > +<head> +<meta charset="utf-8"> +<title>test reference</title> +<link rel='author' title='Florian Rivoal' href='https://florian.rivoal.net'> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 20px/1 Ahem; + white-space: pre; +} +#ref { + color: orange; +} +#test { + color: blue; +} + +/* this is just filler content to have an invisible last line, as jutification does not affect the last line */ +a { color: white; } +</style> + +<p>Test passes if the the blue and orange boxes are aligned. + +<div id=ref>X X X X</div> +<div id=test>X X X X</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/text-justify/text-justify-006.html b/tests/wpt/web-platform-tests/css/css-text/text-justify/text-justify-006.html new file mode 100644 index 00000000000..7744f52afea --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/text-justify/text-justify-006.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html lang="en" > +<head> +<meta charset="utf-8"> +<title>CSS text tests: text-justify applies inline</title> +<link rel='author' title='Florian Rivoal' href='https://florian.rivoal.net'> +<link rel='help' href='https://drafts.csswg.org/css-text-3/#text-justify-property'> +<link rel='match' href='reference/text-justify-006-ref.html'> +<meta name="assert" content="text-justify applies to inline elements"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 20px/1 Ahem; + width: 11ch; +} +#ref { + white-space: pre; + color: orange; +} +#test { + text-align: justify; + color: blue; +} +span { + text-justify: none; +} + +/* this is just filler content to have an invisible last line, as jutification does not affect the last line */ +a { color: white; } +</style> + +<p>Test passes if the the blue and orange boxes are aligned. + +<div id=ref>X X X X</div> +<div id=test>X <span>X X</span> X <a>###########</a></div> diff --git a/tests/wpt/web-platform-tests/css/css-text/text-transform/reference/text-transform-fullwidth-008-ref.html b/tests/wpt/web-platform-tests/css/css-text/text-transform/reference/text-transform-fullwidth-008-ref.html new file mode 100644 index 00000000000..efe6508e2e6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/text-transform/reference/text-transform-fullwidth-008-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>test reference</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 20px/1 Ahem; + margin: 1em 0; + white-space: pre; +} +</style> + +<p>Test passes if all black boxes below have the same width and height and are aligned vertically. +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/text-transform/reference/text-transform-fullwidth-009-ref.html b/tests/wpt/web-platform-tests/css/css-text/text-transform/reference/text-transform-fullwidth-009-ref.html new file mode 100644 index 00000000000..915e8444f13 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/text-transform/reference/text-transform-fullwidth-009-ref.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>test reference</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 10px/1 Ahem; + margin: 1em 0; + white-space: pre; +} +</style> + +<p>Test passes if all black boxes below have the same width and height and are aligned vertically. +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> +<div> x<br> x</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-006.html b/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-006.html index b0a509758ed..0bd0aa88400 100644 --- a/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-006.html +++ b/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-006.html @@ -9,9 +9,11 @@ <style> div { font: 50px/1 Ahem; } #test { - text-transform: fullwidth; color: green; } +span { + text-transform: full-width; +} #ref { color: red; position: absolute; @@ -21,4 +23,4 @@ div { font: 50px/1 Ahem; } <p>Test passes if there are two green squares and no red. <div id=ref>x x</div> -<div id=test>x x</div> +<div id=test>x<span> </span>x</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-007.html b/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-007.html index 6e081544a19..f1089f19ab6 100644 --- a/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-007.html +++ b/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-007.html @@ -9,10 +9,12 @@ <style> div { font: 50px/1 Ahem; } #test { - text-transform: fullwidth; color: green; white-space: pre-wrap; } +span { + text-transform: full-width; +} #ref { color: red; position: absolute; @@ -22,4 +24,4 @@ div { font: 50px/1 Ahem; } <p>Test passes if there are two green squares and no red. <div id=ref>x   x</div> -<div id=test>x x</div> +<div id=test>x<span> </span>x</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-008.html b/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-008.html new file mode 100644 index 00000000000..d6cd9c4c983 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-008.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text level 3 Test: text-transform:fullwidth and trailing spaces</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<link rel="help" href="https://www.w3.org/TR/css-text-3/#text-transform-property"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> +<link rel="match" href="reference/text-transform-fullwidth-008-ref.html"> +<meta name="assert" content="full-width does transforms U+0020 spaces to U+3000 after phase 1, but before phase 2, so that end-of-line transformed spaces get the same treatment as natural ones: hang when white-space is normal."> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 20px/1 Ahem; + margin: 1em 0; +} +.pre { + white-space: pre; +} +#test, #ref { + width: 2em; + text-align: right; +} +span { + text-transform: full-width; +} +#test2, #ref2 { + width: min-content; + margin-left: 1em; + background: black; +} +</style> + +<p>Test passes if all black boxes below have the same width and height and are aligned vertically. +<div class=pre> x<br> x</div> +<div id=ref>x x</div> +<div id=test>x<span> </span>x</div> +<div id=ref2>x x</div> +<div id=test2>x<span> </span>x</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-009.html b/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-009.html new file mode 100644 index 00000000000..afcb89b0cfc --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/text-transform/text-transform-fullwidth-009.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text level 3 Test: text-transform:fullwidth and trailing spaces, with pre-wrap</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<link rel="help" href="https://www.w3.org/TR/css-text-3/#text-transform-property"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> +<link rel="match" href="reference/text-transform-fullwidth-009-ref.html"> +<meta name="assert" content="full-width does transforms U+0020 spaces to U+3000 after phase 1, but before phase 2, so that end-of-line transformed spaces get the same treatment as natural ones: hang at the end of soft-wrapped lines, and conditionally hang before forced breaks when white-space is pre-wrap."> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 10px/1 Ahem; + margin: 1em 0; +} +.pre { + white-space: pre; +} +#test, #ref, +#test3, #ref3 { + width: 2em; + text-align: right; + white-space: pre-wrap; +} +#test3, #ref3 { + margin-left: 1em; +} +span { + text-transform: full-width; +} +#test2, #ref2, +#test4, #ref4 { + width: min-content; + margin-left: 1em; + white-space: pre-wrap; + background: black; +} +</style> + +<p>Test passes if all black boxes below have the same width and height and are aligned vertically. +<div class=pre> x<br> x</div> +<div id=ref>x x</div> +<div id=test>x<span> </span>x</div> +<div id=ref2>x x</div> +<div id=test2>x<span> </span>x</div> + +<div id=ref3>x <br>x </div> +<div id=test3>x<span> </span><br>x<span> </span></div> +<div id=ref4>x <br>x </div> +<div id=test4>x<span> </span><br>x<span> </span></div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/seg-break-transformation-018.html b/tests/wpt/web-platform-tests/css/css-text/white-space/seg-break-transformation-018.html new file mode 100644 index 00000000000..2faf185856b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/seg-break-transformation-018.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text level 3 Test: inline element boundary and segment break transformations</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-encoding"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform"> +<link rel=match href="../../reference/ref-filled-green-100px-square.xht"> +<meta name="assert" content="intervening inline box boundaries must be ignored for segment break transformations"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 20px/1 Ahem; + color: green; +} +#b { border-right: solid 20px green; } +#p { padding-right: 20px; background: green; } +#m { margin-right: 20px; } +#m2 { margin-right: -20px; } + +#red { + width: 100px; + height: 100px; + background: red; + position: absolute; + z-index: -1; +} +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>. + +<div id=red></div> + +<div>aa​ +bbb</div> + +<div>aa<span>​</span> +bbb</div> + +<div>aa<span id=b>​</span> +bb</div> + +<div>aa<span id=p>​</span> +bb</div> + +<div>aa<span id=m>​</span><span id=m2></span> +bbb</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/seg-break-transformation-019.html b/tests/wpt/web-platform-tests/css/css-text/white-space/seg-break-transformation-019.html new file mode 100644 index 00000000000..afbba264252 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/seg-break-transformation-019.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text level 3 Test: out of flow elements and segment break transformations</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-encoding"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform"> +<link rel=match href="../../reference/ref-filled-green-100px-square.xht"> +<meta name="assert" content="Out-of-flow elements must be ignored for segment break transformations"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 20px/1 Ahem; + color: green; +} +aside { + color: transparent; +} +#abs { position: absolute; } +#fixed { position: fixed; } +#float-r { float: right; } +#float-l { float: left; margin-left: -3em; } +#red { + width: 100px; + height: 100px; + background: red; + position: absolute; + z-index: -1; +} +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>. + +<div id=red></div> + +<div>aa​ +bbb</div> + +<div>aa​<aside id=abs>foo</aside> +bbb</div> + +<div>aa​<aside id=fixed>foo</aside> +bbb</div> + +<div>aa​<aside id=float-r>foo</aside> +bbb</div> + +<div>aa​<aside id=float-l>foo</aside> +bbb</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-keep-all-007.html b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-keep-all-007.html new file mode 100644 index 00000000000..e1bc9a52053 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-keep-all-007.html @@ -0,0 +1,30 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS-Text test: word-break keep-all + pre-wrap does not affect U+3000</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net"> +<meta name=flags content=""> +<meta name=assert content="U+3000, despite being called Ideographic Space, does not belong to the ID line breaking class, or any other class whose wrapping opportunities are suppressed by word-break:keep-all. A break after it should still be allowed. white-space:pre-wrap doesn't change that."> +<link rel="match" href="reference/word-break-keep-all-005-ref.html"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#valdef-word-break-keep-all"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> +<style> +div { + width: 4em; + word-break: keep-all; + white-space: pre-wrap; +} +</style> + +<p>This test passes if the four characters below are arranged in a two-by-two square. +<div lang=ja>字字 字字</div> +<!-- +If keep-all has no effect at all, breaks are allowed everywhere, +and the result will be: + 字字 字 + 字 + +If keep-all correctly suppresses wrapping opportunities between CJK ideographs +but also incorrectly suppresses the wrapping opportunity after U+3000, +no wrapping is possible, and the result will be: + 字字 字字 +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-keep-all-008.html b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-keep-all-008.html new file mode 100644 index 00000000000..16529b0619e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-keep-all-008.html @@ -0,0 +1,30 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS-Text test: word-break keep-all + break-spaces does not affect U+3000</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net"> +<meta name=flags content=""> +<meta name=assert content="U+3000, despite being called Ideographic Space, does not belong to the ID line breaking class, or any other class whose wrapping opportunities are suppressed by word-break:keep-all. A break after it should still be allowed. white-space:break-spaces doesn't change that."> +<link rel="match" href="reference/word-break-keep-all-005-ref.html"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#valdef-word-break-keep-all"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> +<style> +div { + width: 4em; + word-break: keep-all; + white-space: break-spaces; +} +</style> + +<p>This test passes if the four characters below are arranged in a two-by-two square. +<div lang=ja>字字 字字</div> +<!-- +If keep-all has no effect at all, breaks are allowed everywhere, +and the result will be: + 字字 字 + 字 + +If keep-all correctly suppresses wrapping opportunities between CJK ideographs +but also incorrectly suppresses the wrapping opportunity after U+3000, +no wrapping is possible, and the result will be: + 字字 字字 +--> |