OLD | NEW |
1 <html> | 1 <html> |
2 <body> | 2 <body> |
3 Tests that node wrappers are created in the context to which they belong. | 3 Tests that node wrappers are created in the context to which they belong. |
4 You should see PASS below. | 4 You should see PASS below. |
5 <br> | 5 <br> |
6 <div id="output"></div> | 6 <div id="output"></div> |
7 <iframe id="inner" src="resources/wrapper-context-inner.html"></iframe> | 7 <iframe name="inner" src="resources/wrapper-context-inner.html"></iframe> |
8 <script> | 8 <script> |
9 if (window.testRunner) { | 9 if (window.testRunner) { |
10 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
11 testRunner.waitUntilDone(); | 11 testRunner.waitUntilDone(); |
12 } | 12 } |
13 | 13 |
14 function writeOutput(s) { | 14 function writeOutput(s) { |
15 var paragraph = document.createElement("p"); | 15 var paragraph = document.createElement("p"); |
16 paragraph.innerHTML = s; | 16 paragraph.innerHTML = s; |
17 document.getElementById("output").appendChild(paragraph); | 17 document.getElementById("output").appendChild(paragraph); |
18 } | 18 } |
19 | 19 |
20 // Used to create the document wrapper. | 20 // Used to create the document wrapper. |
21 var innerDocument; | 21 var innerDocument; |
22 | 22 |
23 // Once the inner frame has loaded, run the test. | 23 // Once the inner frame has loaded, run the test. |
24 function innerHasLoaded() { | 24 function innerHasLoaded() { |
25 writeOutput("Running..."); | 25 writeOutput("Running..."); |
26 innerDocument = inner.document; | 26 innerDocument = inner.document; |
27 inner.runTest(); | 27 inner.runTest(); |
28 } | 28 } |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |