call-functionCalledByOpenee.html |
|
96 |
common.js |
|
3207 |
coop-coep.py |
<!doctype html>
<meta charset=utf-8>
<script src="/common/get-host-info.sub.js"></script>
<script src="/html/cross-origin-opener-policy/resources/fully-loaded.js"></script>
<body>
<script>
const params = %s;
const navHistory = params.navHistory;
const avoidBackAndForth = params.avoidBackAndForth;
const navigate = params.navigate;
if (navHistory !== null) {
fullyLoaded().then(() => {
history.go(Number(navHistory));
});
} else if (navigate !== null && (history.length === 1 || !avoidBackAndForth)) {
fullyLoaded().then(() => {
self.location = navigate;
});
} else {
let openerDOMAccessAllowed = false;
try {
openerDOMAccessAllowed = !!self.opener.document.URL;
} catch(ex) {
}
// Handle the response from the frame, closing the popup once the
// test completes.
addEventListener("message", event => {
if (event.data == "close") {
close();
}
});
iframe = document.createElement("iframe");
iframe.onload = () => {
const payload = { name: self.name, opener: !!self.opener, openerDOMAccess: openerDOMAccessAllowed };
iframe.contentWindow.postMessage(payload, "*");
};
const channelName = params.channel;
const responseToken = params.responseToken;
const iframeToken = params.iframeToken;
iframe.src = `${get_host_info().HTTPS_ORIGIN}/html/cross-origin-opener-policy/resources/postback.html` +
`?channel=${encodeURIComponent(channelName)}` +
`&responseToken=${responseToken}` +
`&iframeToken=${iframeToken}`;
document.body.appendChild(iframe);
}
</script>
</body>
|
3093 |
coop-same-origin-repeated.asis |
|
845 |
csp-sandbox.py |
<!doctype html>
<meta charset=utf-8>
<script src="/common/get-host-info.sub.js"></script>
<script src="/html/cross-origin-opener-policy/resources/fully-loaded.js"></script>
<script>
const params = new URL(location).searchParams;
params.delete("sandbox");
const navigate = params.get("navigate");
if (navigate) {
fullyLoaded().then(() => {
self.location = navigate;
});
} else {
window.open(`/html/cross-origin-opener-policy/resources/coop-coep.py?${params}`);
}
</script>
|
1016 |
fully-loaded.js |
|
366 |
iframe-test.js |
|
9064 |
noopener-helper.js |
|
5994 |
popup-test.js |
|
3824 |
postback.html |
|
1487 |
|
|
86 |
redirect.py |
|
198 |
resource-cleanup.html |
Redirect destination for non-HTML documents to close themselves |
352 |
resource-popup.html |
|
653 |
universal-worker.js |
|
83 |