mirror of
https://github.com/servo/servo.git
synced 2025-10-14 23:40:26 +01:00
Update web-platform-tests to revision b'4435c35d9085ed2be61e64d0093b8e1b0e7a877b'
This commit is contained in:
parent
901b76297d
commit
4031d79cea
383 changed files with 8858 additions and 2734 deletions
|
|
@ -12,21 +12,21 @@ setup(() => {
|
|||
|
||||
// 4 actors:
|
||||
// A (this document)
|
||||
// ┌─────────────────────┴──┐
|
||||
// ┌─┼───────────────────┐ D (anonymous-iframe)
|
||||
// │ B (fenced-frame) │
|
||||
// │ │ │
|
||||
// │ C (anonymous-iframe)│
|
||||
// └─────────────────────┘
|
||||
// ┌─────────────────────┴───────┐
|
||||
// ┌─┼────────────────────────┐ D (credentialless-iframe)
|
||||
// │ B (fenced-frame) │
|
||||
// │ │ │
|
||||
// │ C (credentialless-iframe)│
|
||||
// └──────────────────────────┘
|
||||
//
|
||||
// This test whether the two anonymous iframe can communicate and bypass the
|
||||
// This test whether the two credentialless iframe can communicate and bypass the
|
||||
// fencedframe boundary. This shouldn't happen.
|
||||
promise_test(async test => {
|
||||
const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
|
||||
const msg_queue = token();
|
||||
|
||||
// Create the the 3 actors.
|
||||
const anonymous_iframe_1 = newAnonymousIframe(cross_origin);
|
||||
const iframe_credentialless_1 = newIframeCredentialless(cross_origin);
|
||||
const fenced_frame = newFencedFrame(cross_origin);
|
||||
send(fenced_frame, `
|
||||
const importScript = ${importScript};
|
||||
|
|
@ -36,22 +36,22 @@ promise_test(async test => {
|
|||
await importScript("/html/anonymous-iframe/resources/common.js");
|
||||
const support_loading_mode_fenced_frame =
|
||||
"|header(Supports-Loading-Mode,fenced-frame)";
|
||||
const anonymous_iframe_2 =
|
||||
newAnonymousIframe("${cross_origin}", support_loading_mode_fenced_frame);
|
||||
send("${msg_queue}", anonymous_iframe_2);
|
||||
const iframe_credentialless_2 = newIframeCredentialless("${cross_origin}",
|
||||
support_loading_mode_fenced_frame);
|
||||
send("${msg_queue}", iframe_credentialless_2);
|
||||
`);
|
||||
const anonymous_iframe_2 = await receive(msg_queue);
|
||||
const iframe_credentialless_2 = await receive(msg_queue);
|
||||
|
||||
// Try to communicate using BroadCastChannel, in between the two
|
||||
// AnonymousIframe.
|
||||
// Try to communicate using BroadCastChannel, in between the credentialless
|
||||
// iframes.
|
||||
const bc_key = token();
|
||||
send(anonymous_iframe_1, `
|
||||
send(iframe_credentialless_1, `
|
||||
const bc = new BroadcastChannel("${bc_key}");
|
||||
bc.onmessage = event => send("${msg_queue}", event.data);
|
||||
send("${msg_queue}", "BroadcastChannel registered");
|
||||
`);
|
||||
assert_equals(await receive(msg_queue), "BroadcastChannel registered");
|
||||
await send(anonymous_iframe_2, `
|
||||
await send(iframe_credentialless_2, `
|
||||
const bc = new BroadcastChannel("${bc_key}");
|
||||
bc.postMessage("Can communicate");
|
||||
`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue