From b3e611f65dbe4426d4425550d1b3d0c7b9ec129a Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Wed, 23 Oct 2013 20:25:03 +0200 Subject: [PATCH] Bug 929750 - fix (literal) edge case in overflow scroll test, r=jaws --HG-- extra : rebase_source : ab749cade090d47eb772454ed0138fd27c4db72e --- browser/base/content/test/general/browser_overflowScroll.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/browser/base/content/test/general/browser_overflowScroll.js b/browser/base/content/test/general/browser_overflowScroll.js index 34090e63442..bc82ab4193f 100644 --- a/browser/base/content/test/general/browser_overflowScroll.js +++ b/browser/base/content/test/general/browser_overflowScroll.js @@ -62,7 +62,11 @@ function runOverflowTests(aEvent) { EventUtils.synthesizeMouse(upButton, 1, 1, {}); isLeft(element, "Scrolled one tab to the left with a single click"); - element = elementFromPoint(left(scrollbox) - width(scrollbox)); + let elementPoint = left(scrollbox) - width(scrollbox); + element = elementFromPoint(elementPoint); + if (elementPoint == right(element)) { + element = element.nextSibling; + } EventUtils.synthesizeMouse(upButton, 1, 1, {clickCount: 2}); isLeft(element, "Scrolled one page of tabs with a double click");