OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <pre id=p1></pre> |
| 8 <pre id=p1></pre> |
| 9 <pre id=p1></pre> |
| 10 <script> |
| 11 description("Invalidation of cached id-name collections must not crash."); |
| 12 |
| 13 if (window.testRunner) |
| 14 testRunner.dumpAsText(); |
| 15 |
| 16 var is = window["p1"]; |
| 17 var div = document.createElement('div'); |
| 18 document.body.appendChild(div); |
| 19 div.appendChild(is[is.length - 2]); |
| 20 // Invalidate the underlying cache. |
| 21 is.namedItem("p1").remove(); |
| 22 // Out of bounds index, updates the collection length. |
| 23 is.item(13); |
| 24 // Remove parent of collection member; must invalidate cached length. |
| 25 div.remove(); |
| 26 // Force re-caching. |
| 27 is.namedItem("p1"); |
| 28 </script> |
| 29 </body> |
| 30 </html> |
OLD | NEW |