Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / html / layout-with-pending-stylesheet.html
blob4ae91854af6e84df8f14cd8b4b3962860a03de9a
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
9 function test() {
10 // Create a pending stylesheet, this href intentionally 404s.
11 var linkTag = document.createElement('link');
12 linkTag.href = 'does-not-exist.css';
13 linkTag.rel = 'stylesheet';
14 document.head.appendChild(linkTag);
16 var textDiv = document.createElement('div');
17 textDiv.setAttribute('id', 'text');
18 textDiv.appendChild(document.createTextNode('test'));
19 document.getElementById('testDiv').appendChild(textDiv);
21 shouldBe('document.getElementById("text").clientWidth', 'document.getElementById("text").clientWidth');
23 </script>
24 </head>
25 <body onload="test()">
26 <div id="testDiv"></div>
27 </body>
28 </html>