OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script> |
| 4 if (window.testRunner) { |
| 5 testRunner.dumpAsText(); |
| 6 testRunner.dumpChildFramesAsText(); |
| 7 testRunner.waitUntilDone(); |
| 8 testRunner.clearBackForwardList(); |
| 9 } |
| 10 |
| 11 function renameSubframeAndTriggerNavigations() { |
| 12 setTimeout(function() { |
| 13 // Make sure the child navigation only happens once. |
| 14 if (sessionStorage.alreadyRenamedSubframeAndTriggeredNavigations) |
| 15 return; |
| 16 sessionStorage.alreadyRenamedSubframeAndTriggeredNavigations = true; |
| 17 |
| 18 // Rename the child window. Without this step, |
| 19 // https://crbug.com/607205 wouldn't repro. |
| 20 var childWindow = document.getElementById("child").contentWindow; |
| 21 childWindow.name = "changed-name"; |
| 22 |
| 23 // Navigate the child window and tell resources/form-target.pl |
| 24 // what it should do after a load. |
| 25 sessionStorage.formTargetShouldNavAndGoBack = true; |
| 26 childWindow.location = "resources/page-that-posts.html"; |
| 27 }, 0); |
| 28 } |
| 29 </script> |
| 30 </head> |
| 31 <body onload="renameSubframeAndTriggerNavigations();"> |
| 32 <p>Tests that session history works even if the page changes frame names after i
nitial load.</p> |
| 33 <br> |
| 34 <iframe id="child" name="initial-name" src="resources/otherpage.html"></iframe> |
| 35 </body> |
| 36 </html> |
OLD | NEW |