file_iframe_sandbox_d_if2.html 843 B

1234567891011121314151617181920212223242526272829
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Test for Bug 341604</title>
  6. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  7. <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  8. </head>
  9. <script type="application/javascript">
  10. // needed to forward the message to the main test page
  11. window.addEventListener("message", receiveMessage, false);
  12. function receiveMessage(event) {
  13. window.parent.postMessage(event.data, "*");
  14. }
  15. function doTest() {
  16. sendMouseEvent({type:'click'}, 'anchor');
  17. }
  18. </script>
  19. <body onload="doTest()">
  20. I am sandboxed with 'allow-scripts'
  21. <iframe name="foo" src="file_iframe_sandbox_navigation_start.html" height="10" width="10"></iframe>
  22. <a href="file_iframe_sandbox_navigation_pass.html?Test 2:%20" target='foo' id='anchor'>
  23. </body>
  24. </html>