4 https://bugzilla.mozilla.org/show_bug.cgi?id=720619
7 <title>Test for Bug
629227</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=720619">Mozilla Bug
720619</a>
14 <iframe id=
"testTarget"></iframe>
16 <div id=
"content" style=
"display: none">
20 <script type=
"application/javascript">
22 /** Test for Bug
720619 **/
23 SimpleTest.waitForExplicitFinish();
25 function checkThrows(f, exception) {
28 ok(false,
"should have thrown: " + f);
30 ok(exception.test(e.toString()),
"correctly threw");
35 var loc = $('ifr').contentWindow.location;
36 checkThrows(function() {loc + '';}, /Permission denied/);
37 checkThrows(function() {'' + loc;}, /Permission denied/);
38 checkThrows(function() {String(loc);}, /Permission denied/);
40 var win = $('ifr').contentWindow;
41 checkThrows(function() {win + '';}, /Permission denied/);
42 checkThrows(function() {'' + win;}, /Permission denied/);
43 checkThrows(function() {String(win);}, /Permission denied/);
50 <iframe id=
"ifr" onload=
"go()"
51 src=
"http://example.org/tests/js/xpconnect/tests/mochitest/file_bug720619.html">