Update web-platform-tests to revision 4b25d322ac6ed466f992669e5408b15d37d56436

This commit is contained in:
Ms2ger
2015-10-21 16:41:59 +02:00
parent 6a4ad433a2
commit 92e90e6633
32 changed files with 277 additions and 150 deletions

View File

@@ -13,22 +13,17 @@
*/
/**
* Test that an element created using the Document object doc has the namespace
* that would be expected for the given contentType.
* Test that an element created using the Document object doc has the HTML
* namespace.
*/
function testDoc(doc, contentType) {
// WebKit doesn't support document.contentType, so they don't get this sanity
// check :(
if (doc.contentType !== undefined) {
// Sanity check
assert_equals(doc.contentType, contentType,
"Wrong MIME type -- incorrect server config?");
}
var expectedNamespace = contentType == "text/html" ||
contentType == "application/xhtml+xml"
? "http://www.w3.org/1999/xhtml" : null;
assert_equals(doc.createElement("x").namespaceURI, expectedNamespace);
assert_equals(doc.createElement("x").namespaceURI, "http://www.w3.org/1999/xhtml");
}
// First test various objects we create in JS