mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Fix 096.html and remove 098.html
Deferred scripts should have all ran before DOMContentLoaded is fired. The removed script was a duplicate.
This commit is contained in:
parent
91717ab17c
commit
4c38bec7d9
5 changed files with 18 additions and 45 deletions
|
@ -45843,7 +45843,9 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"local_changes": {
|
"local_changes": {
|
||||||
"deleted": [],
|
"deleted": [
|
||||||
|
"old-tests/submission/Opera/script_scheduling/098.html"
|
||||||
|
],
|
||||||
"deleted_reftests": {},
|
"deleted_reftests": {},
|
||||||
"items": {
|
"items": {
|
||||||
"testharness": {
|
"testharness": {
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[096.html]
|
|
||||||
type: testharness
|
|
||||||
[ scheduler: defer script added from document.write relative to DOMContentLoaded]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[098.html]
|
|
||||||
type: testharness
|
|
||||||
[ scheduler: defer script added from document.write]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -9,16 +9,22 @@
|
||||||
|
|
||||||
<div id="log">FAILED (This TC requires JavaScript enabled)</div>
|
<div id="log">FAILED (This TC requires JavaScript enabled)</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
log("inline script #1");
|
log("inline script #1");
|
||||||
document.write("<script defer src='scripts/include-1.js'><\/script>")
|
document.write("<script defer src='scripts/include-1.js'><\/script>")
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
log("inline script #2");
|
log("inline script #2");
|
||||||
var t = async_test();
|
var t = async_test();
|
||||||
|
|
||||||
addEventListener("DOMContentLoaded", t.step_func(function() {assert_array_equals(eventOrder, ["inline script #1", "inline script #2"])}), false);
|
addEventListener("DOMContentLoaded", t.step_func(function() {
|
||||||
|
assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "external script #1"]);
|
||||||
|
log("inline script #3");
|
||||||
|
}), false);
|
||||||
|
|
||||||
onload = t.step_func(function() {assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "external script #1"]); t.done();});
|
onload = t.step_func(function() {
|
||||||
</script>
|
assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "external script #1", "inline script #3"]);
|
||||||
|
t.done();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body></html>
|
</body></html>
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html><head>
|
|
||||||
<title> scheduler: defer script added from document.write</title>
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="testlib/testlib.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div id="log">FAILED (This TC requires JavaScript enabled)</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
log("inline script #1");
|
|
||||||
document.write("<script defer src='scripts/include-1.js'><\/script>")
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
log("inline script #2");
|
|
||||||
var t = async_test();
|
|
||||||
|
|
||||||
addEventListener("DOMContentLoaded", t.step_func(function() {assert_array_equals(eventOrder, ["inline script #1", "inline script #2"])}), false);
|
|
||||||
|
|
||||||
onload = t.step_func(function() {assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "external script #1"]); t.done();});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Add table
Add a link
Reference in a new issue