Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / traversal / node-iterator-prototype.html
1 <html> 
2 <body>
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>
6
7 <div id="console"></div>
8 <script>
9 if (window.testRunner)
10     testRunner.dumpAsText();
11
12 Node.prototype.foo = "parent";
13
14 function logNode(node) {
15     var result = node.foo == "child" ? "PASS" : "FAIL";
16     document.getElementById("console").innerHTML += node.id + ": " + node.foo + " " + result + "<br>"
17 }
18
19 function runTest() {
20     var it = frames[0].it;
21     logNode(it.nextNode());
22     logNode(it.nextNode());
23     logNode(it.nextNode());
24     logNode(it.nextNode());
25     logNode(it.nextNode());
26     logNode(it.previousNode());
27 }
28 </script>
29 <iframe onload="runTest();" src="resources/node-iterator-prototype-frame.html"></iframe>
30 </body>
31 </html>