mirror of
https://github.com/servo/servo
synced 2026-04-30 19:37:43 +02:00
Update web-platform-tests to revision 4b25d322ac6ed466f992669e5408b15d37d56436
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user