Fire load event for external stylesheets

Do not load stylesheets with the wrong Content-Type

Fixes #11912, #11910
This commit is contained in:
Mike MacDonald (crazymykl) 2016-06-28 21:07:39 -04:00 committed by Mike MacDonald
parent 7a7bdf51ad
commit aed761509b
No known key found for this signature in database
GPG key ID: 88460A63323A15DD
4 changed files with 19 additions and 13 deletions

View file

@ -10,12 +10,9 @@ var t = async_test("Check if the stylesheet's load event blocks the document loa
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);
window.addEventListener('load', t.step_func_done(function() {
assert_true(saw_link_onload);
}));
</script>
</head>
</html>

View file

@ -40,6 +40,7 @@ tText.step(function() {
assert_true(true, "Got error event for 404 error.")
tText.done()
})
elt.onload = tText.unreached_func("load event should not be fired");
elt.rel = "stylesheet";
elt.href = "../../../../../common/css-red.txt";
document.getElementsByTagName("head")[0].appendChild(elt);