OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <style> |
| 4 iframe { width: 400px; height: 200px;} |
| 5 </style> |
| 6 <script> |
| 7 if (window.testRunner) { |
| 8 testRunner.dumpAsText(); |
| 9 testRunner.waitUntilDone(); |
| 10 } |
| 11 |
| 12 function loaded() |
| 13 { |
| 14 document.getElementsByTagName('h4')[0].innerHTML = document.domain; |
| 15 var iframe = document.getElementById("i"); |
| 16 // The iframe uses eventSender to emulate a user navigatation, which
requires absolute coordinates. |
| 17 // Because the iframe is cross-origin, it can't get the offsets itse
lf, so leak them. |
| 18 frames[0].postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, "
*"); |
| 19 } |
| 20 </script> |
| 21 </head> |
| 22 <body onload="loaded();"> |
| 23 <p>This tests that documents can navigate the location of any of it's parent
-frames regardless of domain, if a |
| 24 user gesture is present.</p> |
| 25 <h4>DOMAIN</h4> |
| 26 <iframe id="i" sandbox="allow-scripts allow-top-navigation" src="http://loca
lhost:8000/security/frameNavigation/resources/iframe-that-performs-parent-naviga
tion.html"></iframe> |
| 27 </body> |
| 28 </html> |
OLD | NEW |