blob: 39210685470c66cdab79ba9cdec0657b661e1de0 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<script>
description("This tests accessing the length after accessing (length + 1)-th item in HTMLCollection doesn't cache a wrong length.");
var container = document.createElement('div');
var span = document.createElement('span');
var children;
shouldBe("children = container.children; children.length", "0");
shouldBe("container.appendChild(span); children[1]; children.length", "1");
shouldBe("container.removeChild(span); children.length", "0");
</script>
</body>
</html>