summaryrefslogtreecommitdiffstats
path: root/layout
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 /layout
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 'layout')
-rw-r--r--layout/forms/test/test_bug562447.html6
-rw-r--r--layout/forms/test/test_bug564115.html4
2 files changed, 5 insertions, 5 deletions
diff --git a/layout/forms/test/test_bug562447.html b/layout/forms/test/test_bug562447.html
index 53f84428e..99f691871 100644
--- a/layout/forms/test/test_bug562447.html
+++ b/layout/forms/test/test_bug562447.html
@@ -23,7 +23,7 @@ addLoadEvent(function() {
setTimeout(function() {
// Make sure that we're scrolled by 5000px
- is(window.pageYOffset, 5000, "Make sure we're scrolled correctly");
+ is(Math.round(window.pageYOffset), 5000, "Make sure we're scrolled correctly");
// Scroll back up, and mess with the input box along the way
var input = document.getElementById("WhyDoYouFocusMe");
@@ -38,14 +38,14 @@ addLoadEvent(function() {
window.scrollTo(0, 5000);
setTimeout(function() {
- is(window.pageYOffset, 5000, "Sanity check");
+ is(Math.round(window.pageYOffset), 5000, "Sanity check");
window.scrollTo(0, 0);
input.focus();
input.blur();
setTimeout(function() {
- isnot(window.pageYOffset, 0, "This time we shouldn't be scrolled up");
+ isnot(Math.round(window.pageYOffset), 0, "This time we shouldn't be scrolled up");
SimpleTest.finish();
}, 0);
diff --git a/layout/forms/test/test_bug564115.html b/layout/forms/test/test_bug564115.html
index 5723b55d5..ffd4222ca 100644
--- a/layout/forms/test/test_bug564115.html
+++ b/layout/forms/test/test_bug564115.html
@@ -30,12 +30,12 @@ addLoadEvent(function() {
win.scrollTo(0, 5000);
setTimeout(function() {
- is(win.pageYOffset, 5000, "Page should be scrolled correctly");
+ is(Math.round(win.pageYOffset), 5000, "Page should be scrolled correctly");
// Refocus the window
SimpleTest.waitForFocus(function() {
SimpleTest.waitForFocus(function() {
- is(win.pageYOffset, 5000,
+ is(Math.round(win.pageYOffset), 5000,
"The page's scroll offset should not have been changed");
win.close();