4 https://bugzilla.mozilla.org/show_bug.cgi?id=505915
7 <title>Test for Bug
505915</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=505915">Mozilla Bug
505915</a>
14 <div id=
"content" style=
"display: none">
18 <script type=
"application/javascript">
20 /** Test for Bug
505915 **/
21 window.addEventListener(
"message", function () {
22 ok(false,
"should not receive message");
28 // NB: the contentDocument getter now returns null for cross-origin
29 // frames, so use SpecialPowers to get a security wrapper to the document.
30 var xdoc = SpecialPowers.unwrap(SpecialPowers.wrap(ifr).contentDocument)
31 document.createTreeWalker(xdoc,
0, null);
32 ok(false,
"should have thrown a security exception");
34 ok(/TypeError: Document.createTreeWalker: Argument
1 does not implement interface Node/.test(e),
35 "threw a binding exception instead of an invalid child exception");
41 SimpleTest.waitForExplicitFinish();
46 <iframe id=
"ifr" onload=
"go();" src=
"http://test1.mochi.test:8888/"></iframe>