OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../../resources/js-test.js"></script> |
| 4 <script src="resources/window-property-collector.js"></script> |
| 5 <script> |
| 6 var jsTestIsAsync = true; |
| 7 |
| 8 var oldChildWindow; |
| 9 var newChildWindow; |
| 10 var propertiesToVerify = []; |
| 11 |
| 12 function insertExpectedResult(path, expected) |
| 13 { |
| 14 var propertyPath = path.join('.'); |
| 15 propertiesToVerify.push({'property': "oldChildWindow." + propertyPath, 'expe
cted': "newChildWindow." + propertyPath}); |
| 16 } |
| 17 |
| 18 function runTest() |
| 19 { |
| 20 var frame = document.getElementById("frame"); |
| 21 if (frame.src != 'about:blank') { |
| 22 description("Tests property access on a cached DOMWindow after the assoc
iated frame is navigated. Test should not crash and properties read from the cac
hed DOMWindow should be identical to properties through the 'current' DOMWindow.
"); |
| 23 oldChildWindow = frame.contentWindow; |
| 24 collectProperties(); |
| 25 frame.src = 'about:blank'; |
| 26 return; |
| 27 } |
| 28 newChildWindow = frame.contentWindow; |
| 29 for (var i = 0; i < propertiesToVerify.length; ++i) |
| 30 shouldBe(propertiesToVerify[i].property, propertiesToVerify[i].expected)
; |
| 31 finishJSTest(); |
| 32 } |
| 33 </script> |
| 34 </head> |
| 35 <body> |
| 36 <iframe id="frame" src="resources/blank.html" onload="runTest()"></iframe> |
| 37 </body> |
| 38 </html> |
OLD | NEW |