|
1 <?xml version="1.0"?> |
|
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
|
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" |
|
4 type="text/css"?> |
|
5 <!-- |
|
6 https://bugzilla.mozilla.org/show_bug.cgi?id=684115 |
|
7 --> |
|
8 <window title="Mozilla Bug 684115" |
|
9 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
|
10 <script type="application/javascript" |
|
11 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
12 |
|
13 <!-- test results are displayed in the html:body --> |
|
14 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
15 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=654370" |
|
16 target="_blank">Mozilla Bug 684115</a> |
|
17 </body> |
|
18 |
|
19 <!-- test code goes here --> |
|
20 <script type="application/javascript"><![CDATA[ |
|
21 SimpleTest.waitForExplicitFinish(); |
|
22 |
|
23 var firstWindow, secondWindow; |
|
24 function iframe_loaded() { |
|
25 if (!firstWindow || !secondWindow) |
|
26 return; |
|
27 var nodeList = firstWindow.document.childNodes; |
|
28 ok(!("expando" in nodeList), "shouldn't be able to see expandos on the NodeList"); |
|
29 nodeList = firstWindow.wrappedJSObject.getNodeList(); |
|
30 ok(("expando" in nodeList), "should be able to see expandos on the NodeList"); |
|
31 options = firstWindow.wrappedJSObject.getOptions(); |
|
32 is(options.selectedIndex, -1, "can access selectedIndex in chrome"); |
|
33 secondWindow.wrappedJSObject.tryToUseNodeList(nodeList, ok); |
|
34 nodeList = document.childNodes; |
|
35 secondWindow.wrappedJSObject.tryToUseNodeList(nodeList, ok); |
|
36 SimpleTest.finish(); |
|
37 } |
|
38 |
|
39 ]]></script> |
|
40 |
|
41 <iframe id="one" src="http://mochi.test:8888/tests/dom/tests/mochitest/general/file_moving_nodeList.html" |
|
42 onload="firstWindow = this.contentWindow; iframe_loaded()" /> |
|
43 <iframe id="two" src="http://example.org/tests/dom/tests/mochitest/general/file_moving_nodeList.html" |
|
44 onload="secondWindow = this.contentWindow; iframe_loaded()" /> |
|
45 </window> |