diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /accessible/tests/browser/events | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/tests/browser/events')
5 files changed, 34 insertions, 25 deletions
diff --git a/accessible/tests/browser/events/browser_test_docload.js b/accessible/tests/browser/events/browser_test_docload.js index 78ac77fd8c..12076b3002 100644 --- a/accessible/tests/browser/events/browser_test_docload.js +++ b/accessible/tests/browser/events/browser_test_docload.js @@ -30,7 +30,7 @@ function urlChecker(url) { }; } -async function runTests(browser, accDoc) { +async function runTests(browser) { let onLoadEvents = waitForEvents({ expected: [ [EVENT_REORDER, getAccessible(browser)], diff --git a/accessible/tests/browser/events/browser_test_focus_browserui.js b/accessible/tests/browser/events/browser_test_focus_browserui.js index 969d336c74..2f67cb3681 100644 --- a/accessible/tests/browser/events/browser_test_focus_browserui.js +++ b/accessible/tests/browser/events/browser_test_focus_browserui.js @@ -11,7 +11,7 @@ loadScripts( { name: "role.js", dir: MOCHITESTS_DIR } ); -async function runTests(browser, accDoc) { +async function runTests(browser) { await SpecialPowers.pushPrefEnv({ // If Fission is disabled, the pref is no-op. set: [["fission.bfcacheInParent", true]], diff --git a/accessible/tests/browser/events/browser_test_focus_dialog.js b/accessible/tests/browser/events/browser_test_focus_dialog.js index 71485a678d..03a1b82dc1 100644 --- a/accessible/tests/browser/events/browser_test_focus_dialog.js +++ b/accessible/tests/browser/events/browser_test_focus_dialog.js @@ -11,7 +11,7 @@ loadScripts( { name: "role.js", dir: MOCHITESTS_DIR } ); -async function runTests(browser, accDoc) { +async function runTests(browser) { let onFocus = waitForEvent(EVENT_FOCUS, "button"); await SpecialPowers.spawn(browser, [], () => { content.document.getElementById("button").focus(); diff --git a/accessible/tests/browser/events/browser_test_focus_urlbar.js b/accessible/tests/browser/events/browser_test_focus_urlbar.js index 68b2b07f3c..647b837e9f 100644 --- a/accessible/tests/browser/events/browser_test_focus_urlbar.js +++ b/accessible/tests/browser/events/browser_test_focus_urlbar.js @@ -68,10 +68,10 @@ class TipTestProvider extends UrlbarProvider { get type() { return UrlbarUtils.PROVIDER_TYPE.PROFILE; } - isActive(context) { + isActive() { return true; } - isRestricting(context) { + isRestricting() { return true; } async startQuery(context, addCallback) { 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</textarea> }); 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</textarea> }); 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</textarea> }); 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</textarea> }); 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( <p>b</p> <p id="c">c</p> `, - 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( <h1 style="height: 300%;" id="inside-scrollable">test</h1> </div> `, - async function (browser, accDoc) { + async function (browser) { let onScrollingStart = waitForEvent( EVENT_SCROLLING_START, "inside-scrollable" |