blob: bff5678f52eaf0eddc67ecb3cff8baf475a013f5 [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(255, 255, 0)" /* yellow */);
testFinished();
}
</script>
<link rel="stylesheet" href="resources/stylesheet-with-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. 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>