Index: third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/DOMImplementation-createDocument.html |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/DOMImplementation-createDocument.html b/third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/DOMImplementation-createDocument.html |
index f4b6358712661b3165df91e091100bbf8e1bb6cc..d64bf3640d7e2b76e27163e0593fd61011e29e92 100644 |
--- a/third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/DOMImplementation-createDocument.html |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/DOMImplementation-createDocument.html |
@@ -15,17 +15,6 @@ var htmlNamespace = "http://www.w3.org/1999/xhtml" |
var svgNamespace = "http://www.w3.org/2000/svg" |
var mathMLNamespace = "http://www.w3.org/1998/Math/MathML" |
-// Make DocumentTypes distinct |
-function my_format_value(val) { |
- if (val instanceof DocumentType) { |
- return "DocumentType node <!DOCTYPE " + val.name |
- + (val.publicId ? " " + val.publicId : "") |
- + (val.systemId ? " " + val.systemId : "") |
- + ">"; |
- } |
- return format_value(val); |
-} |
- |
test(function() { |
var tests = createElementNS_tests.map(function(t) { |
return [t[0], t[1], null, t[2]] |
@@ -55,17 +44,17 @@ test(function() { |
[null, null, document.implementation.createDocumentType("foo", "", ""), null], |
[null, null, document.doctype, null], // This causes a horrible WebKit bug (now fixed in trunk). |
[null, null, function() { |
- var foo = document.implementation.createDocumentType("bar", "", ""); |
+ var foo = document.implementation.createDocumentType("foo", "", ""); |
document.implementation.createDocument(null, null, foo); |
return foo; |
}(), null], // DOCTYPE already associated with a document. |
[null, null, function() { |
var bar = document.implementation.createDocument(null, null, null); |
- return bar.implementation.createDocumentType("baz", "", ""); |
+ return bar.implementation.createDocumentType("bar", "", ""); |
}(), null], // DOCTYPE created by a different implementation. |
[null, null, function() { |
var bar = document.implementation.createDocument(null, null, null); |
- var magic = bar.implementation.createDocumentType("quz", "", ""); |
+ var magic = bar.implementation.createDocumentType("bar", "", ""); |
bar.implementation.createDocument(null, null, magic); |
return magic; |
}(), null], // DOCTYPE created by a different implementation and already associated with a document. |
@@ -127,7 +116,7 @@ test(function() { |
} |
assert_equals(doc.childNodes.length, !omitRootElement + !!doctype) |
} |
- }, "createDocument test: " + t.map(my_format_value)) |
+ }, "createDocument test " + i + ": " + t.map(function(el) { return format_value(el) })) |
if (expected === null) { |
test(function() { |
@@ -141,7 +130,7 @@ test(function() { |
assert_equals(doc.documentURI, "about:blank") |
assert_equals(doc.createElement("DIV").localName, "DIV"); |
}, "createDocument test " + i + ": metadata for " + |
- [namespace, qualifiedName, doctype].map(my_format_value)) |
+ [namespace, qualifiedName, doctype].map(function(el) { return format_value(el) })) |
test(function() { |
var doc = document.implementation.createDocument(namespace, qualifiedName, doctype) |
@@ -149,7 +138,7 @@ test(function() { |
assert_equals(doc.charset, "UTF-8", "charset"); |
assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding"); |
}, "createDocument test " + i + ": characterSet aliases for " + |
- [namespace, qualifiedName, doctype].map(my_format_value)) |
+ [namespace, qualifiedName, doctype].map(function(el) { return format_value(el) })) |
} |
}) |
}) |