blob: 2d29f7a52d5b5038ad2d1abe3425f2435c96120e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../HTMLLinkElement/resources/link-load-utilities.js"></script>
<script>
var expectedLoadEventTargets = ["style", "body"];
function didReceiveLoadEvent(elementName)
{
var expectedTarget = expectedLoadEventTargets.shift();
if (expectedTarget === elementName)
testPassedAndNotifyDone("Fired Load event at " + elementName + ".");
else {
// We don't call testFailedAndNotifyDone() or testFinished() because we want to log additional Load events as it
// may help towards debugging this test case.
testFailed("Fired Load event at " + elementName + ", but should have fired it at " + expectedTarget + ".");
}
}
</script>
<style onload="didReceiveLoadEvent('style')"></style>
</head>
<body onload="didReceiveLoadEvent('body')">
<p>This tests that a Load event for an HTML Style element comes before the Load event for the window. This test PASSED if you see the word PASS below. Otherwise, it FAILED.</p>
<pre id="console"></pre>
</body>
</html>