| <!DOCTYPE html> |
| <html> |
| <body> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| description("Tests that we are using the right global object for DOM callbacks."); |
| jsTestIsAsync = true; |
| |
| var f = document.body.appendChild(document.createElement("iframe")); |
| f.onload = function() { |
| f.onload = null; |
| |
| try { |
| var iterator = document.createNodeIterator(document, NodeFilter.SHOW_ALL, f.contentWindow); |
| iterator.nextNode(); |
| } catch(e) { |
| window.nextNodeError = e; |
| } |
| |
| shouldBe("nextNodeError.constructor", "f.contentWindow.TypeError"); |
| finishJSTest(); |
| }; |
| |
| f.src = "resources/empty-body.html"; |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |