Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / collapsed-whitespace-reattach-in-style-recalc.html
blob6de1508e3223cb683fb664488dfb49d6e7622b1a
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 div {
6 text-align: justify;
9 .inlineBlock {
10 display: inline-block;
13 span {
14 display: block;
17 div:after {
18 content: '';
19 display: inline-block;
20 width: 100%;
23 </style>
24 <script src="../../resources/js-test.js"></script>
25 <script>
26 description('This test ensures that we properly reattach collapsed whitespace when sibling style changes require. Test passes if the spans below are justified across the page.');
27 onload = function() {
28 spans = document.getElementsByTagName("span");
29 for (var i = spans.length - 1; i >= 0; i--)
30 spans[i].classList.add('inlineBlock');
31 shouldBeGreaterThanOrEqual('spans[spans.length - 1].offsetLeft', "400");
33 </script>
34 </head>
35 <body>
36 <div id="container">
37 <span>Item 1</span>
38 <span>Item 2</span>
39 <span>Item 3</span>
40 </div>