test_bug731471.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=731471
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 731471</title>
  9. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  10. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  11. </head>
  12. <body onload="setTimeout(boom, 0);">
  13. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=731471">Mozilla Bug 731471</a>
  14. <p id="display"></p>
  15. <div id="content" style="display: none">
  16. </div>
  17. <pre id="test">
  18. <script type="application/javascript">
  19. /** Test for Bug 731471. This is effectively a crashtest, but it uses window.open, which
  20. doesn't work in the crashtest harness. **/
  21. SimpleTest.waitForExplicitFinish();
  22. SimpleTest.requestFlakyTimeout("untriaged");
  23. function boom()
  24. {
  25. w = window.open("data:text/html,1");
  26. setTimeout(function() {
  27. w.document.write("2");
  28. w.document.close();
  29. w.document.write("3 - Done");
  30. w.document.close();
  31. w.close();
  32. ok(true, "Didn't assert!");
  33. SimpleTest.finish();
  34. }, 400);
  35. }
  36. </script>
  37. </pre>
  38. </body>
  39. </html>