25 lines
677 B
HTML
25 lines
677 B
HTML
<html>
|
|
<head>
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
</script>
|
|
<style>
|
|
#test { position: absolute; width: 100px; height: 100px }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
Test that offsetWidth and similar get up to date style information even if a new stylesheet load is started at late stage of document rendering
|
|
<link rel=stylesheet href="data:text/css,blah">
|
|
<div id=console></div>
|
|
<div id=test></div>
|
|
|
|
<script>
|
|
var test = document.getElementById('test');
|
|
var console = document.getElementById('console');
|
|
console.innerHTML = ((test.offsetWidth == 100) ? "<span style='color:green'>PASS</span> " : "<span style='color:red'>FAIL</span> ");
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|