Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/navigation/rename-subframe-goback.html

Issue 2317203002: Avoid mutating frame unique name after first real commit. (Closed)
Patch Set: Tweaking tests to match changed unique name behavior. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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.alreadyRenamedSubframeAndTrigerredNavigations)
dcheng 2016/09/09 22:00:13 Nit:triggered
Łukasz Anforowicz 2016/09/09 22:49:11 Done.
15 return;
16 sessionStorage.alreadyRenamedSubframeAndTrigerredNavigations = 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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698