test_bug865260.html 960 B

12345678910111213141516171819202122232425262728293031323334
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=865260
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 865260</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. <script type="application/javascript">
  12. /** Test for Bug 865260 **/
  13. SimpleTest.waitForExplicitFinish();
  14. function go() {
  15. var exn = "nothrow";
  16. try { $('ifr').contentWindow['Date']; } catch (e) { exn = e; };
  17. ok(!!/denied/.exec(exn), "Threw instead of crashing");
  18. SimpleTest.finish();
  19. }
  20. </script>
  21. </head>
  22. <body>
  23. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=865260">Mozilla Bug 865260</a>
  24. <p id="display"></p>
  25. <div id="content">
  26. <iframe id="ifr" onload="go();" src="http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html"></iframe>
  27. </div>
  28. <pre id="test">
  29. </pre>
  30. </body>
  31. </html>