blob: 232cdad4a09c28df845c6ccb22d6ac7f405fc445 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="resources/link-load-utilities.js"></script>
</head>
<body>
<p>This tests that a Load event is fired at a programmatically inserted HTML Link 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 link = createLinkElementWithStylesheet("resources/stylesheet.css");
link.onload = function () { testPassedAndNotifyDone('Fired Load event.') };
link.onerror = function () { testFailedAndNotifyDone('Fired Error event. Should have fired Load event.') };
document.head.appendChild(link);
</script>
</body>
</html>