blob: 071166085eee6b94c0de0052d3d2166aa32ae06f [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var div;
function runTest() {
description("This tests obtaining widths of the same CSSComputedStyleDeclaration twice immediately after inserting a stylesheet. They should match.");
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = "doesnotexist.css";
document.head.appendChild(link);
div = document.createElement('div');
shouldBe("document.body.appendChild(div); style = getComputedStyle(div); style.width", "style.width");
}
</script>
</head>
<body onload="runTest()">
</body>
</html>