OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 function test() { | 8 function test() { |
9 testPassed('Did not crash'); | 9 testPassed('Did not crash'); |
10 finishJSTest(); | 10 finishJSTest(); |
11 } | 11 } |
12 | 12 |
13 window.jsTestIsAsync = true; | 13 window.jsTestIsAsync = true; |
14 description('Test that accessing window.frameElement from a custom iframe does n
ot crash.'); | 14 description('Test that accessing window.frameElement from a custom iframe does n
ot crash.'); |
15 | 15 |
16 var proto = Object.create(HTMLIFrameElement.prototype); | 16 var proto = Object.create(HTMLIFrameElement.prototype); |
17 document.register('x-iframe', {prototype: proto, extends: 'iframe'}); | 17 document.registerElement('x-iframe', {prototype: proto, extends: 'iframe'}); |
18 </script> | 18 </script> |
19 <iframe onload="test();" is="x-iframe" srcdoc=" | 19 <iframe onload="test();" is="x-iframe" srcdoc=" |
20 <script> | 20 <script> |
21 window.frameElement; | 21 window.frameElement; |
22 </script> | 22 </script> |
23 "></iframe> | 23 "></iframe> |
24 </body> | 24 </body> |
25 </html> | 25 </html> |
OLD | NEW |