Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<meta charset="utf-8">
<title>A frame in a popup that still shows its initial about:blank can request origin-keying</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script type="module">
import { navigateIframe, testGetter } from "./resources/helpers.mjs";
let popup;
promise_setup(async () => {
popup = window.open();
add_completion_callback(() => popup.close());
const iframe = popup.document.createElement("iframe");
const loaded = navigateIframe(iframe, "{{hosts[][www]}}", "?1");
popup.document.body.append(iframe);
await loaded;
});
// The popup's initial about:blank document has this page's origin, which is potentially
// trustworthy, so the frame is in a secure context and its origin-keying request is honored.
testGetter(() => popup.frames[0], true, "frame in about:blank popup");
</script>