Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /pending-beacon/pending_get_beacon-cors.tentative.https.window.html - WPT Dashboard Interop Dashboard
// META: script=/common/get-host-info.sub.js
// META: script=/common/utils.js
// META: script=/fetch/fetch-later/resources/fetch-later-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');