summaryrefslogtreecommitdiffstats
path: root/docshell/test/navigation/file_scrollRestoration.html
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2017-08-10 18:01:49 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-02-21 19:52:35 +0100
commit4fd939e8c9dd97c45e7fcd1314f3ab482a2cf23d (patch)
treeb4f563927fa6f72db494b9a7ae2b846781b2da35 /docshell/test/navigation/file_scrollRestoration.html
parenta80b5f2728fdb0d2eaeace78528ea8c64427d39e (diff)
downloadUXP-4fd939e8c9dd97c45e7fcd1314f3ab482a2cf23d.tar
UXP-4fd939e8c9dd97c45e7fcd1314f3ab482a2cf23d.tar.gz
UXP-4fd939e8c9dd97c45e7fcd1314f3ab482a2cf23d.tar.lz
UXP-4fd939e8c9dd97c45e7fcd1314f3ab482a2cf23d.tar.xz
UXP-4fd939e8c9dd97c45e7fcd1314f3ab482a2cf23d.zip
JS - make window.pageYOffset/pageXOffset/scrollX/scrollY double
Diffstat (limited to 'docshell/test/navigation/file_scrollRestoration.html')
-rw-r--r--docshell/test/navigation/file_scrollRestoration.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/docshell/test/navigation/file_scrollRestoration.html b/docshell/test/navigation/file_scrollRestoration.html
index 5450c2724..92e43d7fb 100644
--- a/docshell/test/navigation/file_scrollRestoration.html
+++ b/docshell/test/navigation/file_scrollRestoration.html
@@ -26,7 +26,7 @@
}
case 2: {
opener.is(event.persisted, false, "Shouldn't have persisted session history entry.");
- opener.isnot(window.scrollY, 0, "Should have restored scrolling.");
+ opener.isnot(Math.round(window.scrollY), 0, "Should have restored scrolling.");
opener.is(history.scrollRestoration, "auto", "Should have the same scrollRestoration as before reload.");
history.scrollRestoration = "manual";
window.onunload = function() {} // Disable bfcache.
@@ -45,7 +45,7 @@
}
case 4: {
opener.is(event.persisted, true, "Should have persisted session history entry.");
- opener.isnot(window.scrollY, 0, "Should have kept the old scroll position.");
+ opener.isnot(Math.round(window.scrollY), 0, "Should have kept the old scroll position.");
opener.is(history.scrollRestoration, "manual", "Should have the same scrollRestoration as before reload.");
window.scrollTo(0, 0);
window.location.hash = "hash";
@@ -53,7 +53,7 @@
break;
}
case 5: {
- opener.isnot(window.scrollY, 0, "Should have scrolled to #hash.");
+ opener.isnot(Math.round(window.scrollY), 0, "Should have scrolled to #hash.");
opener.is(history.scrollRestoration, "manual", "Should have the same scrollRestoration mode as before fragment navigation.");
window.onunload = function() {} // Disable bfcache.
opener.setTimeout("is(testWindow.history.scrollRestoration, 'auto'); testWindow.history.back();", 250);
@@ -70,7 +70,7 @@
history.pushState({ state: "state2" }, "state2");
window.scrollTo(0, 0);
history.back();
- opener.isnot(window.scrollY, 0, "Should have scrolled back to the state1's position");
+ opener.isnot(Math.round(window.scrollY), 0, "Should have scrolled back to the state1's position");
opener.is(history.state.state, "state1", "Unexpected state.");
history.scrollRestoration = "manual";
@@ -79,17 +79,17 @@
history.pushState({ state: "state4" }, "state4");
window.scrollTo(0, 0);
history.back();
- opener.is(window.scrollY, 0, "Shouldn't have scrolled back to the state3's position");
+ opener.is(Math.round(window.scrollY), 0, "Shouldn't have scrolled back to the state3's position");
opener.is(history.state.state, "state3", "Unexpected state.");
history.pushState({ state: "state5" }, "state5");
history.scrollRestoration = "auto";
document.getElementById("bottom").scrollIntoView();
- opener.isnot(window.scrollY, 0, "Should have scrolled to 'bottom'.");
+ opener.isnot(Math.round(window.scrollY), 0, "Should have scrolled to 'bottom'.");
history.back();
window.scrollTo(0, 0);
history.forward();
- opener.isnot(window.scrollY, 0, "Should have scrolled back to the state5's position");
+ opener.isnot(Math.round(window.scrollY), 0, "Should have scrolled back to the state5's position");
var ifr = document.createElement("iframe");
ifr.src = "data:text/html,";