OLD | NEW |
1 <html> | 1 <html> |
2 <body onload="RunTest()"> | 2 <body onload="notifyLoaded()"> |
3 <script> | 3 <script> |
4 // Used from the top frame to know when this frame has been loaded. | 4 function notifyLoaded() { |
5 var loaded = false; | 5 top.innerHasLoaded(); |
| 6 } |
6 | 7 |
7 // After the top frame has accessed the document of this frame, we | 8 // After the top frame has accessed the document of this frame, we |
8 // test that the document wrapper was created in this context and | 9 // test that the document wrapper was created in this context and |
9 // not in the top context. | 10 // not in the top context. |
10 function RunTest() { | 11 function runTest() { |
11 loaded = true; | |
12 if (top.innerDocument) { | |
13 var paragraph = document.createElement('p'); | 12 var paragraph = document.createElement('p'); |
14 if (HTMLElement.prototype.isPrototypeOf(paragraph)) { | 13 if (HTMLElement.prototype.isPrototypeOf(paragraph)) { |
15 top.WriteOutput("PASS"); | 14 top.writeOutput("PASS"); |
16 } else { | 15 } else { |
17 top.WriteOutput("FAIL"); | 16 top.writeOutput("FAIL"); |
18 } | 17 } |
19 if (window.layoutTestController) { | 18 if (window.layoutTestController) { |
20 layoutTestController.notifyDone(); | 19 layoutTestController.notifyDone(); |
21 } | 20 } |
22 } else { | |
23 setTimeout(RunTest, 100); | |
24 } | |
25 } | 21 } |
26 </script> | 22 </script> |
27 </body> | 23 </body> |
28 </html> | 24 </html> |
OLD | NEW |