blob: cfa39aaee034b0fe5e680e4f796a35d25a1e9a0a [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<title>Parent is not isolated, child attempts to isolate but uses a bad header value, child is a subdomain of the parent</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script type="module">
import {
insertIframe,
testSameAgentCluster,
testOriginIsolationRestricted
} from "./resources/helpers.mjs";
let frameIndex = 0;
for (const badValue of ["", "?0", "true", "\"?1\"", "1", "?2", "(?1)"]) {
promise_test(async () => {
await insertIframe("{{hosts[][www]}}", badValue);
}, `"${badValue}": frame insertion`);
// Since the header values are bad there should be no isolation
testSameAgentCluster([self, frameIndex], `"${badValue}"`);
testOriginIsolationRestricted(frameIndex, false, `"${badValue}"`);
++frameIndex;
}
</script>