-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1580068 [wpt PR 18949] - [css-text] Adjust trailing space tests i…
…n response to w3c/csswg-drafts#4180, a=testonly Automatic update from web-platform-tests [css-text] Adjust trailing space tests in response to w3c/csswg-drafts#4180 (#18949) -- wpt-commits: 0bfde9f6a8bfde0fde4dba73d7172a8eed6e946e wpt-pr: 18949
- Loading branch information
1 parent
a72d13a
commit fc057f7
Showing
8 changed files
with
196 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...platform/tests/css/css-text/white-space/reference/trailing-ideographic-space-002-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
31 changes: 12 additions & 19 deletions
31
...orm/tests/css/css-text/white-space/reference/trailing-other-space-separators-001-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
26 changes: 20 additions & 6 deletions
26
testing/web-platform/tests/css/css-text/white-space/trailing-ideographic-space-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
--> |
27 changes: 20 additions & 7 deletions
27
testing/web-platform/tests/css/css-text/white-space/trailing-ideographic-space-002.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
--> |
60 changes: 38 additions & 22 deletions
60
testing/web-platform/tests/css/css-text/white-space/trailing-other-space-separators-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters