| <!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> |