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 --- docshell/test/test_bug590573.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'docshell/test/test_bug590573.html') diff --git a/docshell/test/test_bug590573.html b/docshell/test/test_bug590573.html index aa6d3bd79..e218140ea 100644 --- a/docshell/test/test_bug590573.html +++ b/docshell/test/test_bug590573.html @@ -147,21 +147,21 @@ function* testBody() popup.scroll(0, 100); popup.history.pushState('', '', '?pushed'); - is(popup.scrollY, 100, "test 2"); + is(Math.round(popup.scrollY), 100, "test 2"); popup.scroll(0, 200); // set state-2's position to 200 popup.history.back(); - is(popup.scrollY, 100, "test 3"); + is(Math.round(popup.scrollY), 100, "test 3"); popup.scroll(0, 150); // set original page's position to 150 popup.history.forward(); - is(popup.scrollY, 200, "test 4"); + is(Math.round(popup.scrollY), 200, "test 4"); popup.history.back(); - is(popup.scrollY, 150, "test 5"); + is(Math.round(popup.scrollY), 150, "test 5"); popup.history.forward(); - is(popup.scrollY, 200, "test 6"); + is(Math.round(popup.scrollY), 200, "test 6"); // At this point, the history looks like: // PATH POSITION @@ -202,13 +202,13 @@ function* testBody() is(popup.location.search, "?pushed"); ok(popup.document.getElementById('div1'), 'page should have div1.'); - is(popup.scrollY, 200, "test 8"); + is(Math.round(popup.scrollY), 200, "test 8"); popup.history.back(); - is(popup.scrollY, 150, "test 9"); + is(Math.round(popup.scrollY), 150, "test 9"); popup.history.forward(); - is(popup.scrollY, 200, "test 10"); + is(Math.round(popup.scrollY), 200, "test 10"); // Spin one last time... setTimeout(pageLoad, 0); -- cgit v1.2.3