Add missing actions in CreateContextualFragment method

This commit is contained in:
Guillaume Gomez 2016-11-14 21:11:23 +01:00
parent 00f229d615
commit 861bcb2b79
13 changed files with 14 additions and 22 deletions

View file

@ -1,8 +1,5 @@
[createContextualFragment.html]
type: testharness
[<script>s should be run when appended to the document (but not before)]
expected: FAIL
[Namespace generally shouldn't matter]
expected: FAIL

View file

@ -1,4 +1,3 @@
[cors-redirect-worker.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13441

View file

@ -1,4 +1,3 @@
[cors-redirect.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13441

View file

@ -1,4 +1,3 @@
[redirect-count-worker.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13441

View file

@ -1,4 +1,3 @@
[redirect-count.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13441

View file

@ -1,4 +1,3 @@
[redirect-origin-worker.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13441

View file

@ -1,4 +1,3 @@
[redirect-origin.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13441

View file

@ -1,4 +1,3 @@
[request-cache-default-conditional.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13441

View file

@ -1,5 +0,0 @@
[117.html]
type: testharness
[scheduler: inline script created with createContextualFragment]
expected: FAIL

View file

@ -1,5 +0,0 @@
[118.html]
type: testharness
[scheduler: external script created with createContextualFragment]
expected: FAIL

View file

@ -109,6 +109,10 @@ function testEquivalence(element1, fragment1, element2, fragment2) {
}
}
var doc_fragment = document.createDocumentFragment();
var comment = document.createComment("~o~");
doc_fragment.appendChild(comment);
var tests = [
["<html> and <body> must work the same, 1", document.documentElement, "<span>Hello world</span>", document.body, "<span>Hello world</span>"],
["<html> and <body> must work the same, 2", document.documentElement, "<body><p>Hello world", document.body, "<body><p>Hello world"],
@ -126,6 +130,9 @@ var tests = [
["undefined should be stringified", document.createElement("span"), undefined, document.createElement("span"), "undefined"],
["Text nodes shouldn't be special",
document.createTextNode("?"), "<body><p>",
document.createElement("div"), "<body><p>"],
["Non-Element parent should not be special",
comment, "<body><p>",
document.createElement("div"), "<body><p>"]
];