OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script> |
| 5 function startTest() |
| 6 { |
| 7 t = window.top; |
| 8 t.shouldBe("window", "self"); |
| 9 t.shouldBe("window", "frames"); |
| 10 t.shouldBe("parent", "top"); |
| 11 t.savedClosure = function() |
| 12 { |
| 13 // The normal shouldBeNull() helpers don't work well here, since they do
n't eval |
| 14 //in the right context. |
| 15 function testProperty(value, name) |
| 16 { |
| 17 if (value === null) |
| 18 t.testPassed(name + " is null."); |
| 19 else |
| 20 t.testFailed(name + " is not null!"); |
| 21 } |
| 22 testProperty(window, "window"); |
| 23 testProperty(self, "self"); |
| 24 testProperty(frames, "frames"); |
| 25 testProperty(parent, "parent"); |
| 26 testProperty(top, "top"); |
| 27 }; |
| 28 location = 'data:text/html,<body>Testing...</body>'; |
| 29 } |
| 30 </script> |
| 31 </head> |
| 32 <body onload="startTest()"> |
| 33 </body> |
| 34 </html> |
OLD | NEW |