diff options
Diffstat (limited to 'testing/web-platform/tests/pending-beacon/pending_get_beacon-cors.tentative.https.window.js')
-rw-r--r-- | testing/web-platform/tests/pending-beacon/pending_get_beacon-cors.tentative.https.window.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/pending-beacon/pending_get_beacon-cors.tentative.https.window.js b/testing/web-platform/tests/pending-beacon/pending_get_beacon-cors.tentative.https.window.js new file mode 100644 index 0000000000..10bb3a0bed --- /dev/null +++ b/testing/web-platform/tests/pending-beacon/pending_get_beacon-cors.tentative.https.window.js @@ -0,0 +1,28 @@ +// META: script=/common/get-host-info.sub.js +// META: script=/common/utils.js +// META: script=./resources/pending_beacon-helper.js + +'use strict'; + +const {HTTPS_ORIGIN, HTTPS_NOTSAMESITE_ORIGIN} = get_host_info(); + +parallelPromiseTest(async t => { + const uuid = token(); + const url = generateSetBeaconURL(uuid, {host: HTTPS_ORIGIN}); + + let beacon = new PendingGetBeacon(url); + beacon.sendNow(); + + await expectBeacon(uuid, {count: 1}); +}, 'PendingGetBeacon: same-origin'); + +parallelPromiseTest(async t => { + const uuid = token(); + const url = generateSetBeaconURL( + uuid, {host: HTTPS_NOTSAMESITE_ORIGIN, expectOrigin: HTTPS_ORIGIN}); + + let beacon = new PendingGetBeacon(url); + beacon.sendNow(); + + await expectBeacon(uuid, {count: 1}); +}, 'PendingGetBeacon: cross-origin'); |