mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision b'62c17eac9f99db2ea4e213328c9c6122136694cc'
This commit is contained in:
parent
886032fc74
commit
90b96becef
317 changed files with 4745 additions and 2272 deletions
|
@ -4,16 +4,17 @@
|
|||
'use strict';
|
||||
|
||||
(async function() {
|
||||
// This is cross-domain from the current document.
|
||||
// These are cross-domain from the current document.
|
||||
const wwwAlt = "https://{{hosts[alt][www]}}:{{ports[https][0]}}";
|
||||
const www1Alt = "https://{{hosts[alt][www1]}}:{{ports[https][0]}}";
|
||||
const responder_html = "/storage-access-api/resources/script-with-cookie-header.py?script=embedded_responder.js";
|
||||
|
||||
if (window === window.top) {
|
||||
// Test the interaction between two (same-origin) iframes.
|
||||
promise_test(async (t) => {
|
||||
const responder_html = `${wwwAlt}/storage-access-api/resources/script-with-cookie-header.py?script=embedded_responder.js`;
|
||||
const [frame1, frame2] = await Promise.all([
|
||||
CreateFrame(responder_html),
|
||||
CreateFrame(responder_html),
|
||||
CreateFrame(wwwAlt + responder_html),
|
||||
CreateFrame(wwwAlt + responder_html),
|
||||
]);
|
||||
|
||||
t.add_cleanup(async () => {
|
||||
|
@ -27,6 +28,24 @@
|
|||
assert_equals(state, "granted");
|
||||
}, "Permissions grants are observable across same-origin iframes");
|
||||
|
||||
// Test the interaction between two cross-origin but same-site iframes.
|
||||
promise_test(async (t) => {
|
||||
const [frame1, frame2] = await Promise.all([
|
||||
CreateFrame(wwwAlt + responder_html),
|
||||
CreateFrame(www1Alt + responder_html),
|
||||
]);
|
||||
|
||||
t.add_cleanup(async () => {
|
||||
await SetPermissionInFrame(frame1, [{ name: 'storage-access' }, 'prompt']);
|
||||
});
|
||||
|
||||
const observed = ObservePermissionChange(frame2);
|
||||
await SetPermissionInFrame(frame1, [{ name: 'storage-access' }, 'granted']);
|
||||
|
||||
const state = await observed;
|
||||
assert_equals(state, "granted");
|
||||
}, "Permissions grants are observable across same-site iframes");
|
||||
|
||||
promise_test(async (t) => {
|
||||
// Finally run the simple tests below in a separate cross-origin iframe.
|
||||
await RunTestsInIFrame('https://{{domains[www]}}:{{ports[https][0]}}/storage-access-api/resources/permissions-iframe.https.html');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue