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 | 4fd939e8c9dd97c45e7fcd1314f3ab482a2cf23d (patch) | |
tree | b4f563927fa6f72db494b9a7ae2b846781b2da35 /dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html | |
parent | a80b5f2728fdb0d2eaeace78528ea8c64427d39e (diff) | |
download | UXP-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 'dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html')
-rw-r--r-- | dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html b/dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html index c6ee89ee3..cf27e5d87 100644 --- a/dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html +++ b/dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html @@ -31,13 +31,13 @@ function checkGetScrollXYState(flush, vals, testName) { let scrollX = {}, scrollY = {}; domWindowUtils.getScrollXY(flush, scrollX, scrollY); - is(scrollX.value, vals[0], "getScrollXY x for test: " + testName); - is(scrollY.value, vals[1], "getScrollXY y for test: " + testName); + is(Math.round(scrollX.value), vals[0], "getScrollXY x for test: " + testName); + is(Math.round(scrollY.value), vals[1], "getScrollXY y for test: " + testName); } function checkWindowScrollState(vals, testName) { - is(cwindow.scrollX, vals[0], "scrollX for test: " + testName); - is(cwindow.scrollY, vals[1], "scrollY for test: " + testName); + is(Math.round(cwindow.scrollX), vals[0], "scrollX for test: " + testName); + is(Math.round(cwindow.scrollY), vals[1], "scrollY for test: " + testName); } // Check initial state (0, 0) @@ -67,8 +67,8 @@ let scrollX = {}, scrollY = {}; domWindowUtils.getScrollXY(false, scrollX, scrollY); - is(scrollX.value, 0, "scrollX is zero for display:none iframe"); - is(scrollY.value, 0, "scrollY is zero for display:none iframe"); + is(Math.round(scrollX.value), 0, "scrollX is zero for display:none iframe"); + is(Math.round(scrollY.value), 0, "scrollY is zero for display:none iframe"); } SimpleTest.waitForExplicitFinish(); |