diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2017-08-10 18:01:49 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-21 19:52:35 +0100 |
commit | 88b5da7dd85d3e9859189824bea76c887eafab79 (patch) | |
tree | b4f563927fa6f72db494b9a7ae2b846781b2da35 /layout/forms | |
parent | 33ebe8d4ce87d38b3121a98fbaf714aa78550508 (diff) | |
download | uxp-88b5da7dd85d3e9859189824bea76c887eafab79.tar.gz |
JS - make window.pageYOffset/pageXOffset/scrollX/scrollY double
Diffstat (limited to 'layout/forms')
-rw-r--r-- | layout/forms/test/test_bug562447.html | 6 | ||||
-rw-r--r-- | layout/forms/test/test_bug564115.html | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/layout/forms/test/test_bug562447.html b/layout/forms/test/test_bug562447.html index 53f84428e5..99f6918711 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 5723b55d5a..ffd4222cae 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(); |