mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fire load event for external stylesheets
Do not load stylesheets with the wrong Content-Type Fixes #11912, #11910
This commit is contained in:
parent
7a7bdf51ad
commit
aed761509b
4 changed files with 19 additions and 13 deletions
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue