Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
window.addEventListener('securitypolicyviolation', function(e) {
<html style="background-color: blue;">
<!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.-->
<meta http-equiv="Content-Security-Policy" content="style-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self'">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src='../support/logTest.sub.js?logs=["PASS"]'></script>
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
<p>Even though this page has a CSP policy the blocks inline style, the style attribute on the HTML element still takes effect because it preceeds the meta element.
log( > 0 ? 'PASS' : 'FAIL');
<div id="log"></div>