<style> p { background-color: green; width: 100px; height: 100px } p:empty { display: none } </style> <body> Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=26570"> bug 26570</a>. There should be two green boxes on this page.<br> <p></p> <p>	</p> <p></p> <p><span></span></p> <p></p> </body> <script> if (window.testRunner) testRunner.dumpAsText(); var list = document.querySelectorAll("p"); for (var result = "", i = 0; i < list.length; ++i) result += list.item(i).offsetWidth == (100 * (i & 1)) ? "PASS " : "FAIL "; result = list.length == result.match(/PASS /g).length ? "PASS" : "FAIL"; document.body.appendChild(document.createTextNode(result)); </script>