17 lines
706 B
HTML
17 lines
706 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../HTMLLinkElement/resources/link-load-utilities.js"></script>
|
|
</head>
|
|
<body>
|
|
<p>This tests that an Error event is fired at a programmatically inserted HTML Style element whose @import style sheet failed to load. This test PASSED if you see the word PASS below. Otherwise, it FAILED.</p>
|
|
<pre id="console"></pre>
|
|
<script>
|
|
var style = createStyleElementWithString('@import "resources/non-existent-stylesheet.css";');
|
|
style.onload = function () { testFailedAndNotifyDone('Fired Load event. Should have fired Error event.') };
|
|
style.onerror = function () { testPassedAndNotifyDone('Fired Error event.') };
|
|
document.head.appendChild(style);
|
|
</script>
|
|
</body>
|
|
</html>
|