Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / whitespace / nowrap-line-break-after-white-space.html
blob9d2135fef116da926c5594717f8b24d56b19e1a3
1 <p>
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.
4 </p>
5 <p>
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.
8 </p>
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&nbsp;&nbsp;&nbsp;
11 </div>
12 <div id="reference" style="float: left;">
13 Lorem ipsum dolor sit amet&nbsp;&nbsp;&nbsp;
14 </div>
15 <div id="result">
16 </div>
17 <script>
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";
31 </script>