| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test.js"></script> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| function test() { |
| // Create a pending stylesheet, this href intentionally 404s. |
| var linkTag = document.createElement('link'); |
| linkTag.href = 'does-not-exist.css'; |
| linkTag.rel = 'stylesheet'; |
| document.head.appendChild(linkTag); |
| |
| var textDiv = document.createElement('div'); |
| textDiv.setAttribute('id', 'text'); |
| textDiv.appendChild(document.createTextNode('test')); |
| document.getElementById('testDiv').appendChild(textDiv); |
| |
| shouldBe('document.getElementById("text").clientWidth', 'document.getElementById("text").clientWidth'); |
| } |
| </script> |
| </head> |
| <body onload="test()"> |
| <div id="testDiv"></div> |
| </body> |
| </html> |