From 4fd939e8c9dd97c45e7fcd1314f3ab482a2cf23d Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 10 Aug 2017 18:01:49 +0200 Subject: JS - make window.pageYOffset/pageXOffset/scrollX/scrollY double --- dom/browser-element/mochitest/browserElement_ScrollEvent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dom/browser-element/mochitest/browserElement_ScrollEvent.js') diff --git a/dom/browser-element/mochitest/browserElement_ScrollEvent.js b/dom/browser-element/mochitest/browserElement_ScrollEvent.js index 5c4b4dcf9..06dc91b86 100644 --- a/dom/browser-element/mochitest/browserElement_ScrollEvent.js +++ b/dom/browser-element/mochitest/browserElement_ScrollEvent.js @@ -16,8 +16,8 @@ function runTest() { iframe.addEventListener("mozbrowserscroll", function(e) { ok(true, "got mozbrowserscroll event."); ok(e.detail, "event.detail is not null."); - ok(e.detail.top === 4000, "top position is correct."); - ok(e.detail.left === 4000, "left position is correct."); + ok(Math.round(e.detail.top) == 4000, "top position is correct."); + ok(Math.round(e.detail.left) == 4000, "left position is correct."); SimpleTest.finish(); }); -- cgit v1.2.3