| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 description("This tests accessing the length after accessing (length + 1)-th ite
m in HTMLCollection doesn't cache a wrong length."); | 7 description("This tests accessing the length after accessing (length + 1)-th ite
m in HTMLCollection doesn't cache a wrong length."); |
| 8 | 8 |
| 9 var container = document.createElement('div'); | 9 var container = document.createElement('div'); |
| 10 var span = document.createElement('span'); | 10 var span = document.createElement('span'); |
| 11 var children; | 11 var children; |
| 12 shouldBe("children = container.children; children.length", "0"); | 12 shouldBe("children = container.children; children.length", "0"); |
| 13 shouldBe("container.appendChild(span); children[1]; children.length", "1"); | 13 shouldBe("container.appendChild(span); children[1]; children.length", "1"); |
| 14 shouldBe("container.removeChild(span); children.length", "0"); | 14 shouldBe("container.removeChild(span); children.length", "0"); |
| 15 | 15 |
| 16 </script> | 16 </script> |
| 17 </body> | 17 </body> |
| 18 </html> | 18 </html> |
| OLD | NEW |