<!DOCTYPE html>
<html>
<head>
<script src="resources/link-load-utilities.js"></script>
<script>
function passed()
{
testPassed("Fired Error event.");
shouldComputedColorOfElementByIdBeEqualToRGBStringAndTestFinished("test", "rgb(0, 0, 255)" /* blue */); // i.e. stylesheet.css successfully loaded
}
</script>
<link rel="stylesheet" href="resources/stylesheet-with-existent-and-non-existent-import.css" onload="testFailedAndNotifyDone('Fired Load event. Should have fired Error event.')" onerror="passed()">
</head>
<body>
<p>This tests that an Error event is fired at an HTML Link element when its style sheet fails to load an @import'ed style sheet (regardless of whether it successfully loaded another @import'ed style sheet). This test PASSED if there are only PASS messages below. Otherwise, it FAILED.</p>
<h1 id="test"><!-- Test element --></h1>
<pre id="console"></pre>
</body>
</html>