mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision b'ceb972b009e1b43c589dce3f36b050121493d2e0'
This commit is contained in:
parent
88ff668147
commit
3c4c34479c
196 changed files with 5979 additions and 848 deletions
|
@ -0,0 +1,39 @@
|
|||
// META: global=window
|
||||
// META: title=Fetch API: keepalive handling
|
||||
// META: script=/resources/testharness.js
|
||||
// META: script=/resources/testharnessreport.js
|
||||
// META: script=/common/utils.js
|
||||
// META: script=/common/get-host-info.sub.js
|
||||
// META: script=../resources/keepalive-helper.js
|
||||
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
HTTP_NOTSAMESITE_ORIGIN,
|
||||
HTTP_REMOTE_ORIGIN,
|
||||
HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT
|
||||
} = get_host_info();
|
||||
|
||||
for (const method of ['GET', 'POST']) {
|
||||
promise_test(async (test) => {
|
||||
const token1 = token();
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.src = getKeepAliveIframeUrl(token1, method);
|
||||
document.body.appendChild(iframe);
|
||||
await iframeLoaded(iframe);
|
||||
assert_equals(await getTokenFromMessage(), token1);
|
||||
iframe.remove();
|
||||
|
||||
assertStashedTokenAsync(`simple ${method} request: no payload`, token1);
|
||||
}, `simple ${method} request: no payload; setting up`);
|
||||
}
|
||||
|
||||
promise_test(async (test) => {
|
||||
const w = window.open(`${
|
||||
HTTP_NOTSAMESITE_ORIGIN}/fetch/api/resources/keepalive-redirect-window.html`);
|
||||
const token = await getTokenFromMessage();
|
||||
w.close();
|
||||
|
||||
assertStashedTokenAsync(
|
||||
'keepalive in onunload in nested frame in another window', token);
|
||||
}, 'keepalive in onunload in nested frame in another window; setting up');
|
Loading…
Add table
Add a link
Reference in a new issue