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-sendondiscard.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-sendondiscard.tentative.https.window.js')
-rw-r--r-- | testing/web-platform/tests/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/testing/web-platform/tests/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js b/testing/web-platform/tests/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js deleted file mode 100644 index b4283cecef..0000000000 --- a/testing/web-platform/tests/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js +++ /dev/null @@ -1,95 +0,0 @@ -// META: script=/common/utils.js -// META: script=./resources/pending_beacon-helper.js - -'use strict'; - -parallelPromiseTest(async t => { - const uuid = token(); - const url = generateSetBeaconURL(uuid); - const numPerMethod = 20; - const total = numPerMethod * 2; - - // Loads an iframe that creates `numPerMethod` GET & POST beacons. - const iframe = await loadScriptAsIframe(` - const url = "${url}"; - for (let i = 0; i < ${numPerMethod}; i++) { - let get = new PendingGetBeacon(url); - let post = new PendingPostBeacon(url); - } - `); - - // Delete the iframe to trigger beacon sending. - document.body.removeChild(iframe); - - // The iframe should have sent all beacons. - await expectBeacon(uuid, {count: total}); -}, 'A discarded document sends all its beacons with default config.'); - -parallelPromiseTest(async t => { - const uuid = token(); - const url = generateSetBeaconURL(uuid); - - // Loads an iframe that creates a GET beacon, - // then sends it out with `sendNow()`. - const iframe = await loadScriptAsIframe(` - const url = "${url}"; - let beacon = new PendingGetBeacon(url); - beacon.sendNow(); - `); - - // Delete the document and verify no more beacons are sent. - document.body.removeChild(iframe); - - // The iframe should have sent only 1 beacon. - await expectBeacon(uuid, {count: 1}); -}, 'A discarded document does not send an already sent beacon.'); - -parallelPromiseTest(async t => { - const uuid = token(); - const url = generateSetBeaconURL(uuid); - const numPerMethod = 20; - const total = numPerMethod * 2; - - // Loads an iframe that creates `numPerMethod` GET & POST beacons with - // different timeouts. - const iframe = await loadScriptAsIframe(` - const url = "${url}"; - for (let i = 0; i < ${numPerMethod}; i++) { - let get = new PendingGetBeacon(url, {timeout: 100*i}); - let post = new PendingPostBeacon(url, {timeout: 100*i}); - } - `); - - // Delete the iframe to trigger beacon sending. - document.body.removeChild(iframe); - - // Even beacons are configured with different timeouts, - // the iframe should have sent all beacons when it is discarded. - await expectBeacon(uuid, {count: total}); -}, `A discarded document sends all its beacons of which timeouts are not - default.`); - -parallelPromiseTest(async t => { - const uuid = token(); - const url = generateSetBeaconURL(uuid); - const numPerMethod = 20; - const total = numPerMethod * 2; - - // Loads an iframe that creates `numPerMethod` GET & POST beacons with - // different backgroundTimeouts. - const iframe = await loadScriptAsIframe(` - const url = "${url}"; - for (let i = 0; i < ${numPerMethod}; i++) { - let get = new PendingGetBeacon(url, {backgroundTimeout: 100*i}); - let post = new PendingPostBeacon(url, {backgroundTimeout: 100*i}); - } - `); - - // Delete the iframe to trigger beacon sending. - document.body.removeChild(iframe); - - // Even beacons are configured with different backgroundTimeouts, - // the iframe should have sent all beacons when it is discarded. - await expectBeacon(uuid, {count: total}); -}, `A discarded document sends all its beacons of which backgroundTimeouts are - not default.`); |