blob: c40e4319b6d01682064847b561a5f791b5971383 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="resources/link-load-utilities.js"></script>
<script>
function passed()
{
testPassed("Fired Error event.");
shouldComputedColorOfElementBeEqualToRGBString(document.getElementById("test"), "rgb(0, 0, 255)" /* blue */); // i.e. stylesheet.css successfully loaded
testFinished();
}
</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>