Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!doctype html>
<meta http-equiv="Content-Security-Policy" content="style-src 'none';">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
function styleError(t) {
function styleLoad(t) {
t.unreached_func("Should not be able to load style");
var t1 = async_test("Test error event fires on stylesheet link");
var t2 = async_test("Test error event fires on inline style")
<div id='log'></div>
<div id="content">Lorem ipsum</div>
<link onerror="styleError(t1)" onload="styleLoad(t1)" href="/content-security-policy/style-src/resources/style-src.css" rel=stylesheet type=text/css>
<style onerror="styleError(t2)" onload="styleLoad(t2)">
#content { margin-left: 2px; }