4 https://bugzilla.mozilla.org/show_bug.cgi?id=965082
8 <title>Test for Bug
965082</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">
13 /** Test for Bug
965082 **/
14 SimpleTest.waitForExplicitFinish();
16 function checkThrows(f, msg) {
17 try { f(); ok(false,
"Should have thrown: " + msg); }
18 catch (e) { ok(/denied|insecure|can't set prototype/.test(e),
"Should throw security exception: " + e +
" (" + msg +
")"); }
22 var protoSetter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
23 checkThrows(function() { protoSetter.call(window[
0], new Object()); },
"Setting cross-origin Window prototype");
24 checkThrows(function() { protoSetter.call(window[
0].location, new Object()); },
"Setting cross-origin Location prototype");
31 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=965082">Mozilla Bug
965082</a>
33 <div id=
"content" style=
"display: none">
35 <iframe id=
"ifr" onload=
"go();" src=
"http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html"></iframe>