24 lines
800 B
HTML
24 lines
800 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../HTMLLinkElement/resources/link-load-utilities.js"></script>
|
|
<script>
|
|
function passed()
|
|
{
|
|
testPassed("Error event fired.");
|
|
shouldComputedColorOfElementBeEqualToRGBString(document.getElementById("test"), "rgb(255, 255, 0)" /* yellow */);
|
|
testFinished();
|
|
}
|
|
</script>
|
|
<style onload="testFailedAndNotifyDone('Load event fired. Should have fired Error event.')" onerror="passed()">
|
|
@import "resources/non-existent-stylesheet.css";
|
|
#test { color: yellow; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p>This tests that a Error event is fired at an HTML Style element whose @import style sheet failed to load. 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>
|