Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="img-src 'none'">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script>
SimpleTest.waitForExplicitFinish();
document.addEventListener("securitypolicyviolation", (e) => {
SimpleTest.is(e.blockedURI, "http://mochi.test:8888/foo/bar.jpg", "blockedURI");
SimpleTest.is(e.violatedDirective, "img-src", "violatedDirective")
SimpleTest.is(e.originalPolicy, "img-src 'none'", "originalPolicy");
SimpleTest.finish();
});
</script>