test_sync_xhr_unload.html 886 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Test for Bug 1307122</title>
  6. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  7. <script type="application/javascript" src="common_temporaryFileBlob.js"></script>
  8. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  9. </head>
  10. <body>
  11. <script type="application/javascript">
  12. SimpleTest.waitForExplicitFinish();
  13. info("Creating the iframe...");
  14. var ifr = document.createElement('iframe');
  15. ifr.addEventListener("load", function ifr_load1() {
  16. info("Iframe loaded");
  17. ifr.removeEventListener("load", ifr_load1);
  18. ifr.src = "empty.html";
  19. ifr.addEventListener("load", function ifr_load2() {
  20. ok(true, "Test passed");
  21. SimpleTest.finish();
  22. });
  23. });
  24. ifr.src = "iframe_sync_xhr_unload.html";
  25. document.body.appendChild(ifr);
  26. </script>
  27. </body>
  28. </html>