blob: f700769d573d6838ecc444f5c3ab5b619b3cb0f7 [file] [log] [blame]
<html>
<body>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description("Check that CSSStyleDeclaration.length is accurate after custom property modifications.");
var computedStyle = window.getComputedStyle(document.body);
var initialLength = computedStyle.length;
document.documentElement.style.setProperty('--computed', '#abc');
var afterAddingComputedPropertyLength = computedStyle.length;
document.body.offsetTop;
var afterForcedLayoutLength = computedStyle.length;
shouldBeTrue("afterAddingComputedPropertyLength > initialLength");
shouldBeTrue("afterAddingComputedPropertyLength === afterForcedLayoutLength");
</script>
<script src="../../../resources/js-test-pre.js"></script>
</body>
</html>