mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Make link elements fire a load event.
This commit is contained in:
parent
32a89c9455
commit
f3cdba6b8b
8 changed files with 78 additions and 10 deletions
|
@ -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",
|
||||
|
|
3
tests/wpt/mozilla/tests/mozilla/resources/style.css
Normal file
3
tests/wpt/mozilla/tests/mozilla/resources/style.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background-color: white;
|
||||
}
|
20
tests/wpt/mozilla/tests/mozilla/stylesheet_load.html
Normal file
20
tests/wpt/mozilla/tests/mozilla/stylesheet_load.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue