diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /testing/web-platform/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js')
-rw-r--r-- | testing/web-platform/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/testing/web-platform/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js b/testing/web-platform/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js deleted file mode 100644 index a0ede5dadd..0000000000 --- a/testing/web-platform/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js +++ /dev/null @@ -1,81 +0,0 @@ -// META: script=/common/dispatcher/dispatcher.js -// META: script=/common/get-host-info.sub.js -// META: script=/common/utils.js -// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js -// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js -// META: script=./resources/pending_beacon-helper.js - -'use strict'; - -for (const beaconType of BeaconTypes) { - const beaconName = beaconType.name; - - parallelPromiseTest(async t => { - const uuid = token(); - const url = generateSetBeaconURL(uuid); - // backgroundTimeout = 0s means `beacon should be sent out right on - // entering `hidden` state after navigating away. - const options = {backgroundTimeout: 0}; - const helper = new RemoteContextHelper(); - // Opens a window with noopener so that BFCache will work. - const rc1 = await helper.addWindow( - /*config=*/ null, /*options=*/ {features: 'noopener'}); - - // Creates a PendingBeacon in remote which should only be sent on navigating - // away. - await rc1.executeScript((beaconName, url, options) => { - const beacon = beaconName == 'PendingGetBeacon' ? - new PendingGetBeacon(url, options) : - new PendingPostBeacon(url, options); - }, [beaconName, url, options]); - - await expectBeacon(uuid, {count: 0}); - }, `${beaconName}: does not send without page navigation.`); - - parallelPromiseTest(async t => { - const uuid = token(); - const url = generateSetBeaconURL(uuid); - // backgroundTimeout = 0s means `beacon should be sent out right on - // entering `hidden` state after navigating away. - const options = {backgroundTimeout: 0}; - const helper = new RemoteContextHelper(); - // Opens a window with noopener so that BFCache will work. - const rc1 = await helper.addWindow( - /*config=*/ null, /*options=*/ {features: 'noopener'}); - - // Creates a PendingBeacon in remote which should only be sent on navigating - // away. - await rc1.executeScript((beaconName, url, options) => { - const beacon = beaconName == 'PendingGetBeacon' ? - new PendingGetBeacon(url, options) : - new PendingPostBeacon(url, options); - }, [beaconName, url, options]); - // Navigates away to trigger beacon sending. - rc1.navigateToNew(); - - await expectBeacon(uuid, {count: 1}); - }, `${beaconName}: sends on page entering hidden state (w/ BFCache).`); - - parallelPromiseTest(async t => { - const uuid = token(); - const url = generateSetBeaconURL(uuid); - // backgroundTimeout = 0s means `beacon should be sent out right on - // entering `hidden` state after navigating away. - const options = {backgroundTimeout: 0}; - const helper = new RemoteContextHelper(); - // Opens a window without BFCache. - const rc1 = await helper.addWindow(); - - // Creates a PendingBeacon in remote which should only be sent on navigating - // away. - await rc1.executeScript((beaconName, url, options) => { - const beacon = beaconName == 'PendingGetBeacon' ? - new PendingGetBeacon(url, options) : - new PendingPostBeacon(url, options); - }, [beaconName, url, options]); - // Navigates away to trigger beacon sending. - rc1.navigateToNew(); - - await expectBeacon(uuid, {count: 1}); - }, `${beaconName}: sends on page entering hidden state (w/o BFCache).`); -} |