blob: 655f1e152ef72212b01038b69335fa1a28bed083 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<title>window.originIsolationRestricted for a sandboxed frame</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script type="module">
import {
navigateIframe,
testOriginIsolationRestricted
} from "../resources/helpers.mjs";
// We do this manually instead of using insertIframe because we want to add a
// sandbox="" attribute and we don't want to set both document.domains.
promise_setup(() => {
const iframe = document.createElement("iframe");
iframe.sandbox = "allow-scripts";
const navigatePromise = navigateIframe(iframe, "{{hosts[][]}}", "?1");
document.body.append(iframe);
return navigatePromise;
});
// Because sandboxed iframes have an opaque origin, their agent cluster key is
// always an origin, so there are no additional restrictions imposed by origin
// isolation. Thus the getter returns false.
testOriginIsolationRestricted(0, false);
</script>