Make link elements fire a load event.

This commit is contained in:
Josh Matthews 2015-04-22 20:12:24 -04:00
parent 32a89c9455
commit f3cdba6b8b
8 changed files with 78 additions and 10 deletions

View file

@ -521,6 +521,12 @@
"url": "/_mozilla/mozilla/storage.html"
}
],
"mozilla/stylesheet_load.html": [
{
"path": "mozilla/stylesheet_load.html",
"url": "/_mozilla/mozilla/stylesheet_load.html"
}
],
"mozilla/textcontent.html": [
{
"path": "mozilla/textcontent.html",

View file

@ -0,0 +1,3 @@
body {
background-color: white;
}

View file

@ -0,0 +1,20 @@
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link href="resources/style.css" rel="stylesheet" id="style_test"></link>
<script>
var saw_link_onload = false;
var t = async_test();
document.getElementById('style_test').onload = t.step_func(function() {
saw_link_onload = true;
});
window.addEventListener('load', function() {
t.step_func(function() {
assert_true(saw_link_onload);
});
t.done();
}, false);
</script>
</head>
</html>