Skip to content

Commit 9826f00

Browse files
committed
Put documents with a Document-Isolation-Policy in cross-origin isolated processes
https://bugs.webkit.org/show_bug.cgi?id=327253 rdar://189824020 Reviewed by Alex Christensen. With site isolation, a document with a Document-Isolation-Policy now goes in a cross-origin isolated process that its browsing context group has for its site. crossOriginIsolated returns true there, and SharedArrayBuffer objects can be posted within its agent cluster. A group that is already cross-origin isolated keeps all of its documents in its own processes. A group keeps its processes in one map, keyed by the site and whether the process is for documents with a policy. The policy is only known from the response, so a same-site navigation stays in its process until then. As for COOP, the network process then asks the UI process for a swap when the first response's policy doesn't match the process, unless the response doesn't replace the document (204 or 205). It sends the response's URL and policy header, and the UI process decides, also taking the top-level creation URL into account. The navigation continues with the same network load in the site's other process, for subframes too. WebProcessProxy records why a process is cross-origin isolated and passes this to the network process. The UI process also refuses to commit a response without a policy in a process for documents with one. Like COOP responses, navigations that could cross between these processes reload rather than revalidate, as a 304 can't move. A top-level data: document gets a process that matches the policy it inherits. A speculation rules prefetch only serves a navigation when its response has the same policy as the document that prefetched it, as the navigation stays in that document's process. So a document with a policy doesn't use a prefetch whose response hasn't arrived yet. Same-origin documents can now be in different processes, so ancestors in other processes count when a document checks whether it may navigate a frame. Not covered yet: - navigate doesn't fire when a same origin-domain document in another process navigates a frame and the navigation moves to a third process. - Dedicated workers of these documents are not cross-origin isolated. - A cross-origin iframe with a policy still needs its parent to allow the "cross-origin-isolated" permissions policy feature to be cross-origin isolated. Whether it should is WICG/document-isolation-policy#12 Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm imported/w3c/web-platform-tests/html/document-isolation-policy/agent-cluster.tentative.https.html imported/w3c/web-platform-tests/html/document-isolation-policy/cross-origin-isolated.tentative.https.html imported/w3c/web-platform-tests/html/document-isolation-policy/navigate-across-policies.tentative.https.html imported/w3c/web-platform-tests/html/document-isolation-policy/no-secure-context-https-iframe.tentative.html imported/w3c/web-platform-tests/html/document-isolation-policy/no-secure-context.tentative.html imported/w3c/web-platform-tests/html/document-isolation-policy/shared-array-buffer.tentative.https.html Canonical link: https://commits.webkit.org/324033@main
1 parent 327df13 commit 9826f00

58 files changed

Lines changed: 1385 additions & 169 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/agent-cluster.tentative.https-expected.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ PASS A document without a policy cannot run a javascript: URL in a same-origin f
1111
PASS A document with a policy can run a javascript: URL in a same-origin frame with one
1212
PASS A navigate event in a same-origin frame without a policy does not expose a link of a document with one as its sourceElement
1313
PASS A navigate event in a same-origin frame without a policy exposes a link of a document without one as its sourceElement
14+
PASS A cross-document navigate event in a same-origin frame without a policy does not expose a link of a document with one as its sourceElement
1415
PASS A fragment navigation during a reload of a same-origin frame with a policy does not move the reloaded document into another agent cluster
1516
PASS Posting a WebAssembly.Module to a same-origin frame without a policy succeeds
1617
PASS Posting a WebAssembly.Module to a same-origin frame with a policy fails

‎LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/agent-cluster.tentative.https.html‎

Lines changed: 26 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,10 @@
1212
<script>
1313
"use strict";
1414

15-
const origin = get_host_info().HTTPS_ORIGIN;
1615
const noCorpURL = get_host_info().HTTPS_REMOTE_ORIGIN + "/html/document-isolation-policy/resources/nothing-no-corp.js";
1716
// The smallest valid WebAssembly module.
1817
const emptyModuleBytes = new Uint8Array([0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00]);
1918

20-
function executorURL(policy, uuid) {
21-
return origin + executor_path + policy + `&uuid=${uuid}`;
22-
}
23-
24-
function createFrame(t, url) {
25-
const frame = document.createElement("iframe");
26-
t.add_cleanup(() => frame.remove());
27-
const loaded = new Promise(resolve => frame.onload = resolve);
28-
frame.src = url;
29-
document.body.append(frame);
30-
return loaded.then(() => frame);
31-
}
32-
33-
// Runs the body of an async function in the context identified by uuid and returns its result.
34-
async function runInContext(uuid, body) {
35-
const reply = token();
36-
send(uuid, `
37-
(async () => {
38-
let result;
39-
try {
40-
result = await (async () => { ${body} })();
41-
} catch (e) {
42-
result = e.name;
43-
}
44-
send("${reply}", JSON.stringify(result));
45-
})();
46-
`);
47-
return JSON.parse(await receive(reply));
48-
}
49-
5019
promise_test(async t => {
5120
const uuid = token();
5221
const frame = await createFrame(t, executorURL(dip_require_corp, uuid));
@@ -59,11 +28,7 @@
5928
const uuid = token();
6029
await createFrame(t, executorURL(dip_require_corp, uuid));
6130
const result = await runInContext(uuid, `
62-
const child = document.createElement("iframe");
63-
const loaded = new Promise(resolve => child.onload = resolve);
64-
child.src = ${JSON.stringify(executorURL(dip_none, token()))};
65-
document.body.append(child);
66-
await loaded;
31+
${appendFrameScript(executorURL(dip_none, token()))}
6732
let access;
6833
try {
6934
access = typeof child.contentWindow.document;
@@ -79,11 +44,7 @@
7944
const uuid = token();
8045
await createFrame(t, executorURL(dip_require_corp, uuid));
8146
const result = await runInContext(uuid, `
82-
const child = document.createElement("iframe");
83-
const loaded = new Promise(resolve => child.onload = resolve);
84-
child.src = ${JSON.stringify(executorURL(dip_require_corp, token()))};
85-
document.body.append(child);
86-
await loaded;
47+
${appendFrameScript(executorURL(dip_require_corp, token()))}
8748
return { contentDocument: child.contentDocument === null ? "null" : "document", access: typeof child.contentWindow.document };
8849
`);
8950
assert_object_equals(result, { contentDocument: "document", access: "object" });
@@ -179,8 +140,13 @@
179140
document.body.append(frame);
180141
await loaded;
181142
const reply = token();
143+
// A cross-document navigation can end the document before send() completes, so the result is also stored for its successor.
182144
await runInContext(uuid, `
183-
navigation.onnavigate = event => send("${reply}", event.sourceElement ? "element" : "null");
145+
navigation.onnavigate = event => {
146+
const sourceElement = event.sourceElement ? "element" : "null";
147+
sessionStorage.setItem("${reply}", sourceElement);
148+
send("${reply}", sourceElement);
149+
};
184150
return "ready";
185151
`);
186152
return { url: frame.src, reply };
@@ -207,10 +173,20 @@
207173
assert_equals(await receive(reply), "element");
208174
}, "A navigate event in a same-origin frame without a policy exposes a link of a document without one as its sourceElement");
209175

176+
promise_test(async t => {
177+
const name = token();
178+
const { reply } = await createNamedFrameWithNavigateListener(t, name);
179+
const uuid = token();
180+
await createFrame(t, executorURL(dip_require_corp, uuid));
181+
const destination = token();
182+
await runInContext(uuid, clickLinkScript(name, executorURL(dip_none, destination)));
183+
assert_equals(await runInContext(destination, `return sessionStorage.getItem("${reply}") ?? "no navigate event";`), "null");
184+
}, "A cross-document navigate event in a same-origin frame without a policy does not expose a link of a document with one as its sourceElement");
185+
210186
promise_test(async t => {
211187
const uuid = token();
212188
// The body arrives two seconds after the headers, so the fragment navigation happens while the reload is waiting for it.
213-
const frame = await createFrame(t, origin + executor_path + dip_require_corp + "|trickle(d2)" + `&uuid=${uuid}`);
189+
const frame = await createFrame(t, executorURL(dip_require_corp + "|trickle(d2)", uuid));
214190
const reloaded = new Promise(resolve => frame.onload = resolve);
215191
await runInContext(uuid, `
216192
location.reload();
@@ -249,26 +225,16 @@
249225
// Opens a cross-origin isolated popup and returns its uuid.
250226
function openCrossOriginIsolatedPopup(t) {
251227
const uuid = token();
252-
window.open(origin + executor_path + coopSameOrigin + coepRequireCorp + `&uuid=${uuid}`);
228+
window.open(executorURL(coopSameOrigin + coepRequireCorp, uuid));
253229
t.add_cleanup(() => send(uuid, "window.close();"));
254230
return uuid;
255231
}
256232

257-
function appendFrameScript(url) {
258-
return `
259-
const child = document.createElement("iframe");
260-
const loaded = new Promise(resolve => child.onload = resolve);
261-
child.src = ${JSON.stringify(url)};
262-
document.body.append(child);
263-
await loaded;
264-
`;
265-
}
266-
267233
promise_test(async t => {
268234
const topUUID = openCrossOriginIsolatedPopup(t);
269235
const childUUID = token();
270236
const result = await runInContext(topUUID, `
271-
${appendFrameScript(origin + executor_path + coepRequireCorp + dip_require_corp + `&uuid=${childUUID}`)}
237+
${appendFrameScript(executorURL(coepRequireCorp + dip_require_corp, childUUID))}
272238
window.child = child;
273239
let access;
274240
try {
@@ -298,11 +264,11 @@
298264
const topUUID = openCrossOriginIsolatedPopup(t);
299265
const frameUUID = token();
300266
await runInContext(topUUID, `
301-
${appendFrameScript(remoteOrigin + executor_path + coepRequireCorp + corp_cross_origin + dip_require_corp + `&uuid=${frameUUID}`)}
267+
${appendFrameScript(executorURL(coepRequireCorp + corp_cross_origin + dip_require_corp, frameUUID, remoteOrigin))}
302268
return "loaded";
303269
`);
304270
const accessChild = policy => `
305-
${appendFrameScript(remoteOrigin + executor_path + coepRequireCorp + policy + `&uuid=${token()}`)}
271+
${appendFrameScript(executorURL(coepRequireCorp + policy, token(), remoteOrigin))}
306272
try {
307273
return typeof child.contentWindow.document;
308274
} catch (e) {
@@ -316,7 +282,7 @@
316282
promise_test(async t => {
317283
const uuid = token();
318284
// The opener has no Cross-Origin-Opener-Policy, so the response switches the popup to another browsing context group.
319-
window.open(origin + executor_path + coopSameOrigin + dip_require_corp + `&uuid=${uuid}`);
285+
window.open(executorURL(coopSameOrigin + dip_require_corp, uuid));
320286
t.add_cleanup(() => send(uuid, "window.close();"));
321287
const result = await runInContext(uuid, `
322288
let fetchResult;
@@ -326,8 +292,8 @@
326292
} catch (e) {
327293
fetchResult = "blocked";
328294
}
329-
return { originAgentCluster, fetchResult };
295+
return { originAgentCluster, crossOriginIsolated, fetchResult };
330296
`);
331-
assert_object_equals(result, { originAgentCluster: true, fetchResult: "blocked" });
297+
assert_object_equals(result, { originAgentCluster: true, crossOriginIsolated: true, fetchResult: "blocked" });
332298
}, "A popup with a policy keeps it when its response switches browsing context groups");
333299
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
PASS A popup with isolate-and-require-corp is cross-origin isolated and exposes SharedArrayBuffer
3+
PASS A same-origin frame with isolate-and-require-corp in a document without a policy is cross-origin isolated and exposes SharedArrayBuffer
4+
PASS A popup without a policy is not cross-origin isolated and does not expose SharedArrayBuffer
5+
PASS A same-origin frame without a policy in a document without a policy is not cross-origin isolated and does not expose SharedArrayBuffer
6+
PASS A cross-origin frame with isolate-and-require-corp and allow="cross-origin-isolated" in a document without a policy is cross-origin isolated and exposes SharedArrayBuffer
7+
PASS A same-origin frame without a policy in a popup with isolate-and-require-corp is not cross-origin isolated and does not expose SharedArrayBuffer
8+
PASS A frame with isolate-and-require-corp in a popup that is not a secure context is not cross-origin isolated and does not expose SharedArrayBuffer
9+
PASS An about:blank popup opened by a popup with isolate-and-require-corp is cross-origin isolated and exposes SharedArrayBuffer
10+
PASS A frame navigated to about:blank in a popup with isolate-and-require-corp is cross-origin isolated and exposes SharedArrayBuffer
11+
PASS A srcdoc frame in a popup with isolate-and-require-corp is cross-origin isolated and exposes SharedArrayBuffer
12+
PASS A data: URL document that a document without a policy navigates a frame with isolate-and-require-corp to is not cross-origin isolated and does not expose SharedArrayBuffer
13+
PASS A data: URL document that a document with isolate-and-require-corp navigates a frame without a policy to is cross-origin isolated and exposes SharedArrayBuffer
14+
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<!doctype html>
2+
<meta charset="utf-8">
3+
<meta name="timeout" content="long">
4+
<title>Document-Isolation-Policy: crossOriginIsolated and SharedArrayBuffer in popups and frames</title>
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/common/get-host-info.sub.js"></script>
8+
<script src="/common/utils.js"></script>
9+
<script src="/common/dispatcher/dispatcher.js"></script>
10+
<script src="./resources/common.js"></script>
11+
<body>
12+
<script>
13+
"use strict";
14+
15+
function openPopup(t, url) {
16+
const popup = window.open(url);
17+
t.add_cleanup(() => popup.close());
18+
}
19+
20+
const getIsolation = "return { crossOriginIsolated, SharedArrayBuffer: typeof SharedArrayBuffer };";
21+
const isolated = { crossOriginIsolated: true, SharedArrayBuffer: "function" };
22+
const notIsolated = { crossOriginIsolated: false, SharedArrayBuffer: "undefined" };
23+
24+
[
25+
{ policy: dip_require_corp, label: "with isolate-and-require-corp", expected: isolated, result: "is cross-origin isolated and exposes SharedArrayBuffer" },
26+
{ policy: "", label: "without a policy", expected: notIsolated, result: "is not cross-origin isolated and does not expose SharedArrayBuffer" },
27+
].forEach(({ policy, label, expected, result }) => {
28+
promise_test(async t => {
29+
const uuid = token();
30+
openPopup(t, executorURL(policy, uuid));
31+
assert_object_equals(await runInContext(uuid, getIsolation), expected);
32+
}, `A popup ${label} ${result}`);
33+
34+
promise_test(async t => {
35+
const uuid = token();
36+
await createFrame(t, executorURL(policy, uuid));
37+
assert_object_equals(await runInContext(uuid, getIsolation), expected);
38+
}, `A same-origin frame ${label} in a document without a policy ${result}`);
39+
});
40+
41+
promise_test(async t => {
42+
const uuid = token();
43+
await createFrame(t, executorURL(dip_require_corp, uuid, get_host_info().HTTPS_REMOTE_ORIGIN), "cross-origin-isolated");
44+
assert_object_equals(await runInContext(uuid, getIsolation), isolated);
45+
}, `A cross-origin frame with isolate-and-require-corp and allow="cross-origin-isolated" in a document without a policy is cross-origin isolated and exposes SharedArrayBuffer`);
46+
47+
promise_test(async t => {
48+
const popupUUID = token();
49+
openPopup(t, executorURL(dip_require_corp, popupUUID));
50+
const frameUUID = token();
51+
await runInContext(popupUUID, `
52+
${appendFrameScript(executorURL("", frameUUID))}
53+
return "loaded";
54+
`);
55+
assert_object_equals(await runInContext(frameUUID, getIsolation), notIsolated);
56+
}, "A same-origin frame without a policy in a popup with isolate-and-require-corp is not cross-origin isolated and does not expose SharedArrayBuffer");
57+
58+
promise_test(async t => {
59+
const popupUUID = token();
60+
openPopup(t, executorURL("", popupUUID, get_host_info().HTTP_ORIGIN));
61+
const frameUUID = token();
62+
await runInContext(popupUUID, `
63+
${appendFrameScript(executorURL(dip_require_corp, frameUUID))}
64+
return "loaded";
65+
`);
66+
assert_object_equals(await runInContext(frameUUID, getIsolation), notIsolated);
67+
}, "A frame with isolate-and-require-corp in a popup that is not a secure context is not cross-origin isolated and does not expose SharedArrayBuffer");
68+
69+
promise_test(async t => {
70+
const uuid = token();
71+
openPopup(t, executorURL(dip_require_corp, uuid));
72+
assert_object_equals(await runInContext(uuid, `
73+
const popup = window.open();
74+
try {
75+
return { crossOriginIsolated: popup.crossOriginIsolated, SharedArrayBuffer: typeof popup.SharedArrayBuffer };
76+
} finally {
77+
popup.close();
78+
}
79+
`), isolated);
80+
}, "An about:blank popup opened by a popup with isolate-and-require-corp is cross-origin isolated and exposes SharedArrayBuffer");
81+
82+
[
83+
{ label: "A frame navigated to about:blank", navigate: `frame.src = "about:blank";` },
84+
{ label: "A srcdoc frame", navigate: `frame.srcdoc = "srcdoc";` },
85+
].forEach(({ label, navigate }) => {
86+
promise_test(async t => {
87+
const uuid = token();
88+
openPopup(t, executorURL(dip_require_corp, uuid));
89+
assert_object_equals(await runInContext(uuid, `
90+
const frame = document.createElement("iframe");
91+
await new Promise(resolve => {
92+
frame.onload = resolve;
93+
document.body.append(frame);
94+
});
95+
const loaded = new Promise(resolve => frame.onload = resolve);
96+
${navigate}
97+
await loaded;
98+
return { crossOriginIsolated: frame.contentWindow.crossOriginIsolated, SharedArrayBuffer: typeof frame.contentWindow.SharedArrayBuffer };
99+
`), isolated);
100+
}, `${label} in a popup with isolate-and-require-corp is cross-origin isolated and exposes SharedArrayBuffer`);
101+
});
102+
103+
promise_test(async t => {
104+
const frame = await createFrame(t, executorURL(dip_require_corp, token()));
105+
const reply = new Promise(resolve => window.onmessage = ({ data }) => resolve(data));
106+
frame.src = "data:text/html," + encodeURIComponent(`<script>parent.postMessage({ crossOriginIsolated, SharedArrayBuffer: typeof SharedArrayBuffer }, "*");<\/script>`);
107+
assert_object_equals(await reply, notIsolated);
108+
}, "A data: URL document that a document without a policy navigates a frame with isolate-and-require-corp to is not cross-origin isolated and does not expose SharedArrayBuffer");
109+
110+
promise_test(async t => {
111+
const uuid = token();
112+
openPopup(t, executorURL(dip_require_corp, uuid));
113+
const dataURL = "data:text/html," + encodeURIComponent(`<script>parent.postMessage({ crossOriginIsolated, SharedArrayBuffer: typeof SharedArrayBuffer }, "*");<\/script>`);
114+
assert_object_equals(await runInContext(uuid, `
115+
${appendFrameScript(executorURL("", token()), "cross-origin-isolated *")}
116+
const reply = new Promise(resolve => window.onmessage = ({ data }) => resolve(data));
117+
child.src = ${JSON.stringify(dataURL)};
118+
return await reply;
119+
`), isolated);
120+
}, "A data: URL document that a document with isolate-and-require-corp navigates a frame without a policy to is cross-origin isolated and exposes SharedArrayBuffer");
121+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
PASS navigation.navigate() from a document without a policy to one with does not abort the navigation
3+
PASS navigation.navigate() from a document with a policy to one without does not abort the navigation
4+
PASS A navigation to a 204 response from a document with a policy leaves the document alone
5+
PASS A navigation to a 205 response from a document with a policy leaves the document alone
6+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!doctype html>
2+
<meta charset="utf-8">
3+
<meta name="timeout" content="long">
4+
<title>Document-Isolation-Policy: navigations between documents with different policies</title>
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/common/get-host-info.sub.js"></script>
8+
<script src="/common/utils.js"></script>
9+
<script src="/common/dispatcher/dispatcher.js"></script>
10+
<script src="./resources/common.js"></script>
11+
<body>
12+
<script>
13+
"use strict";
14+
15+
function openPopup(t, url) {
16+
const popup = window.open(url);
17+
t.add_cleanup(() => popup.close());
18+
}
19+
20+
[
21+
{ from: dip_none, to: dip_require_corp, description: "without a policy to one with" },
22+
{ from: dip_require_corp, to: dip_none, description: "with a policy to one without" },
23+
].forEach(({ from, to, description }) => {
24+
promise_test(async t => {
25+
const uuid = token();
26+
openPopup(t, executorURL(from, uuid));
27+
const key = token();
28+
const destination = token();
29+
// The document goes away when the navigation commits, so any failure is stored for its successor.
30+
await runInContext(uuid, `
31+
const record = failure => sessionStorage.setItem("${key}", failure);
32+
navigation.onnavigateerror = event => record("navigateerror " + event.error.name);
33+
const { committed, finished } = navigation.navigate(${JSON.stringify(executorURL(to, destination))});
34+
committed.catch(error => record("committed " + error.name));
35+
finished.catch(error => record("finished " + error.name));
36+
return "navigating";
37+
`);
38+
await runInContext(destination, `return "loaded";`);
39+
// Give the first document's handlers time to store a failure.
40+
await new Promise(resolve => t.step_timeout(resolve, 500));
41+
assert_equals(await runInContext(destination, `return sessionStorage.getItem("${key}") ?? "none";`), "none");
42+
}, `navigation.navigate() from a document ${description} does not abort the navigation`);
43+
});
44+
45+
[204, 205].forEach(status => {
46+
promise_test(async t => {
47+
const uuid = token();
48+
openPopup(t, executorURL(dip_require_corp, uuid));
49+
await runInContext(uuid, `
50+
window.failure = "none";
51+
navigation.onnavigateerror = event => window.failure = "navigateerror " + event.error.name;
52+
navigation.navigate("/common/blank.html?pipe=status(${status})");
53+
return "navigating";
54+
`);
55+
// Give a cancelled navigation time to report its failure.
56+
await new Promise(resolve => t.step_timeout(resolve, 500));
57+
assert_equals(await runInContext(uuid, `return window.failure;`), "none");
58+
}, `A navigation to a ${status} response from a document with a policy leaves the document alone`);
59+
});
60+
</script>

‎LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/no-secure-context-https-iframe.tentative.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
const url = `${HTTPS_REMOTE_ORIGIN}/html/document-isolation-policy/resources/nothing-no-corp.js`;
1818
const reply = new Promise(resolve => window.onmessage = ({ data }) => resolve(data));
19-
frame.contentWindow.postMessage(`fetch(${JSON.stringify(url)}, { mode: "no-cors" }).then(response => parent.postMessage(response.type, "*"), () => parent.postMessage("blocked", "*"));`, "*");
20-
assert_equals(await reply, "opaque");
19+
frame.contentWindow.postMessage(`fetch(${JSON.stringify(url)}, { mode: "no-cors" }).then(response => response.type, () => "blocked").then(fetchResult => parent.postMessage({ fetchResult, crossOriginIsolated, SharedArrayBuffer: typeof SharedArrayBuffer }, "*"));`, "*");
20+
assert_object_equals(await reply, { fetchResult: "opaque", crossOriginIsolated: false, SharedArrayBuffer: "undefined" });
2121
}, "DIP requires a secure context, which an HTTPS iframe in an HTTP page is not");
2222
</script>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11

22
PASS DIP requires a secure context
3+
PASS A document with DIP that is not a secure context is not cross-origin isolated and does not expose SharedArrayBuffer
34

0 commit comments

Comments
 (0)