OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
4 | 4 |
5 <div id="host"></div> | 5 <div id="host"></div> |
6 | 6 |
7 <script> | 7 <script> |
8 description('offsetWidth of a fixed width element should cause a style recalc if
host styles are invalid'); | 8 description('offsetWidth of a fixed width element should cause a style recalc if
host styles are invalid'); |
9 | 9 |
10 onload = function() { | 10 onload = function() { |
11 host = document.getElementById('host'); | 11 host = document.getElementById('host'); |
12 shadowRoot = host.createShadowRoot(); | 12 shadowRoot = host.createShadowRoot(); |
13 div = shadowRoot.appendChild(document.createElement('div')); | 13 div = shadowRoot.appendChild(document.createElement('div')); |
14 div.style.width = '100px'; | 14 div.style.width = '100px'; |
15 shouldBe('div.offsetWidth', '100'); | 15 shouldBe('div.offsetWidth', '100'); |
16 host.style.display = 'none'; | 16 host.style.display = 'none'; |
17 shouldBe('div.offsetWidth', '0'); | 17 shouldBe('div.offsetWidth', '0'); |
18 }; | 18 }; |
19 </script> | 19 </script> |
20 | 20 |
OLD | NEW |