Replace current session entry for reloads

This commit is contained in:
Connor Brewster 2016-09-02 23:28:20 -05:00
parent 0b0495cff4
commit e9b2f1b916
10 changed files with 89 additions and 57 deletions

View file

@ -11,14 +11,19 @@
<iframe></iframe>
<script>
var history_length;
async_test(function(t) {
var url = new URL("./location_reload-iframe.html", window.location).href;
var pingCount = 0;
window._ping = t.step_func(function(innerURL) {
// Some browsers keep 'about:blank' in the session history
if (pingCount == 0) {
history_length = history.length;
}
assert_equals(url, innerURL, "iframe url (" + pingCount + ")");
assert_equals(history_length, history.length, "history length (" + pingCount + ")");
pingCount++;
if (pingCount == 5) {
iframe.src = 'about:blank';
@ -28,10 +33,8 @@
var iframe = document.querySelector("iframe");
iframe.src = url;
history_length = history.length;
});
</script>
</body>