Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / navigation / multiple-back-forward-entries.html
index 1f4999b..e9c1641 100644 (file)
 </script>
 </head>
 <body>
-This test creates an iFrame via document.write(), then immediately changes the source of that iframe while the main document is still being parsed.  The src change should not result in a new back/forward list entry.<br>
+This test creates an iFrame via document.write(), then immediately changes the source of that iframe while the main document is still being parsed.  It then navigates the frame again.  The first src change should not result in a new back/forward list entry, but the second should.<br>
     <script>
+        function firstLoadDone() {
+            document.getElementById('frame').onload = loadDone;
+            // Give the previous document an event loop iteration to commit.
+            setTimeout(function() {
+                document.getElementById('frame').src = "http://127.0.0.1:8000/navigation/resources/blank.txt";
+            });
+        }
+
         document.write('<iframe id="frame" src="http://127.0.0.1:8000/navigation/resources/slow-resource.pl?delay=250" width="500" height="500"></iframe>');
         document.getElementById('frame').src = "http://127.0.0.1:8000/navigation/resources/slow-resource.pl?delay=250";
-        document.getElementById('frame').onload = loadDone;
+        document.getElementById('frame').onload = firstLoadDone;
     </script>
 </body>
 </html>