blob: 0d4cd6b75b1f56f253c7765245c8630b88902e05 [file] [log] [blame]
Checks that history navigations don't accidentally swap frame contents (if the order in which subframes are created has changed). This is a regression test for issue 500260 and corresponds to http://anforowicz.github.io/frame-creation-order/index.htm which is one of manual tests listed in https://crbug.com/500260#c24.
This page dynamically (e.g. from javascript) creates 2 subframes:
<iframe class="left" src="resources/red.htm"></iframe>
<iframe class="right" src="resources/green.htm"></iframe>
The tricky part is that the order of subframe creation changes at each load (via sessionStorage.pageLoadCount). This can confuse the browser into restoring (after back navigation) green.htm into left frame and red.htm into right frame.
This test expects to reset and reload iframes on main frame's back navigation. Back-forward cache needs to be disabled to run this test.
Frame creation order during this page load:
Created <iframe class="left" src="resources/red.html"></iframe>
Created <iframe class="right" src="resources/green.html"></iframe>
Final frame URLs during this page load (should match the list above):
URL of left is http://127.0.0.1:8000/history/resources/red.html
URL of right is http://127.0.0.1:8000/history/resources/green.html
Dynamically created frames: