Stabilize history.replaceState tests

This commit is contained in:
Florian Bruhin 2017-03-29 17:58:05 +02:00
parent eb202d761c
commit 43155b0cc8
2 changed files with 4 additions and 4 deletions

View File

@ -5,8 +5,8 @@
<title>Test title</title> <title>Test title</title>
<script type="text/javascript"> <script type="text/javascript">
window.onload = function () { window.onload = function () {
console.log("Calling history.replaceState");
history.replaceState({}, '', window.location + '?state=2'); history.replaceState({}, '', window.location + '?state=2');
console.log("Called history.replaceState");
} }
</script> </script>
</head> </head>

View File

@ -198,7 +198,7 @@ Feature: Saving and loading sessions
Scenario: Saving a session with a page using history.replaceState() Scenario: Saving a session with a page using history.replaceState()
When I open data/sessions/history_replace_state.html without waiting When I open data/sessions/history_replace_state.html without waiting
Then the javascript message "Calling history.replaceState" should be logged Then the javascript message "Called history.replaceState" should be logged
And the session should look like: And the session should look like:
windows: windows:
- tabs: - tabs:
@ -212,7 +212,7 @@ Feature: Saving and loading sessions
Scenario: Saving a session with a page using history.replaceState() and navigating away (qtwebkit) Scenario: Saving a session with a page using history.replaceState() and navigating away (qtwebkit)
When I open data/sessions/history_replace_state.html When I open data/sessions/history_replace_state.html
And I open data/hello.txt And I open data/hello.txt
Then the javascript message "Calling history.replaceState" should be logged Then the javascript message "Called history.replaceState" should be logged
And the session should look like: And the session should look like:
windows: windows:
- tabs: - tabs:
@ -229,7 +229,7 @@ Feature: Saving and loading sessions
@qtwebkit_skip @qtwebkit_skip
Scenario: Saving a session with a page using history.replaceState() and navigating away Scenario: Saving a session with a page using history.replaceState() and navigating away
When I open data/sessions/history_replace_state.html without waiting When I open data/sessions/history_replace_state.html without waiting
And I wait for "* Calling history.replaceState" in the log And I wait for "* Called history.replaceState" in the log
And I open data/hello.txt And I open data/hello.txt
Then the session should look like: Then the session should look like:
windows: windows: