3 <p>This test checks whether DOM wrappers created by NodeIterator have their
4 prototypes attached to the correct objects. These nodes are from the child
5 frame, so that's where their prototypes should be attached.</p>
7 <p>Unfortunately, our implementation is buggy and we get wrappers from the
8 parent frame here. This test documents the bug so we'll know when we fix
10 <div id="console"></div>
12 if (window.testRunner)
13 testRunner.dumpAsText();
15 Node.prototype.foo = "parent";
17 function logNode(node) {
18 var result = node.foo == "child" ? "PASS" : "FAIL";
19 document.getElementById("console").innerHTML += node.id + ": " + node.foo + " " + result + "<br>"
23 var it = frames[0].it;
24 logNode(it.nextNode());
25 logNode(it.nextNode());
26 logNode(it.nextNode());
27 logNode(it.nextNode());
28 logNode(it.nextNode());
29 logNode(it.previousNode());
32 <iframe onload="runTest();" src="resources/node-iterator-prototype-frame.html"></iframe>