| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test.js"></script> |
| <script> |
| function test() { |
| iframe = document.querySelector('iframe'); |
| shouldBeTrue('iframe instanceof HTMLIFrameElement'); |
| shouldBeFalse('iframe instanceof iframe.contentWindow.HTMLIFrameElement'); |
| finishJSTest(); |
| } |
| description("Accessing window.frameElement from inside an iframe should not cause the <iframe>'s prototype to come from its own context."); |
| window.jsTestIsAsync = true; |
| </script> |
| </head> |
| <iframe onload="test();" srcdoc=" |
| <script> |
| window.frameElement; |
| </script> |
| "></iframe> |
| </body> |
| </html> |