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