Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / empty-display-none.html
blob220657e0ac6bfc2728bf0fc7d4ea1862882b4632
1 <style>
2 div { width: 100px; height: 100px; }
3 #target { margin-top: -100px; background-color: green; }
4 #target:empty { display: none; }
5 </style>
6 <p>
7 This tests that specifying <tt>display: none;</tt> for the <tt>:empty</tt>
8 pseudoclass doesn&rsquo;t affect non-empty elements.
9 </p>
10 <div style="background-color: red;"></div>
11 <div id="target"><span></span></div>
12 <p id="result"></p>
13 <script>
14 if (window.testRunner)
15 testRunner.dumpAsText();
17 document.getElementById("result").innerText = document.getElementById("target").offsetWidth === 100 ? "PASS" : "FAIL";
18 </script>