| Index: LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state.html
|
| diff --git a/LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state.html b/LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f77eaf6cf2fdbfafd981a9432a0885e72f615727
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state.html
|
| @@ -0,0 +1,27 @@
|
| +<body>
|
| +<div style="height: 2000px;"></div>
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +
|
| +function test() {
|
| + if (sessionStorage.getItem('replaceState-beforeunload') == 'true') {
|
| + sessionStorage.removeItem("replaceState-beforeunload");
|
| + document.body.appendChild(document.createTextNode(
|
| + "Scroll state should not be propagated between unrelated documents: " +
|
| + (window.scrollY == 0 ? "PASS" : "FAIL")));
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + } else {
|
| + sessionStorage.setItem('replaceState-beforeunload', 'true');
|
| + location = "resources/replaceState-during-beforeunload.html";
|
| + }
|
| +}
|
| +
|
| +window.onload = function() {
|
| + setTimeout(test, 0);
|
| +};
|
| +</script>
|
| +</body>
|
|
|