| <!DOCTYPE html> |
| |
| <script src="../../../resources/js-test.js"></script> |
| |
| <div id="host"></div> |
| |
| <script> |
| description('offsetWidth of a fixed width element should cause a style recalc if host styles are invalid'); |
| |
| onload = function() { |
| host = document.getElementById('host'); |
| shadowRoot = host.attachShadow({mode: 'open'}); |
| div = shadowRoot.appendChild(document.createElement('div')); |
| div.style.width = '100px'; |
| shouldBe('div.offsetWidth', '100'); |
| host.style.display = 'none'; |
| shouldBe('div.offsetWidth', '0'); |
| }; |
| </script> |
| |