blob: 9db2693518e02c8cf89c1346efbeb9cf836ab741 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
#test {
background-color: red;
height: 128px;
width: 128px;
}
</style>
<meta http-equiv="Content-Security-Policy" content="style-src *">
<script>
if (window.internals && window.internals.settings)
internals.settings.setAllowContentSecurityPolicySourceStarToMatchAnyProtocol(true);
</script>
<link rel="stylesheet" href="data:text/css, #test { background-color: green !important; }">
</head>
<body>
<p>This tests that loading a stylesheet with a data URL is allowed when the page has Content Security Policy &quot;style-src *&quot; and the WebKit setting AllowContentSecurityPolicySourceStarToMatchAnyProtocol is enabled. This test PASSED if you see a green square below. Otherwise, it FAILED.</p>
<div id="test"></div>
</body>
</html>