2 <?xml-stylesheet type=
"text/css" href=
"chrome://global/skin"?>
3 <?xml-stylesheet type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css"?>
5 https://bugzilla.mozilla.org/show_bug.cgi?id=1041626
7 <window title=
"Mozilla Bug 1041626"
8 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
9 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
11 <!-- test results are displayed in the html:body -->
12 <body xmlns=
"http://www.w3.org/1999/xhtml">
13 <a href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1041626"
14 target=
"_blank">Mozilla Bug
1041626</a>
17 <!-- test code goes here -->
18 <script type=
"application/javascript">
20 /** Test for Bug
1041626 **/
21 SimpleTest.waitForExplicitFinish();
28 ok(Cu.isXrayWrapper(window[
0].location),
"Location is Xrayed");
29 let xrayOwnProperties = Object.getOwnPropertyNames(window[
0].location);
31 let realOwnProperties = Object.getOwnPropertyNames(window[
0].wrappedJSObject.location);
32 ok(realOwnProperties.length
> 2);
34 is(xrayOwnProperties.sort().toSource(), realOwnProperties.sort().toSource(),
35 "Xray enumerates location properties properly");
41 ok(Cu.isXrayWrapper(window[
0].document),
"Document is Xrayed");
42 xrayOwnProperties = Object.getOwnPropertyNames(window[
0].document);
44 realOwnProperties = Object.getOwnPropertyNames(window[
0].wrappedJSObject.document);
45 ok(!!realOwnProperties.length);
47 is(xrayOwnProperties.sort().toSource(), realOwnProperties.sort().toSource(),
48 "Xray enumerates document properties properly");
59 <iframe onload=
"go();" src=
"http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html" />