summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/popupNotifications
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /browser/base/content/test/popupNotifications
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/test/popupNotifications')
-rw-r--r--browser/base/content/test/popupNotifications/browser_popupNotification.js22
-rw-r--r--browser/base/content/test/popupNotifications/browser_popupNotification_2.js20
-rw-r--r--browser/base/content/test/popupNotifications/browser_popupNotification_3.js12
-rw-r--r--browser/base/content/test/popupNotifications/browser_popupNotification_4.js10
-rw-r--r--browser/base/content/test/popupNotifications/browser_popupNotification_5.js14
-rw-r--r--browser/base/content/test/popupNotifications/browser_popupNotification_accesskey.js2
-rw-r--r--browser/base/content/test/popupNotifications/browser_popupNotification_keyboard.js6
-rw-r--r--browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js6
-rw-r--r--browser/base/content/test/popupNotifications/browser_popupNotification_security_delay.js2
9 files changed, 47 insertions, 47 deletions
diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification.js b/browser/base/content/test/popupNotifications/browser_popupNotification.js
index 235aa90b5f..4479cb1ee7 100644
--- a/browser/base/content/test/popupNotifications/browser_popupNotification.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification.js
@@ -26,7 +26,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
triggerMainCommand(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(this.notifyObj.mainActionClicked, "mainAction was clicked");
ok(
!this.notifyObj.dismissalCallbackTriggered,
@@ -55,7 +55,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
triggerSecondaryCommand(popup, 0);
},
- onHidden(popup) {
+ onHidden() {
ok(this.notifyObj.secondaryActionClicked, "secondaryAction was clicked");
ok(
!this.notifyObj.dismissalCallbackTriggered,
@@ -89,7 +89,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
triggerSecondaryCommand(popup, 1);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.extraSecondaryActionClicked,
"extra secondary action was clicked"
@@ -123,7 +123,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
triggerSecondaryCommand(popup, 2);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.extraSecondaryActionClicked,
"extra secondary action was clicked"
@@ -145,7 +145,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.notifyObj.dismissalCallbackTriggered,
"dismissal callback triggered"
@@ -205,7 +205,7 @@ var tests = [
// switch back to the old browser
gBrowser.selectedTab = this.oldSelectedTab;
},
- onHidden(popup) {
+ onHidden() {
// actually remove the notification to prevent it from reappearing
ok(
wrongBrowserNotificationObject.dismissalCallbackTriggered,
@@ -247,7 +247,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
this.notification2.remove();
},
- onHidden(popup) {
+ onHidden() {
ok(
!this.notifyObj.dismissalCallbackTriggered,
"dismissal callback wasn't triggered"
@@ -276,7 +276,7 @@ var tests = [
is(popup.children.length, 1, "only one notification left");
triggerSecondaryCommand(popup, 0);
},
- onHidden(popup) {
+ onHidden() {
ok(this.testNotif1.mainActionClicked, "main action #1 was clicked");
ok(
!this.testNotif1.secondaryActionClicked,
@@ -316,7 +316,7 @@ var tests = [
);
triggerMainCommand(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked");
ok(
!this.notifyObj.dismissalCallbackTriggered,
@@ -348,7 +348,7 @@ var tests = [
);
triggerMainCommand(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked");
ok(
!this.notifyObj.dismissalCallbackTriggered,
@@ -380,7 +380,7 @@ var tests = [
);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
// Remove the notifications
this.firstNotification.remove();
this.secondNotification.remove();
diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_2.js b/browser/base/content/test/popupNotifications/browser_popupNotification_2.js
index 8738a3b605..1b0dea66f6 100644
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_2.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_2.js
@@ -24,7 +24,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.notifyObj.dismissalCallbackTriggered,
"dismissal callback triggered"
@@ -52,7 +52,7 @@ var tests = [
);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
let icon = document.getElementById("geo-notification-icon");
isnot(
icon.getBoundingClientRect().width,
@@ -84,7 +84,7 @@ var tests = [
});
this.notification = showNotification(this.notifyObj);
},
- async onShown(popup) {
+ async onShown() {
this.complete = false;
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
await promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
@@ -95,7 +95,7 @@ var tests = [
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
await promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
},
- onHidden(popup) {
+ onHidden() {
ok(
this.complete,
"Should only have hidden the notification after 3 page loads"
@@ -122,7 +122,7 @@ var tests = [
});
this.notification = showNotification(this.notifyObj);
},
- async onShown(popup) {
+ async onShown() {
this.complete = false;
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
await promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
@@ -134,7 +134,7 @@ var tests = [
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
await promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
},
- onHidden(popup) {
+ onHidden() {
ok(
this.complete,
"Should only have hidden the notification after the timeout was passed"
@@ -172,7 +172,7 @@ var tests = [
this.complete = true;
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.complete,
"Should only have hidden the notification after it was dismissed"
@@ -212,7 +212,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
this.notification.remove();
this.box.remove();
},
@@ -272,7 +272,7 @@ var tests = [
let notification = popup.children[0];
EventUtils.synthesizeMouseAtCenter(notification.closebutton, {});
},
- onHidden(popup) {
+ onHidden() {
ok(
this.notifyObj.dismissalCallbackTriggered,
"dismissal callback triggered"
@@ -302,7 +302,7 @@ var tests = [
);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.notifyObj.dismissalCallbackTriggered,
"dismissal callback triggered"
diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_3.js b/browser/base/content/test/popupNotifications/browser_popupNotification_3.js
index 1b7626c660..1d8b6b473b 100644
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_3.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_3.js
@@ -27,7 +27,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(
!this.notifyObj.dismissalCallbackTriggered,
"dismissal callback wasn't triggered"
@@ -70,7 +70,7 @@ var tests = [
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
this.notification1.remove();
ok(
this.notifyObj1.removedCallbackTriggered,
@@ -127,7 +127,7 @@ var tests = [
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
this.notificationNew.remove();
gBrowser.removeTab(gBrowser.selectedTab);
@@ -156,7 +156,7 @@ var tests = [
dismissNotification(popup);
});
},
- onHidden(popup) {
+ onHidden() {
ok(
!this.notifyObj.mainActionClicked,
"mainAction was not clicked because it was too soon"
@@ -188,7 +188,7 @@ var tests = [
triggerMainCommand(popup);
}, 500);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.notifyObj.mainActionClicked,
"mainAction was clicked after the delay"
@@ -308,7 +308,7 @@ var tests = [
};
showNotification(this.notifyObj);
},
- async onShown(popup) {
+ async onShown() {
info("Adding observer and performing navigation");
await Promise.all([
diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_4.js b/browser/base/content/test/popupNotifications/browser_popupNotification_4.js
index b0e8f016ef..3ea0e943a3 100644
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_4.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_4.js
@@ -23,7 +23,7 @@ var tests = [
checkPopup(popup, this.testNotif);
triggerMainCommand(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(this.testNotif.mainActionClicked, "main action has been triggered");
},
},
@@ -38,7 +38,7 @@ var tests = [
checkPopup(popup, this.testNotif);
triggerSecondaryCommand(popup, 0);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.testNotif.secondaryActionClicked,
"secondary action has been triggered"
@@ -83,7 +83,7 @@ var tests = [
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
this.notification1.remove();
this.notification2.remove();
},
@@ -213,7 +213,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
triggerMainCommand(popup);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.notifyObj.dismissalCallbackTriggered,
"dismissal callback was triggered"
@@ -237,7 +237,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
triggerSecondaryCommand(popup, 0);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.notifyObj.dismissalCallbackTriggered,
"dismissal callback was triggered"
diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_5.js b/browser/base/content/test/popupNotifications/browser_popupNotification_5.js
index 0ec5de0c3a..48640b9b00 100644
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_5.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_5.js
@@ -62,7 +62,7 @@ var tests = [
this.notification1.remove();
this.notification2.remove();
},
- onHidden(popup) {},
+ onHidden() {},
},
// The anchor icon should be shown for notifications in background windows.
{
@@ -116,7 +116,7 @@ var tests = [
this.complete = true;
triggerSecondaryCommand(popup, 0);
},
- onHidden(popup) {
+ onHidden() {
ok(
!this.complete,
"Should have hidden the notification after navigation"
@@ -155,7 +155,7 @@ var tests = [
this.complete = true;
triggerSecondaryCommand(popup, 0);
},
- onHidden(popup) {
+ onHidden() {
ok(
this.complete,
"Should have hidden the notification after clicking Not Now"
@@ -174,7 +174,7 @@ var tests = [
this.notifyObj.options.persistent = true;
gNotification = showNotification(this.notifyObj);
},
- async onShown(popup) {
+ async onShown() {
this.oldSelectedTab = gBrowser.selectedTab;
await BrowserTestUtils.openNewForegroundTab(
gBrowser,
@@ -182,7 +182,7 @@ var tests = [
"http://example.com/"
);
},
- onHidden(popup) {
+ onHidden() {
ok(true, "Should have hidden the notification after tab switch");
gBrowser.removeTab(gBrowser.selectedTab);
gBrowser.selectedTab = this.oldSelectedTab;
@@ -318,7 +318,7 @@ var tests = [
this.notification1.remove();
this.notification2.remove();
},
- onHidden(popup) {},
+ onHidden() {},
},
// Test that persistent notifications are shown stacked by anchor on update
{
@@ -363,7 +363,7 @@ var tests = [
this.notification2.remove();
this.notification3.remove();
},
- onHidden(popup) {},
+ onHidden() {},
},
// Test that on closebutton click, only the persistent notification
// that contained the closebutton loses its persistent status.
diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_accesskey.js b/browser/base/content/test/popupNotifications/browser_popupNotification_accesskey.js
index 4a68105e27..7e8e3f0269 100644
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_accesskey.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_accesskey.js
@@ -36,7 +36,7 @@ var tests = [
// process of being hidden right now.
isnot(popup.state, "hiding", "popup is not hiding");
},
- onHidden(popup) {
+ onHidden() {
window.removeEventListener("command", commandTriggered, true);
ok(buttonPressed, "button pressed");
},
diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_keyboard.js b/browser/base/content/test/popupNotifications/browser_popupNotification_keyboard.js
index 5c20751c3f..bd6fd38d3f 100644
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_keyboard.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_keyboard.js
@@ -46,7 +46,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
EventUtils.synthesizeKey("KEY_Escape");
},
- onHidden(popup) {
+ onHidden() {
ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked");
ok(this.notifyObj.secondaryActionClicked, "secondaryAction was clicked");
ok(
@@ -77,7 +77,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
EventUtils.synthesizeKey("KEY_Escape");
},
- onHidden(popup) {
+ onHidden() {
ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked");
ok(
!this.notifyObj.secondaryActionClicked,
@@ -123,7 +123,7 @@ var tests = [
is(document.activeElement, popup.children[0].closebutton);
this.notification.remove();
},
- onHidden(popup) {},
+ onHidden() {},
},
// Test that you can switch between active notifications with the space key
// and that the notification is focused on selection.
diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js b/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js
index a73e1f5948..68e782cea6 100644
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js
@@ -43,7 +43,7 @@ var tests = [
);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
this.notification.remove();
gBrowser.removeTab(gBrowser.selectedTab);
gBrowser.selectedTab = this.oldSelectedTab;
@@ -85,7 +85,7 @@ var tests = [
);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
this.notification.remove();
gBrowser.removeTab(gBrowser.selectedTab);
gBrowser.selectedTab = this.oldSelectedTab;
@@ -135,7 +135,7 @@ var tests = [
checkPopup(popup, this.notifyObj);
dismissNotification(popup);
},
- onHidden(popup) {
+ onHidden() {
this.notification.remove();
gBrowser.removeTab(gBrowser.selectedTab);
gBrowser.selectedTab = this.oldSelectedTab;
diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_security_delay.js b/browser/base/content/test/popupNotifications/browser_popupNotification_security_delay.js
index 3b027bc1ef..140c2be2fd 100644
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_security_delay.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_security_delay.js
@@ -227,7 +227,7 @@ add_task(async function test_notificationReshowTabSwitch() {
let panelShownPromise;
info("Open a new tab which hides the notification panel.");
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
info("Wait for panel to be hidden by tab switch.");
await panelHiddenPromise;
info(