mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
Replace current session entry for reloads
This commit is contained in:
parent
0b0495cff4
commit
e9b2f1b916
10 changed files with 89 additions and 57 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue