Bug 1439965 [wpt PR 9605] - Add test for whitespace: nowrap and float:left, a=testonly

Automatic update from web-platform-testsAdd test for whitespace: nowrap and float:left

When whitespace: nowrap is specified, text should not wrap unless it is
forced to (e.g. by the width of the container, a break, etc). This
includes if content is floated; the float should just move before the
cotent on the same line.

This test comes from
https://bugzilla.mozilla.org/show_bug.cgi?id=488725, as it turns out
that Firefox does not follow the spec correctly here.

--
Address reviewer comments

--
Move reference file

wpt-commits: c221fc79aacacd1d3e1fa12b50c6f5213ad720fc, 8e84ffc2c96f52967533f3cabb1a8ab80a98e6fe, 7d1bf740cf22612d712e15c6e50be43324c77228
wpt-pr: 9605
wpt-commits: c221fc79aacacd1d3e1fa12b50c6f5213ad720fc, 8e84ffc2c96f52967533f3cabb1a8ab80a98e6fe, 7d1bf740cf22612d712e15c6e50be43324c77228
wpt-pr: 9605
This commit is contained in:
Stephen McGruer 2018-04-09 16:52:49 +00:00 committed by James Graham
parent 6354070dee
commit d0666c0eb4
3 changed files with 82 additions and 0 deletions

View File

@ -132975,6 +132975,18 @@
{}
]
],
"css/css-text/line-breaking/line-breaking-012.html": [
[
"/css/css-text/line-breaking/line-breaking-012.html",
[
[
"/css/css-text/line-breaking/reference/line-breaking-012-ref.html",
"=="
]
],
{}
]
],
"css/css-text/line-breaking/line-breaking-ic-001.html": [
[
"/css/css-text/line-breaking/line-breaking-ic-001.html",
@ -254377,6 +254389,11 @@
{}
]
],
"css/css-text/line-breaking/reference/line-breaking-012-ref.html": [
[
{}
]
],
"css/css-text/line-breaking/reference/line-breaking-ic-001-ref.html": [
[
{}
@ -514203,6 +514220,10 @@
"acb72d2a4c3d5b74e63652ea19c3ed13cf1755ea",
"reftest"
],
"css/css-text/line-breaking/line-breaking-012.html": [
"e9faec31d9058bb61a9e41ba62b1f57082ae3ee2",
"reftest"
],
"css/css-text/line-breaking/line-breaking-ic-001.html": [
"1ae52aede1788270943bb03bb44d1c391a65a0b3",
"reftest"
@ -514219,6 +514240,10 @@
"06870b5369af27006026689d97b057f7816b4c3c",
"support"
],
"css/css-text/line-breaking/reference/line-breaking-012-ref.html": [
"dad351b104faeae8bc8d16632c7e57d01a0fdab7",
"support"
],
"css/css-text/line-breaking/reference/line-breaking-ic-001-ref.html": [
"7757ffc4116743ff6f98649310bf8b1bdc7027c9",
"support"

View File

@ -0,0 +1,40 @@
<!doctype html>
<html>
<meta charset="utf-8">
<title>CSS Text — line breaking for nowrap and floats</title>
<meta name=assert content="When whitespace: nowrap is specified, floats should not cause line breaks">
<link rel=help href="https://www.w3.org/TR/css-text-3/#white-space-property">
<link rel=match href="reference/line-breaking-012-ref.html">
<style>
.container {
position: relative;
color:green;
line-height: 1em;
font-family: Ahem;
font-size: 20px;
}
.wrapper {
white-space: nowrap;
}
span {
float: left;
}
.fail {
color: red;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
</style>
<body>
<p>There should be a green rectangle and no red.</p>
<div class="container">
<div class="fail">XX</div>
<div class="wrapper">X<span>X<span></div>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<!doctype html>
<html>
<meta charset="utf-8">
<title>Reference File for line breaking tests</title>
<style>
div {
color:green;
line-height: 1em;
font-family: Ahem;
font-size: 20px;
}
</style>
<body>
<p>There should be a green rectangle and no red.</p>
<div>XX</div>
</body>
</html>