mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 13:37:10 +09:00

There is an open spec issue for this, and I'm certainly not sure what the client should be here, but using the source snapshot from the global from reading the spec issue seems like a reasonable enough client for now. This can be reproduced by performing a javascript URL navigation with any CSP policy set. For simplicity, simply edit an existing testcase to add such a policy. Fixes: #4853
16 lines
591 B
HTML
16 lines
591 B
HTML
<!DOCTYPE html>
|
|
<head>
|
|
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval'; frame-src javascript:;">
|
|
</head>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
asyncTest((done) => {
|
|
const iframe = document.querySelector("iframe");
|
|
iframe.addEventListener("load", () => {
|
|
println(iframe.contentWindow.document.body.innerText);
|
|
done();
|
|
});
|
|
iframe.src = "javascript:'<body>Hello from iframe navigated using javascript url</body>'";
|
|
});
|
|
</script>
|
|
<iframe src="about:blank"></iframe>
|