diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-09-16 10:23:28 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-09-16 13:25:06 +0000 |
commit | 6a79d6ee643f70c20a68fc7221ef9e4f81956516 (patch) | |
tree | 13f0ea5330b2657bbfb54de138ac55f69a4c3994 /tests/wpt/web-platform-tests/css/css-text | |
parent | 5d4dac8cf2257ad9d5ac6509a1ac484d647695f0 (diff) | |
download | servo-6a79d6ee643f70c20a68fc7221ef9e4f81956516.tar.gz servo-6a79d6ee643f70c20a68fc7221ef9e4f81956516.zip |
Update web-platform-tests to revision 0bfde9f6a8bfde0fde4dba73d7172a8eed6e946e
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-text')
9 files changed, 226 insertions, 97 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-keep-all-001.html b/tests/wpt/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-keep-all-001.html new file mode 100644 index 00000000000..ec27b82b6bf --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-keep-all-001.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<title>CSS Test: `break-word` should work with `word-break: keep-all`</title> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word"> +<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org"> +<meta charset="utf-8"> +<style> +div { + overflow-wrap: break-word; + word-break: keep-all; + font-size: 10px; + width: 7ch; + line-height: 20px; + background: lightgray; + margin-bottom: 1em; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> + <div>0000000000</div> + <div>헬로우월드헬로우월드헬로우월드헬로우월드헬로우월드</div> +<script> +for (let e of document.getElementsByTagName('div')) { + test(() => { + // All boxes should wrap to more than 1 line. + assert_greater_than(e.offsetHeight, 20); + }, e.textContent); +} +</script> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-ideographic-space-001-ref.html b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-ideographic-space-001-ref.html index d62252f8c54..aa97e2bc834 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-ideographic-space-001-ref.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-ideographic-space-001-ref.html @@ -2,6 +2,16 @@ <meta charset="utf-8"> <title>CSS test reference</title> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<style> +div { + line-height: 1; + color: transparent; + background: green; + float: left; + clear: left; +} +</style> -<p>Test passes if the characters below are arranged in a square and if there is no red. -<div>ああ<br>ああ</div> +<p>Test passes if the shape below is green and if there is no red. + +<div>あああ</div><div>ああ</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-ideographic-space-002-ref.html b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-ideographic-space-002-ref.html new file mode 100644 index 00000000000..7563151d4d7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-ideographic-space-002-ref.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS test reference</title> +<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> +<style> +div { + line-height: 1; + color: transparent; + background: green; + float: left; + clear: left; +} +</style> + +<p>Test passes if the shape below is green and if there is no red. + +<div>ああああ あ あ</div> +<div>ああ</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-other-space-separators-001-ref.html b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-other-space-separators-001-ref.html index 34e60ff0721..e406b86a3a4 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-other-space-separators-001-ref.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/trailing-other-space-separators-001-ref.html @@ -1,26 +1,19 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>Test reference</title> +<title>CSS test reference</title> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <style> -div { font-family: monospace; } +div { + line-height: 1; + color: transparent; + background: green; + float: left; + clear: left; + white-space: pre; +} </style> -<p>Test passes if there are two columns of "x" characters below and no red. +<p>Test passes if the shape below is green and if there is no red. -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> -<div>xx<br>xx</div> +<div>xx                    </div> +<div>xx</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-ideographic-space-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-ideographic-space-001.html index 241ca11a065..82a1d4ca20a 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-ideographic-space-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-ideographic-space-001.html @@ -1,14 +1,28 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Text level 3 Test: ideographic space at the end of line must be removed</title> +<title>CSS Text level 3 Test: ideographic space at the end of line must hang</title> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="match" href="reference/trailing-ideographic-space-001-ref.html"> -<meta name="assert" content="An ideographic space (U+3000) at the end of the line must be removed."> +<meta name="assert" content="An ideographic space (U+3000) at the end of the line must hang."> <style> -div { width: 2em; } -span { background: red; } /* If the space hangs instead of being removed, there will be red */ +div { + position: absolute; + width: max-content; + line-height: 1; + color: transparent; +} +.red { background: red; } +.green { background: green; } </style> -<p>Test passes if the characters below are arranged in a square and if there is no red. -<div>ああ<span> </span>ああ</div> +<p>Test passes if the shape below is green and if there is no red. + +<div class=red>あああ</div> +<div class=red>ああ<span class=green> </span><br>ああ</div> +<div class=green>ああ<br>ああ</div> +<!-- the ideographic space must not be removed, + so it should hide the third red あ of the first div. + However, it should hang and therefore not extend the width of its parent div, + which would be visible as red on the second line if it were expanded. +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-ideographic-space-002.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-ideographic-space-002.html index 8830da9643b..0caf6ce62fe 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-ideographic-space-002.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-ideographic-space-002.html @@ -1,14 +1,27 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Text level 3 Test: sequence of spaces and ideographic spaces at the end of line must be removed</title> +<title>CSS Text level 3 Test: sequence of spaces and ideographic spaces at the end of line must hang</title> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> -<link rel="match" href="reference/trailing-ideographic-space-001-ref.html"> -<meta name="assert" content="An sequence ideographic space (U+3000) and regular spaces at the end of the line must be removed."> +<link rel="match" href="reference/trailing-ideographic-space-002-ref.html"> +<meta name="assert" content="An sequence ideographic space (U+3000) and regular spaces at the end of the line must hang."> <style> -div { width: 2em; } -span { background: red; } /* If the space hangs instead of being removed, there will be red */ +div { + position: absolute; + width: max-content; + line-height: 1; + color: transparent; +} +.red { background: red; } +.green { background: green; } </style> -<p>Test passes if the characters below are arranged in a square and if there is no red. -<div>ああ<span>      </span>ああ</div> +<p>Test passes if the shape below is green and if there is no red. +<div class=red>ああああ あ あ</div> +<div class=red>ああ<span class=green>      </span><br>ああ</div> +<div class=green>ああ<br>ああ</div> +<!-- the trailing sequence of spaces must not be removed, + so it should hide all of the first (red) div. + However, it should hang and therefore not extend the width of its parent div, + which would be visible as red on the second line if it were expanded. +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-001.html index 6b693f08494..ce5740bd0ed 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-001.html @@ -1,30 +1,46 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Text level 3 Test: sequence of spaces and other space separators at the end of line must be removed</title> +<title>CSS Text level 3 Test: sequence of spaces and other space separators at the end of line must hang</title> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="match" href="reference/trailing-other-space-separators-001-ref.html"> -<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must be removed."> +<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must hang."> <style> -div { font-family: monospace; width: 2ch; } -span { background: red; } /* If the space hangs instead of being removed, there will be red */ +div { + position: absolute; + width: max-content; + line-height: 1; + color: transparent; +} +.red { background: red; } +.green { background: green; } +#pre { white-space:pre; } </style> +<p>Test passes if the shape below is green and if there is no red. -<p>Test passes if there are two columns of "x" characters below and no red. - -<div>xx<span>                    </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span><wbr>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span><wbr>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> +<div class=red id=pre>xx                    </div> +<div class=red>xx<span class=green>                    </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=green>xx<br>xx</div> +<!-- the trailing sequence of spaces must not be removed, + so it should hide all of the first (red) div. + However, it should hang and therefore not extend the width of its parent div, + which would be visible as red on the second line if it were expanded. + The extra red divs with one character each are for ease of debugging: + if the first one is fine, they will all be fine, + but if it is not, they should help find which one is wrong. +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-003.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-003.html index 549c731f44d..dad554e98d5 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-003.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-003.html @@ -4,27 +4,45 @@ <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="match" href="reference/trailing-other-space-separators-001-ref.html"> -<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must be removed, with white-space:pre-line."> +<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must hang, with white-space:pre-line."> <style> -div { font-family: monospace; width: 2ch; white-space: pre-line; } -span { background: red; } /* If the space hangs instead of being removed, there will be red */ +div { + position: absolute; + width: max-content; + line-height: 1; + color: transparent; + white-space: pre-line; +} +.red { background: red; } +.green { background: green; } +#pre { white-space:pre; } </style> -<p>Test passes if there are two columns of "x" characters below and no red. +<p>Test passes if the shape below is green and if there is no red. -<div>xx<span>                    </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span><wbr>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span><wbr>xx</div> -<div>xx<span> </span>xx</div> -<div>xx<span> </span>xx</div> +<div class=red id=pre>xx                    </div> +<div class=red>xx<span class=green>                    </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=green>xx<br>xx</div> +<!-- the trailing sequence of spaces must not be removed, + so it should hide all of the first (red) div. + However, it should hang and therefore not extend the width of its parent div, + which would be visible as red on the second line if it were expanded. + The extra red divs with one character each are for ease of debugging: + if the first one is fine, they will all be fine, + but if it is not, they should help find which one is wrong. +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-004.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-004.html index 90a568a8c9d..0fce061b455 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-004.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-004.html @@ -4,27 +4,44 @@ <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="match" href="reference/trailing-other-space-separators-001-ref.html"> -<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must be removed, with white-space:nowrap."> +<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must hang, with white-space:nowrap."> <style> -div { font-family: monospace; width: 2ch; white-space: nowrap; } -span { background: red; } /* If the space hangs instead of being removed, there will be red */ +div { + position: absolute; + width: max-content; + line-height: 1; + color: transparent; + white-space: nowrap; +} +.red { background: red; } +.green { background: green; } +#pre { white-space:pre; } </style> +<p>Test passes if the shape below is green and if there is no red. -<p>Test passes if there are two columns of "x" characters below and no red. - -<div>xx<span>                    </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> -<div>xx<span> </span><br>xx</div> +<div class=red id=pre>xx                    </div> +<div class=red>xx<span class=green>                    </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=red>xx<span class=green> </span><br>xx</div> +<div class=green>xx<br>xx</div> +<!-- the trailing sequence of spaces must not be removed, + so it should hide all of the first (red) div. + However, it should hang and therefore not extend the width of its parent div, + which would be visible as red on the second line if it were expanded. + The extra red divs with one character each are for ease of debugging: + if the first one is fine, they will all be fine, + but if it is not, they should help find which one is wrong. +--> |