test_bug481647.html 999 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=481647
  5. -->
  6. <head>
  7. <title>Test for Bug 481647</title>
  8. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  10. </head>
  11. <body>
  12. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=481647">Mozilla Bug 481647</a>
  13. <p id="display">
  14. <iframe src="javascript:'aaa'"></iframe>
  15. <iframe src="javascript:document.write('aaa'); document.close();"></iframe>
  16. </p>
  17. <div id="content" style="display: none">
  18. </div>
  19. <pre id="test">
  20. <script type="application/javascript">
  21. /** Test for Bug 481647 **/
  22. SimpleTest.waitForExplicitFinish()
  23. function testFrame(num) {
  24. is(window.frames[num].document.baseURI, document.baseURI,
  25. "Unexpected base URI in frame " + num);
  26. }
  27. addLoadEvent(function() {
  28. for (var i = 0; i < 2; ++i) {
  29. testFrame(i);
  30. }
  31. SimpleTest.finish();
  32. });
  33. </script>
  34. </pre>
  35. </body>
  36. </html>