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