Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d

This commit is contained in:
Ms2ger 2016-11-14 11:07:09 +01:00
parent 65dd6d4340
commit ccdb0a3458
1428 changed files with 118036 additions and 9786 deletions

View file

@ -1,4 +1,2 @@
@sideshowbarker
@ChrisParis
@deniak
@jdm

View file

@ -119,12 +119,14 @@ var tests = [
["<html> in a different namespace shouldn't be special",
document.createElementNS("http://fake-namespace", "html"), "<body><p>",
document.createElement("div"), "<body><p>"],
["SVG namespace shouldn't be special",
document.createElementNS("http://www.w3.org/2000/svg", "div"), "<body><p>",
document.createElement("div"), "<body><p>"],
["null should be stringified", document.createElement("span"), null, document.createElement("span"), "null"],
["undefined should be stringified", document.createElement("span"), undefined, document.createElement("span"), "undefined"]/*,
// FIXME: Spec doesn't say what to do about non-Elements!
["Text nodes?",
document.createTextNode("?"), "<span>",
document.createTextNode("?"), "<span>"]*/
["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>"]
];
generate_tests(testEquivalence, tests);

View file

@ -1,126 +0,0 @@
<!DOCTYPE html>
<title>innerHTML in HTML</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="http://html5.org/specs/dom-parsing.html#innerhtml">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
var voidElements = [
"area", "base", "basefont", "bgsound", "br", "col", "command", "embed",
"frame", "hr", "img", "input", "keygen", "link", "meta", "param", "source",
"track", "wbr"
];
var tests = [
[
function() {
var el = document.createElement("div");
el.appendChild(document.createElement("xmp"))
.appendChild(document.createElement("span"))
.appendChild(document.createTextNode("<"));
return el;
},
"<xmp><span>&lt;<\/span><\/xmp>"
],
[
function() {
var el = document.createElement("xmp");
el.appendChild(document.createElement("span"))
.appendChild(document.createTextNode("<"));
return el;
},
"<span>&lt;<\/span>"
],
[
function() {
var el = document.createElement("xmp");
el.appendChild(document.createTextNode("<"));
return el;
},
"<"
],
[
function() {
var el = document.createElement("div");
el.appendChild(document.createElement("br"));
return el;
},
"<br>"
],
[
function() {
var el = document.createElement("div");
el.appendChild(document.createElement("input"))
.appendChild(document.createElement("span"));
return el;
},
"<input>"
],
[
function() {
var el = document.createElement("img");
el.appendChild(document.createElement("div"))
.appendChild(document.createElement("span"));
return el.firstChild;
},
"<span><\/span>"
],
[
function() {
var el = document.createElement("div");
el.appendChild(document.createElement("style"))
.appendChild(document.createElement("span"));
return el;
},
"<style><span><\/span><\/style>"
],
[
function() {
var el = document.createElement("div");
el.appendChild(document.createElement("style"))
.appendChild(document.createTextNode("<"));
return el;
},
"<style><<\/style>"
],
[
function() {
var el = document.createElement("div");
el.appendChild(document.createElement("style"))
.appendChild(document.createElement("span"))
.appendChild(document.createTextNode("<"));
return el;
},
"<style><span>&lt;<\/span><\/style>"
]
];
voidElements.forEach(function(tag) {
tests.push([
function() {
var el = document.createElement(tag);
el.appendChild(document.createElement("span"));
return el;
},
"<span><\/span>"
]);
});
["pre", "textarea", "listing"].forEach(function(tag) {
tests.push([
function() {
var el = document.createElement("div");
el.appendChild(document.createElement(tag))
.appendChild(document.createTextNode("\nA"));
return el;
},
"<" + tag + ">\n\nA<\/" + tag + ">"
]);
});
test(function() {
tests.forEach(function(t) {
var el = t[0](), expected = t[1];
test(function() {
assert_equals(el.innerHTML, expected);
}, "Expected innerHTML: " + format_value(expected) + " for " + el.localName + ".");
});
});
</script>