test_bug650273.html 1015 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=650273
  5. test by moz_bug_r_a4@yahoo.com
  6. -->
  7. <head>
  8. <title>Test for Bug 650273</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>
  13. <a target="_blank"
  14. href="https://bugzilla.mozilla.org/show_bug.cgi?id=650273">Mozilla Bug 650273</a>
  15. <p id="display"></p>
  16. <div id="content" style="display: none">
  17. </div>
  18. <pre id="test">
  19. <script type="application/javascript">
  20. /** Test for Bug 504877 **/
  21. SimpleTest.waitForExplicitFinish();
  22. var count = 0;
  23. function done() {
  24. if (++count == 2) {
  25. try {
  26. ok($('ifr').location.host === 'example.com', "shouldn't see this");
  27. } catch (e) {
  28. ok(true, "navigation successfully happened");
  29. }
  30. SimpleTest.finish();
  31. }
  32. }
  33. </script>
  34. <iframe id="ifr" src="file_bug650273.html" onload="done()"></iframe>
  35. </pre>
  36. </body>
  37. </html>