Update web-platform-tests to revision 0159b3ec9ba5355a3340621226e02ae026effd7f

This commit is contained in:
Ms2ger 2015-09-22 16:41:09 +02:00
parent d588ce8d85
commit 43a50e298a
37 changed files with 1341 additions and 62 deletions

View file

@ -103,13 +103,20 @@ test(function() {
var doc = document.implementation.createDocument(namespace, qualifiedName, doctype)
assert_equals(doc.compatMode, "CSS1Compat")
assert_equals(doc.characterSet, "UTF-8")
assert_equals(doc.inputEncoding, "UTF-8")
assert_equals(doc.contentType, "application/xml")
assert_equals(doc.URL, "about:blank")
assert_equals(doc.documentURI, "about:blank")
assert_equals(doc.createElement("DIV").localName, "DIV");
}, "createDocument test " + i + ": metadata for " +
[namespace, qualifiedName, doctype].map(function(el) { return format_value(el) }))
test(function() {
var doc = document.implementation.createDocument(namespace, qualifiedName, doctype)
assert_equals(doc.characterSet, "UTF-8", "characterSet");
assert_equals(doc.charset, "UTF-8", "charset");
assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding");
}, "createDocument test " + i + ": characterSet aliases for " +
[namespace, qualifiedName, doctype].map(function(el) { return format_value(el) }))
}
})
})

View file

@ -69,11 +69,17 @@ test(function() {
assert_equals(doc.documentURI, "about:blank");
assert_equals(doc.compatMode, "CSS1Compat");
assert_equals(doc.characterSet, "UTF-8");
assert_equals(doc.inputEncoding, "UTF-8");
assert_equals(doc.contentType, "text/html");
assert_equals(doc.createElement("DIV").localName, "div");
}, "createHTMLDocument(): metadata")
test(function() {
var doc = document.implementation.createHTMLDocument("test");
assert_equals(doc.characterSet, "UTF-8", "characterSet");
assert_equals(doc.charset, "UTF-8", "charset");
assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding");
}, "createHTMLDocument(): characterSet aliases")
test(function() {
var doc = document.implementation.createHTMLDocument("test");
var a = doc.createElement("a");

View file

@ -358,6 +358,8 @@ Object.keys(encodingMap).forEach(function(name) {
" has label " + format_value(label) + " (characterSet)");
var t2 = async_test("Name " + format_value(name) +
" has label " + format_value(label) + " (inputEncoding)");
var t3 = async_test("Name " + format_value(name) +
" has label " + format_value(label) + " (charset)");
/*
iframe.src = "data:text/html,<!doctype html>" +
'<meta charset="' + label + '">';
@ -370,9 +372,13 @@ Object.keys(encodingMap).forEach(function(name) {
t2.step(function() {
assert_equals(iframe.contentDocument.inputEncoding, expected_case(name));
});
t3.step(function() {
assert_equals(iframe.contentDocument.charset, expected_case(name));
});
document.body.removeChild(iframe);
t.done();
t2.done();
t3.done();
};
document.body.appendChild(iframe);
});

View file

@ -32,11 +32,17 @@ test(function() {
assert_equals(doc.documentURI, "about:blank");
assert_equals(doc.compatMode, "CSS1Compat");
assert_equals(doc.characterSet, "UTF-8");
assert_equals(doc.inputEncoding, "UTF-8");
assert_equals(doc.contentType, "application/xml");
assert_equals(doc.createElement("DIV").localName, "DIV");
}, "new Document(): metadata")
test(function() {
var doc = new Document();
assert_equals(doc.characterSet, "UTF-8", "characterSet");
assert_equals(doc.charset, "UTF-8", "charset");
assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding");
}, "new Document(): characterSet aliases")
test(function() {
var doc = new Document();
var a = doc.createElement("a");

View file

@ -136,7 +136,6 @@ var expected = {
URL: String(location),
compatMode: "CSS1Compat",
characterSet: "UTF-8",
inputEncoding: "UTF-8",
contentType: "text/html",
doctype: doctype,
//documentElement: ,
@ -153,7 +152,6 @@ var expected = {
URL: "about:blank",
compatMode: "CSS1Compat",
characterSet: "UTF-8",
inputEncoding: "UTF-8",
contentType: "text/html",
//doctype: ,
//documentElement: ,
@ -211,7 +209,6 @@ var expected = {
URL: "about:blank",
compatMode: "CSS1Compat",
characterSet: "UTF-8",
inputEncoding: "UTF-8",
contentType: "application/xml",
//doctype: ,
//documentElement: ,
@ -640,6 +637,8 @@ for (var node in expected) {
expected[node].nextSibling = expected[node].nodeValue =
expected[node].textContent = null;
expected[node].documentURI = expected[node].URL;
expected[node].charset = expected[node].inputEncoding =
expected[node].characterSet;
break;
case Node.DOCUMENT_TYPE_NODE: