mirror of
https://github.com/servo/servo.git
synced 2025-09-03 19:48:21 +01:00
Update web-platform-tests to revision 5e3ea8f49fee68c327388bfd1dd1375a8ce12a0e.
This commit is contained in:
parent
12195a5c4a
commit
bfb96b9448
1166 changed files with 35123 additions and 900 deletions
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title> scheduler: appending code to initially non-empty SCRIPT tag in DOM after setting innerText/innerHTML</title>
|
||||
<title> scheduler: appending code to initially non-empty SCRIPT tag in DOM after setting textContent/innerHTML</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="testlib/testlib.js"></script>
|
||||
|
@ -14,7 +14,7 @@
|
|||
var script=document.getElementsByTagName('script')[3];
|
||||
script.innerHTML='';
|
||||
script.appendChild( document.createTextNode('log("injected script code 1");') );
|
||||
script.innerText='';
|
||||
script.textContent='';
|
||||
script.appendChild( document.createTextNode('log("injected script code 2");') );
|
||||
log('end script #1');
|
||||
</script>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
var doc = frames[0].document;
|
||||
doc.open('text/html');
|
||||
doc.write('<script>top.log("IFRAME script");top.document.addEventListener("foo", function(e){ console.log(e+ " "+top+" "+self.location.href); top.log("event: "+e.type); }, false)<\/script>');
|
||||
doc.write('<script>top.log("IFRAME script");top.document.addEventListener("foo", function(e){ top.log("event: "+e.type); }, false)<\/script>');
|
||||
log('end script #1');
|
||||
</script>
|
||||
<script>
|
||||
|
|
|
@ -8,14 +8,16 @@
|
|||
<body>
|
||||
|
||||
<div id="log">FAILED (This TC requires JavaScript enabled)</div>
|
||||
<iframe id="myFrame"></iframe>
|
||||
|
||||
<script>
|
||||
var t = async_test(undefined, {timeout:3500});
|
||||
onload = t.step_func(function() {
|
||||
document.open();
|
||||
document.write("<title> scheduler: parser-created defer script after document load</title><script src='/resources/testharness.js'><\/script><script src='/resources/testharnessreport.js'><\/script><script src='testlib/testlib.js'><\/script><script>var t=async_test()<\/script><div id=log></div><script defer src='data:text/javascript,t.done();'><\/script>");
|
||||
document.close();
|
||||
setTimeout(t.step_func(function() {assert_unreached()}, 500));
|
||||
var doc = document.getElementById("myFrame").contentDocument;
|
||||
var win = document.getElementById("myFrame").contentWindow;
|
||||
doc.open();
|
||||
doc.write("<title> scheduler: parser-created defer script after document load</title><script src='/resources/testharness.js'><\/script><script src='/resources/testharnessreport.js'><\/script><script src='testlib/testlib.js'><\/script><script>var t=async_test()<\/script><div id=log></div><script defer src='data:text/javascript,parent.t.done();'><\/script>");
|
||||
doc.close();
|
||||
})
|
||||
</script>
|
||||
</body></html>
|
||||
|
|
|
@ -8,20 +8,23 @@
|
|||
<body>
|
||||
|
||||
<div id="log">FAILED (This TC requires JavaScript enabled)</div>
|
||||
<iframe id="myFrame"></iframe>
|
||||
|
||||
<script>
|
||||
var t = async_test();
|
||||
onload = t.step_func(
|
||||
function() {
|
||||
document.open();
|
||||
document.write("<title> scheduler: defer script after initial onload event</title><script src='/resources/testharness.js'><\/script><script src='/resources/testharnessreport.js'><\/script><script src='testlib/testlib.js'><\/script><div id='log'>document.written content</div><script>log('inline script #1'); t = async_test();<\/script><script src='scripts/include-1.js'><\/script><script defer src='scripts/include-2.js'><\/script>");
|
||||
document.close();
|
||||
var doc = document.getElementById("myFrame").contentDocument;
|
||||
var win = document.getElementById("myFrame").contentWindow;
|
||||
doc.open();
|
||||
doc.write("<title> scheduler: defer script after initial onload event</title><script src='/resources/testharness.js'><\/script><script src='/resources/testharnessreport.js'><\/script><script src='testlib/testlib.js'><\/script><div id='log'>document.written content</div><script>log('inline script #1'); t = async_test();<\/script><script src='scripts/include-1.js'><\/script><script defer src='scripts/include-2.js'><\/script>");
|
||||
doc.close();
|
||||
//Note that the *window* object has changed but the *global scope* of the script has not.
|
||||
window.setTimeout(
|
||||
win.setTimeout(
|
||||
function() {
|
||||
window.t.step(
|
||||
function() {
|
||||
window.assert_array_equals(window.eventOrder, ['inline script #1', 'external script #1', 'external script #2']);
|
||||
window.assert_array_equals(win.eventOrder, ['inline script #1', 'external script #1', 'external script #2']);
|
||||
window.t.done();
|
||||
})}, 1000);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue