mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d
This commit is contained in:
parent
65dd6d4340
commit
ccdb0a3458
1428 changed files with 118036 additions and 9786 deletions
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>data URL and scripts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
setup({allow_uncaught_exception:true})
|
||||
async_test(t => {
|
||||
var counter = 1
|
||||
window.onerror = t.step_func((message, x, xx, xxx, e) => {
|
||||
assert_not_equals(message, "Script error.") // Cannot be "muted" as data URLs are same-origin
|
||||
assert_equals(typeof e, "number")
|
||||
assert_equals(e, counter)
|
||||
if (counter == 3) {
|
||||
t.done()
|
||||
}
|
||||
counter++
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script src="data:,throw 1"></script>
|
||||
<script src="data:,throw 2" crossorigin></script>
|
||||
<script src="data:,throw 3" crossorigin=use-credentials></script>
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test that the insertion point is defined in the error event of a parser-inserted script that actually started a fetch (but just had it fail).</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script>
|
||||
var t = async_test("");
|
||||
var writeDone = t.step_func_done(function(text) {
|
||||
assert_equals(text, "Some text");
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/script-onerror-insertion-point-1-helper.html"></iframe>
|
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test that the insertion point is not defined in the error event of a
|
||||
parser-inserted script that has an unparseable URL</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script>
|
||||
var t = async_test("");
|
||||
var writeDone = t.step_func_done(function(text) {
|
||||
assert_equals(text, "text");
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/script-onerror-insertion-point-2-helper.html"></iframe>
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test that the insertion point is defined in the load event of a parser-inserted script.</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script>
|
||||
var t = async_test("");
|
||||
var writeDone = t.step_func_done(function(text) {
|
||||
assert_equals(text, "Some text");
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/script-onload-insertion-point-helper.html"></iframe>
|
|
@ -0,0 +1,2 @@
|
|||
Some <script src="nosuchscripthere.js"
|
||||
onerror="document.write('text'); parent.writeDone(document.documentElement.textContent)"></script>
|
|
@ -0,0 +1,2 @@
|
|||
Some <script src="http://this is not parseable"
|
||||
onerror="document.write('text'); parent.writeDone(document.documentElement.textContent)"></script>
|
|
@ -0,0 +1,2 @@
|
|||
Some <script src="script-onload-insertion-point-helper.js"
|
||||
onload="document.write('xt'); parent.writeDone(document.documentElement.textContent)"></script>
|
|
@ -0,0 +1 @@
|
|||
document.write("te");
|
|
@ -14,7 +14,6 @@
|
|||
<div id="log"></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
test(function() {
|
||||
var doc1 = newHTMLDocument();
|
||||
var template = doc1.createElement('template');
|
||||
|
@ -35,7 +34,6 @@ test(function() {
|
|||
}, 'Changing of template element\'s node document. ' +
|
||||
'Test that ownerDocument of an empty template and its content changes');
|
||||
|
||||
|
||||
test(function() {
|
||||
var doc1 = newHTMLDocument();
|
||||
doc1.body.innerHTML = '<template id="tmpl"><div>Div content</div> And some more text</template>';
|
||||
|
@ -63,7 +61,6 @@ test(function() {
|
|||
}, 'Changing of template element\'s node document. ' +
|
||||
'Test that ownerDocument of a not empty template and its content changes');
|
||||
|
||||
|
||||
test(function() {
|
||||
var doc1 = newHTMLDocument();
|
||||
doc1.body.innerHTML = ''
|
||||
|
@ -109,7 +106,6 @@ test(function() {
|
|||
}, 'Changing of template element\'s node document. ' +
|
||||
'Test that ownerDocument of nested template and its content changes');
|
||||
|
||||
|
||||
testInIFrame('../resources/template-contents.html', function(context) {
|
||||
var doc1 = context.iframes[0].contentDocument;
|
||||
|
||||
|
@ -131,7 +127,6 @@ testInIFrame('../resources/template-contents.html', function(context) {
|
|||
}, 'Changing of template element\'s node document. ' +
|
||||
'Test document loaded from a file');
|
||||
|
||||
|
||||
testInIFrame('../resources/template-contents.html', function(context) {
|
||||
var doc1 = context.iframes[0].contentDocument;
|
||||
|
||||
|
@ -161,7 +156,6 @@ testInIFrame('../resources/template-contents.html', function(context) {
|
|||
}, 'Changing of template element\'s node document. ' +
|
||||
'Adobt template element into a document that has a browsing context');
|
||||
|
||||
|
||||
testInIFrame('../resources/template-contents.html', function(context) {
|
||||
var doc1 = context.iframes[0].contentDocument;
|
||||
|
||||
|
@ -173,7 +167,6 @@ testInIFrame('../resources/template-contents.html', function(context) {
|
|||
|
||||
doc2.body.appendChild(template);
|
||||
|
||||
|
||||
assert_not_equals(template.ownerDocument, doc1,
|
||||
'Template node owner document should be changed');
|
||||
assert_not_equals(template.content.ownerDocument, templateContentOwner,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue