| <html> |
| <body> |
| <p>This test checks whether DOM wrappers created by NodeIterator have their |
| prototypes attached to the correct objects. These nodes are from the child |
| frame, so that's where their prototypes should be attached.</p> |
| |
| <div id="console"></div> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| Node.prototype.foo = "parent"; |
| |
| function logNode(node) { |
| var result = node.foo == "child" ? "PASS" : "FAIL"; |
| document.getElementById("console").innerHTML += node.id + ": " + node.foo + " " + result + "<br>" |
| } |
| |
| function runTest() { |
| var it = frames[0].it; |
| logNode(it.nextNode()); |
| logNode(it.nextNode()); |
| logNode(it.nextNode()); |
| logNode(it.nextNode()); |
| logNode(it.nextNode()); |
| logNode(it.previousNode()); |
| } |
| </script> |
| <iframe onload="runTest();" src="resources/node-iterator-prototype-frame.html"></iframe> |
| </body> |
| </html> |