From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../tests/browser/events/browser_test_scrolling.js | 49 +++++++++++++--------- 1 file changed, 29 insertions(+), 20 deletions(-) (limited to 'accessible/tests/browser/events/browser_test_scrolling.js') diff --git a/accessible/tests/browser/events/browser_test_scrolling.js b/accessible/tests/browser/events/browser_test_scrolling.js index 9678ee767b..d9425721bf 100644 --- a/accessible/tests/browser/events/browser_test_scrolling.js +++ b/accessible/tests/browser/events/browser_test_scrolling.js @@ -25,13 +25,15 @@ c }); let [scrollEvent1, scrollEndEvent1] = await onScrolling; scrollEvent1.QueryInterface(nsIAccessibleScrollingEvent); - ok( - scrollEvent1.maxScrollY >= scrollEvent1.scrollY, + Assert.greaterOrEqual( + scrollEvent1.maxScrollY, + scrollEvent1.scrollY, "scrollY is within max" ); scrollEndEvent1.QueryInterface(nsIAccessibleScrollingEvent); - ok( - scrollEndEvent1.maxScrollY >= scrollEndEvent1.scrollY, + Assert.greaterOrEqual( + scrollEndEvent1.maxScrollY, + scrollEndEvent1.scrollY, "scrollY is within max" ); @@ -44,13 +46,15 @@ c }); let [scrollEvent2, scrollEndEvent2] = await onScrolling; scrollEvent2.QueryInterface(nsIAccessibleScrollingEvent); - ok( - scrollEvent2.scrollY > scrollEvent1.scrollY, + Assert.greater( + scrollEvent2.scrollY, + scrollEvent1.scrollY, `${scrollEvent2.scrollY} > ${scrollEvent1.scrollY}` ); scrollEndEvent2.QueryInterface(nsIAccessibleScrollingEvent); - ok( - scrollEndEvent2.maxScrollY >= scrollEndEvent2.scrollY, + Assert.greaterOrEqual( + scrollEndEvent2.maxScrollY, + scrollEndEvent2.scrollY, "scrollY is within max" ); @@ -63,17 +67,20 @@ c }); let [scrollEvent3, scrollEndEvent3] = await onScrolling; scrollEvent3.QueryInterface(nsIAccessibleScrollingEvent); - ok( - scrollEvent3.maxScrollX >= scrollEvent3.scrollX, + Assert.greaterOrEqual( + scrollEvent3.maxScrollX, + scrollEvent3.scrollX, "scrollX is within max" ); scrollEndEvent3.QueryInterface(nsIAccessibleScrollingEvent); - ok( - scrollEndEvent3.maxScrollX >= scrollEndEvent3.scrollX, + Assert.greaterOrEqual( + scrollEndEvent3.maxScrollX, + scrollEndEvent3.scrollX, "scrollY is within max" ); - ok( - scrollEvent3.scrollX > scrollEvent2.scrollX, + Assert.greater( + scrollEvent3.scrollX, + scrollEvent2.scrollX, `${scrollEvent3.scrollX} > ${scrollEvent2.scrollX}` ); @@ -87,13 +94,15 @@ c }); let [scrollEvent4, scrollEndEvent4] = await onScrolling; scrollEvent4.QueryInterface(nsIAccessibleScrollingEvent); - ok( - scrollEvent4.maxScrollY >= scrollEvent4.scrollY, + Assert.greaterOrEqual( + scrollEvent4.maxScrollY, + scrollEvent4.scrollY, "scrollY is within max" ); scrollEndEvent4.QueryInterface(nsIAccessibleScrollingEvent); - ok( - scrollEndEvent4.maxScrollY >= scrollEndEvent4.scrollY, + Assert.greaterOrEqual( + scrollEndEvent4.maxScrollY, + scrollEndEvent4.scrollY, "scrollY is within max" ); @@ -119,7 +128,7 @@ addAccessibleTask(

b

c

`, - async function (browser, accDoc) { + async function (browser) { let onScrollingStart = waitForEvent(EVENT_SCROLLING_START, "c"); await SpecialPowers.spawn(browser, [], () => { content.location.hash = "#c"; @@ -137,7 +146,7 @@ addAccessibleTask(

test

`, - async function (browser, accDoc) { + async function (browser) { let onScrollingStart = waitForEvent( EVENT_SCROLLING_START, "inside-scrollable" -- cgit v1.2.3