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