1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/xpconnect/tests/mochitest/test_bug865260.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=865260 1.8 +--> 1.9 +<head> 1.10 + <meta charset="utf-8"> 1.11 + <title>Test for Bug 865260</title> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 + <script type="application/javascript"> 1.15 + 1.16 + /** Test for Bug 865260 **/ 1.17 + SimpleTest.waitForExplicitFinish(); 1.18 + function go() { 1.19 + var exn = "nothrow"; 1.20 + try { $('ifr').contentWindow['Date']; } catch (e) { exn = e; }; 1.21 + ok(!!/denied/.exec(exn), "Threw instead of crashing"); 1.22 + SimpleTest.finish(); 1.23 + } 1.24 + 1.25 + </script> 1.26 +</head> 1.27 +<body> 1.28 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=865260">Mozilla Bug 865260</a> 1.29 +<p id="display"></p> 1.30 +<div id="content"> 1.31 +<iframe id="ifr" onload="go();" src="http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html"></iframe> 1.32 +</div> 1.33 +<pre id="test"> 1.34 +</pre> 1.35 +</body> 1.36 +</html>