2 This tests that
<tt>-webkit-line-break: after-white-space
</tt>
3 trailing space truncation is not applied to text that does not auto-wrap.
6 This box should have an active horizontal scrollbar, allowing the text to
7 be scrolled to the left, making the trailing space on the right visible.
9 <div id=
"target" style=
"border: solid; width: 100px; white-space: nowrap; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; overflow-x: scroll;">
10 Lorem ipsum dolor sit amet
12 <div id=
"reference" style=
"float: left;">
13 Lorem ipsum dolor sit amet
18 if (window
.testRunner
)
19 testRunner
.dumpAsText();
21 var target
= document
.getElementById("target");
22 var reference
= document
.getElementById("reference");
23 var result
= document
.getElementById("result");
25 var referenceWidth
= reference
.offsetWidth
;
26 reference
.style
.display
= "none";
28 var scrollWidth
= target
.scrollWidth
;
30 result
.innerText
= Math
.abs(scrollWidth
- referenceWidth
) < 1 ? "PASS" : "FAIL";