| Index: third_party/WebKit/LayoutTests/http/tests/navigation/rename-subframe-goback.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/navigation/rename-subframe-goback.html b/third_party/WebKit/LayoutTests/http/tests/navigation/rename-subframe-goback.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0c3294b52317af912e7d00d4f5828b1e6411e9d6
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/navigation/rename-subframe-goback.html
|
| @@ -0,0 +1,36 @@
|
| +<html>
|
| +<head>
|
| + <script>
|
| + if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.dumpChildFramesAsText();
|
| + testRunner.waitUntilDone();
|
| + testRunner.clearBackForwardList();
|
| + }
|
| +
|
| + function renameSubframeAndTriggerNavigations() {
|
| + setTimeout(function() {
|
| + // Make sure the child navigation only happens once.
|
| + if (sessionStorage.alreadyRenamedSubframeAndTriggeredNavigations)
|
| + return;
|
| + sessionStorage.alreadyRenamedSubframeAndTriggeredNavigations = true;
|
| +
|
| + // Rename the child window. Without this step,
|
| + // https://crbug.com/607205 wouldn't repro.
|
| + var childWindow = document.getElementById("child").contentWindow;
|
| + childWindow.name = "changed-name";
|
| +
|
| + // Navigate the child window and tell resources/form-target.pl
|
| + // what it should do after a load.
|
| + sessionStorage.formTargetShouldNavAndGoBack = true;
|
| + childWindow.location = "resources/page-that-posts.html";
|
| + }, 0);
|
| + }
|
| + </script>
|
| +</head>
|
| +<body onload="renameSubframeAndTriggerNavigations();">
|
| +<p>Tests that session history works even if the page changes frame names after initial load.</p>
|
| +<br>
|
| +<iframe id="child" name="initial-name" src="resources/otherpage.html"></iframe>
|
| +</body>
|
| +</html>
|
|
|