file_iframe_sandbox_k_if4.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Test for Bug 766282</title>
  6. <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  7. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  8. </head>
  9. <script type="text/javascript">
  10. function doStuff() {
  11. // Open a new window via target="_blank", target="BC766282_if5" and window.open().
  12. sendMouseEvent({type:'click'}, 'target_blank_if5');
  13. sendMouseEvent({type:'click'}, 'target_BC766282_if5');
  14. window.open("file_iframe_sandbox_k_if5.html");
  15. // Open a new window via target="_blank", target="BC766282_if7" and window.open().
  16. sendMouseEvent({type:'click'}, 'target_blank_if7');
  17. sendMouseEvent({type:'click'}, 'target_BC766282_if7');
  18. window.open("file_iframe_sandbox_k_if7.html");
  19. }
  20. </script>
  21. <body onLoad="doStuff()">
  22. I am sandboxed with "allow-scripts allow-popups allow-same-origin allow-forms allow-top-navigation".
  23. <a href="file_iframe_sandbox_k_if5.html" target="_blank" id="target_blank_if5">open window</a>
  24. <a href="file_iframe_sandbox_k_if5.html" target="BC766282_if5" id="target_BC766282_if5">open window</a>
  25. <a href="file_iframe_sandbox_k_if7.html" target="_blank" id="target_blank_if7">open window</a>
  26. <a href="file_iframe_sandbox_k_if7.html" target="BC766282_if7" id="target_BC766282_if7">open window</a>
  27. </body>
  28. </html>