Tests/LibWeb: Rebaseline createElement and createElementNS WPT tests

These tests were previously not aligned against the DOM standard.
This commit is contained in:
Shannon Booth 2025-07-09 19:50:15 +12:00 committed by Jelle Raaijmakers
parent ab2e732da9
commit f263a1a6b2
5 changed files with 73 additions and 89 deletions

View File

@ -1,9 +1,9 @@
Harness status: OK
Found 448 tests
Found 430 tests
426 Pass
22 Fail
4 Fail
Pass DOMImplementation.createDocument(namespace, qualifiedName, doctype)
Pass createDocument test: null,null,null,null
Pass createDocument test: metadata for null,null,null
@ -53,9 +53,7 @@ Pass createDocument test: null,"^^",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: null,"fo o",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: null,"-foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: null,".foo",null,"INVALID_CHARACTER_ERR"
Fail createDocument test: null,":foo",null,null
Fail createDocument test: metadata for null,":foo",null
Fail createDocument test: characterSet aliases for null,":foo",null
Pass createDocument test: null,":foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: null,"f:oo",null,"NAMESPACE_ERR"
Pass createDocument test: null,"foo:",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: null,"f:o:o",null,"NAMESPACE_ERR"
@ -74,9 +72,7 @@ Pass createDocument test: null,"null:xml",null,"NAMESPACE_ERR"
Pass createDocument test: "",null,null,null
Pass createDocument test: metadata for "",null,null
Pass createDocument test: characterSet aliases for "",null,null
Fail createDocument test: "",":foo",null,null
Fail createDocument test: metadata for "",":foo",null
Fail createDocument test: characterSet aliases for "",":foo",null
Pass createDocument test: "",":foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "","f:oo",null,"NAMESPACE_ERR"
Pass createDocument test: "","foo:",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: undefined,null,null,null
@ -95,12 +91,10 @@ Pass createDocument test: characterSet aliases for undefined,"f1oo",null
Pass createDocument test: undefined,"foo1",null,null
Pass createDocument test: metadata for undefined,"foo1",null
Pass createDocument test: characterSet aliases for undefined,"foo1",null
Fail createDocument test: undefined,":foo",null,null
Fail createDocument test: metadata for undefined,":foo",null
Fail createDocument test: characterSet aliases for undefined,":foo",null
Pass createDocument test: undefined,":foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: undefined,"f:oo",null,"NAMESPACE_ERR"
Pass createDocument test: undefined,"foo:",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: undefined,"f::oo",null,"NAMESPACE_ERR"
Fail createDocument test: undefined,"f::oo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: undefined,"xml",null,null
Pass createDocument test: metadata for undefined,"xml",null
Pass createDocument test: characterSet aliases for undefined,"xml",null
@ -127,19 +121,15 @@ Pass createDocument test: characterSet aliases for "http://example.com/","f1oo",
Pass createDocument test: "http://example.com/","foo1",null,null
Pass createDocument test: metadata for "http://example.com/","foo1",null
Pass createDocument test: characterSet aliases for "http://example.com/","foo1",null
Fail createDocument test: "http://example.com/",":foo",null,null
Fail createDocument test: metadata for "http://example.com/",":foo",null
Fail createDocument test: characterSet aliases for "http://example.com/",":foo",null
Pass createDocument test: "http://example.com/",":foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://example.com/","f:oo",null,null
Pass createDocument test: metadata for "http://example.com/","f:oo",null
Pass createDocument test: characterSet aliases for "http://example.com/","f:oo",null
Pass createDocument test: "http://example.com/","f:o:o",null,null
Fail createDocument test: "http://example.com/","f:o:o",null,null
Pass createDocument test: metadata for "http://example.com/","f:o:o",null
Pass createDocument test: characterSet aliases for "http://example.com/","f:o:o",null
Pass createDocument test: "http://example.com/","foo:",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://example.com/","f::oo",null,null
Pass createDocument test: metadata for "http://example.com/","f::oo",null
Pass createDocument test: characterSet aliases for "http://example.com/","f::oo",null
Fail createDocument test: "http://example.com/","f::oo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://example.com/","a:0",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://example.com/","0:a",null,null
Pass createDocument test: metadata for "http://example.com/","0:a",null
@ -224,9 +214,7 @@ Pass createDocument test: characterSet aliases for "http://example.com/","XMLNS:
Pass createDocument test: "http://example.com/","xmlfoo:bar",null,null
Pass createDocument test: metadata for "http://example.com/","xmlfoo:bar",null
Pass createDocument test: characterSet aliases for "http://example.com/","xmlfoo:bar",null
Pass createDocument test: "http://example.com/","prefix::local",null,null
Pass createDocument test: metadata for "http://example.com/","prefix::local",null
Pass createDocument test: characterSet aliases for "http://example.com/","prefix::local",null
Fail createDocument test: "http://example.com/","prefix::local",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://example.com/","namespaceURI:{",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://example.com/","namespaceURI:}",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://example.com/","namespaceURI:~",null,"INVALID_CHARACTER_ERR"
@ -264,9 +252,7 @@ Pass createDocument test: characterSet aliases for "/","f1oo",null
Pass createDocument test: "/","foo1",null,null
Pass createDocument test: metadata for "/","foo1",null
Pass createDocument test: characterSet aliases for "/","foo1",null
Fail createDocument test: "/",":foo",null,null
Fail createDocument test: metadata for "/",":foo",null
Fail createDocument test: characterSet aliases for "/",":foo",null
Pass createDocument test: "/",":foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "/","f:oo",null,null
Pass createDocument test: metadata for "/","f:oo",null
Pass createDocument test: characterSet aliases for "/","f:oo",null
@ -293,9 +279,7 @@ Pass createDocument test: characterSet aliases for "http://www.w3.org/XML/1998/n
Pass createDocument test: "http://www.w3.org/XML/1998/namespace","foo1",null,null
Pass createDocument test: metadata for "http://www.w3.org/XML/1998/namespace","foo1",null
Pass createDocument test: characterSet aliases for "http://www.w3.org/XML/1998/namespace","foo1",null
Fail createDocument test: "http://www.w3.org/XML/1998/namespace",":foo",null,null
Fail createDocument test: metadata for "http://www.w3.org/XML/1998/namespace",":foo",null
Fail createDocument test: characterSet aliases for "http://www.w3.org/XML/1998/namespace",":foo",null
Pass createDocument test: "http://www.w3.org/XML/1998/namespace",":foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://www.w3.org/XML/1998/namespace","f:oo",null,null
Pass createDocument test: metadata for "http://www.w3.org/XML/1998/namespace","f:oo",null
Pass createDocument test: characterSet aliases for "http://www.w3.org/XML/1998/namespace","f:oo",null
@ -320,7 +304,7 @@ Pass createDocument test: "http://www.w3.org/2000/xmlns/","foo",null,"NAMESPACE_
Pass createDocument test: "http://www.w3.org/2000/xmlns/","1foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://www.w3.org/2000/xmlns/","f1oo",null,"NAMESPACE_ERR"
Pass createDocument test: "http://www.w3.org/2000/xmlns/","foo1",null,"NAMESPACE_ERR"
Fail createDocument test: "http://www.w3.org/2000/xmlns/",":foo",null,"NAMESPACE_ERR"
Pass createDocument test: "http://www.w3.org/2000/xmlns/",":foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://www.w3.org/2000/xmlns/","f:oo",null,"NAMESPACE_ERR"
Pass createDocument test: "http://www.w3.org/2000/xmlns/","foo:",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "http://www.w3.org/2000/xmlns/","xml",null,"NAMESPACE_ERR"
@ -344,9 +328,7 @@ Pass createDocument test: characterSet aliases for "foo:","f1oo",null
Pass createDocument test: "foo:","foo1",null,null
Pass createDocument test: metadata for "foo:","foo1",null
Pass createDocument test: characterSet aliases for "foo:","foo1",null
Fail createDocument test: "foo:",":foo",null,null
Fail createDocument test: metadata for "foo:",":foo",null
Fail createDocument test: characterSet aliases for "foo:",":foo",null
Pass createDocument test: "foo:",":foo",null,"INVALID_CHARACTER_ERR"
Pass createDocument test: "foo:","f:oo",null,null
Pass createDocument test: metadata for "foo:","f:oo",null
Pass createDocument test: characterSet aliases for "foo:","f:oo",null

View File

@ -2,8 +2,8 @@ Harness status: OK
Found 596 tests
572 Pass
24 Fail
584 Pass
12 Fail
Pass createElementNS test in HTML document: null,null,null
Pass createElementNS test in XML document: null,null,null
Pass createElementNS test in XHTML document: null,null,null
@ -70,9 +70,9 @@ Pass createElementNS test in XHTML document: null,"-foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: null,".foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: null,".foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: null,".foo","INVALID_CHARACTER_ERR"
Fail createElementNS test in HTML document: null,":foo",null
Fail createElementNS test in XML document: null,":foo",null
Fail createElementNS test in XHTML document: null,":foo",null
Pass createElementNS test in HTML document: null,":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: null,":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: null,":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: null,"f:oo","NAMESPACE_ERR"
Pass createElementNS test in XML document: null,"f:oo","NAMESPACE_ERR"
Pass createElementNS test in XHTML document: null,"f:oo","NAMESPACE_ERR"
@ -109,9 +109,9 @@ Pass createElementNS test in XHTML document: null,"null:xml","NAMESPACE_ERR"
Pass createElementNS test in HTML document: "",null,null
Pass createElementNS test in XML document: "",null,null
Pass createElementNS test in XHTML document: "",null,null
Fail createElementNS test in HTML document: "",":foo",null
Fail createElementNS test in XML document: "",":foo",null
Fail createElementNS test in XHTML document: "",":foo",null
Pass createElementNS test in HTML document: "",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: "",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: "",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: "","f:oo","NAMESPACE_ERR"
Pass createElementNS test in XML document: "","f:oo","NAMESPACE_ERR"
Pass createElementNS test in XHTML document: "","f:oo","NAMESPACE_ERR"
@ -136,18 +136,18 @@ Pass createElementNS test in XHTML document: undefined,"f1oo",null
Pass createElementNS test in HTML document: undefined,"foo1",null
Pass createElementNS test in XML document: undefined,"foo1",null
Pass createElementNS test in XHTML document: undefined,"foo1",null
Fail createElementNS test in HTML document: undefined,":foo",null
Fail createElementNS test in XML document: undefined,":foo",null
Fail createElementNS test in XHTML document: undefined,":foo",null
Pass createElementNS test in HTML document: undefined,":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: undefined,":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: undefined,":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: undefined,"f:oo","NAMESPACE_ERR"
Pass createElementNS test in XML document: undefined,"f:oo","NAMESPACE_ERR"
Pass createElementNS test in XHTML document: undefined,"f:oo","NAMESPACE_ERR"
Pass createElementNS test in HTML document: undefined,"foo:","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: undefined,"foo:","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: undefined,"foo:","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: undefined,"f::oo","NAMESPACE_ERR"
Pass createElementNS test in XML document: undefined,"f::oo","NAMESPACE_ERR"
Pass createElementNS test in XHTML document: undefined,"f::oo","NAMESPACE_ERR"
Fail createElementNS test in HTML document: undefined,"f::oo","INVALID_CHARACTER_ERR"
Fail createElementNS test in XML document: undefined,"f::oo","INVALID_CHARACTER_ERR"
Fail createElementNS test in XHTML document: undefined,"f::oo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: undefined,"xml",null
Pass createElementNS test in XML document: undefined,"xml",null
Pass createElementNS test in XHTML document: undefined,"xml",null
@ -190,21 +190,21 @@ Pass createElementNS test in XHTML document: "http://example.com/","f1oo",null
Pass createElementNS test in HTML document: "http://example.com/","foo1",null
Pass createElementNS test in XML document: "http://example.com/","foo1",null
Pass createElementNS test in XHTML document: "http://example.com/","foo1",null
Fail createElementNS test in HTML document: "http://example.com/",":foo",null
Fail createElementNS test in XML document: "http://example.com/",":foo",null
Fail createElementNS test in XHTML document: "http://example.com/",":foo",null
Pass createElementNS test in HTML document: "http://example.com/",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: "http://example.com/",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: "http://example.com/",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: "http://example.com/","f:oo",null
Pass createElementNS test in XML document: "http://example.com/","f:oo",null
Pass createElementNS test in XHTML document: "http://example.com/","f:oo",null
Pass createElementNS test in HTML document: "http://example.com/","f:o:o",null
Pass createElementNS test in XML document: "http://example.com/","f:o:o",null
Pass createElementNS test in XHTML document: "http://example.com/","f:o:o",null
Fail createElementNS test in HTML document: "http://example.com/","f:o:o",null
Fail createElementNS test in XML document: "http://example.com/","f:o:o",null
Fail createElementNS test in XHTML document: "http://example.com/","f:o:o",null
Pass createElementNS test in HTML document: "http://example.com/","foo:","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: "http://example.com/","foo:","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: "http://example.com/","foo:","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: "http://example.com/","f::oo",null
Pass createElementNS test in XML document: "http://example.com/","f::oo",null
Pass createElementNS test in XHTML document: "http://example.com/","f::oo",null
Fail createElementNS test in HTML document: "http://example.com/","f::oo","INVALID_CHARACTER_ERR"
Fail createElementNS test in XML document: "http://example.com/","f::oo","INVALID_CHARACTER_ERR"
Fail createElementNS test in XHTML document: "http://example.com/","f::oo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: "http://example.com/","a:0","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: "http://example.com/","a:0","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: "http://example.com/","a:0","INVALID_CHARACTER_ERR"
@ -301,9 +301,9 @@ Pass createElementNS test in XHTML document: "http://example.com/","XMLNS:foo",n
Pass createElementNS test in HTML document: "http://example.com/","xmlfoo:bar",null
Pass createElementNS test in XML document: "http://example.com/","xmlfoo:bar",null
Pass createElementNS test in XHTML document: "http://example.com/","xmlfoo:bar",null
Pass createElementNS test in HTML document: "http://example.com/","prefix::local",null
Pass createElementNS test in XML document: "http://example.com/","prefix::local",null
Pass createElementNS test in XHTML document: "http://example.com/","prefix::local",null
Fail createElementNS test in HTML document: "http://example.com/","prefix::local","INVALID_CHARACTER_ERR"
Fail createElementNS test in XML document: "http://example.com/","prefix::local","INVALID_CHARACTER_ERR"
Fail createElementNS test in XHTML document: "http://example.com/","prefix::local","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: "http://example.com/","namespaceURI:{","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: "http://example.com/","namespaceURI:{","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: "http://example.com/","namespaceURI:{","INVALID_CHARACTER_ERR"
@ -397,9 +397,9 @@ Pass createElementNS test in XHTML document: "/","f1oo",null
Pass createElementNS test in HTML document: "/","foo1",null
Pass createElementNS test in XML document: "/","foo1",null
Pass createElementNS test in XHTML document: "/","foo1",null
Fail createElementNS test in HTML document: "/",":foo",null
Fail createElementNS test in XML document: "/",":foo",null
Fail createElementNS test in XHTML document: "/",":foo",null
Pass createElementNS test in HTML document: "/",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: "/",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: "/",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: "/","f:oo",null
Pass createElementNS test in XML document: "/","f:oo",null
Pass createElementNS test in XHTML document: "/","f:oo",null
@ -436,9 +436,9 @@ Pass createElementNS test in XHTML document: "http://www.w3.org/XML/1998/namespa
Pass createElementNS test in HTML document: "http://www.w3.org/XML/1998/namespace","foo1",null
Pass createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","foo1",null
Pass createElementNS test in XHTML document: "http://www.w3.org/XML/1998/namespace","foo1",null
Fail createElementNS test in HTML document: "http://www.w3.org/XML/1998/namespace",":foo",null
Fail createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace",":foo",null
Fail createElementNS test in XHTML document: "http://www.w3.org/XML/1998/namespace",":foo",null
Pass createElementNS test in HTML document: "http://www.w3.org/XML/1998/namespace",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: "http://www.w3.org/XML/1998/namespace",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: "http://www.w3.org/XML/1998/namespace","f:oo",null
Pass createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","f:oo",null
Pass createElementNS test in XHTML document: "http://www.w3.org/XML/1998/namespace","f:oo",null
@ -481,9 +481,9 @@ Pass createElementNS test in XHTML document: "http://www.w3.org/2000/xmlns/","f1
Pass createElementNS test in HTML document: "http://www.w3.org/2000/xmlns/","foo1","NAMESPACE_ERR"
Pass createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","foo1","NAMESPACE_ERR"
Pass createElementNS test in XHTML document: "http://www.w3.org/2000/xmlns/","foo1","NAMESPACE_ERR"
Fail createElementNS test in HTML document: "http://www.w3.org/2000/xmlns/",":foo","NAMESPACE_ERR"
Fail createElementNS test in XML document: "http://www.w3.org/2000/xmlns/",":foo","NAMESPACE_ERR"
Fail createElementNS test in XHTML document: "http://www.w3.org/2000/xmlns/",":foo","NAMESPACE_ERR"
Pass createElementNS test in HTML document: "http://www.w3.org/2000/xmlns/",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: "http://www.w3.org/2000/xmlns/",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: "http://www.w3.org/2000/xmlns/",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: "http://www.w3.org/2000/xmlns/","f:oo","NAMESPACE_ERR"
Pass createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","f:oo","NAMESPACE_ERR"
Pass createElementNS test in XHTML document: "http://www.w3.org/2000/xmlns/","f:oo","NAMESPACE_ERR"
@ -523,9 +523,9 @@ Pass createElementNS test in XHTML document: "foo:","f1oo",null
Pass createElementNS test in HTML document: "foo:","foo1",null
Pass createElementNS test in XML document: "foo:","foo1",null
Pass createElementNS test in XHTML document: "foo:","foo1",null
Fail createElementNS test in HTML document: "foo:",":foo",null
Fail createElementNS test in XML document: "foo:",":foo",null
Fail createElementNS test in XHTML document: "foo:",":foo",null
Pass createElementNS test in HTML document: "foo:",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XML document: "foo:",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in XHTML document: "foo:",":foo","INVALID_CHARACTER_ERR"
Pass createElementNS test in HTML document: "foo:","f:oo",null
Pass createElementNS test in XML document: "foo:","f:oo",null
Pass createElementNS test in XHTML document: "foo:","f:oo",null

View File

@ -112,11 +112,11 @@ test(function() {
assert_not_equals(element, null)
assert_equals(element.nodeType, Node.ELEMENT_NODE)
assert_equals(element.ownerDocument, doc)
var qualified = String(qualifiedName), names = []
var qualified = String(qualifiedName)
var names = []
var firstColonIndex = qualified.indexOf(":")
if (firstColonIndex >= 0) {
names.push(qualified.substring(0, firstColonIndex));
names.push(qualified.substring(firstColonIndex + 1));
names = qualifiedName.split(":", 2);
} else {
names = [null, qualified]
}

View File

@ -58,18 +58,20 @@ function runTest(t, i, desc) {
assert_equals(element.nodeType, element.ELEMENT_NODE)
assert_equals(element.nodeValue, null)
assert_equals(element.ownerDocument, doc)
var qualified = String(qualifiedName), names = []
var qualified = String(qualifiedName)
var tagName = String(qualifiedName)
var names = [];
var firstColonIndex = qualified.indexOf(":")
if (firstColonIndex >= 0) {
names.push(qualified.substring(0, firstColonIndex));
names.push(qualified.substring(firstColonIndex + 1));
names = qualifiedName.split(":", 2);
tagName = names.join(":");
} else {
names = [null, qualified]
}
assert_equals(element.prefix, names[0], 'element.prefix')
assert_equals(element.localName, names[1], 'element.localName')
assert_equals(element.tagName, qualified, 'element.tagName')
assert_equals(element.nodeName, qualified, 'element.nodeName')
assert_equals(element.tagName, tagName, 'element.tagName')
assert_equals(element.nodeName, tagName, 'element.nodeName')
assert_equals(element.namespaceURI,
namespace === undefined || namespace === "" ? null
: namespace,

View File

@ -26,7 +26,7 @@ var createElementNS_tests = [
[null, "fo o", "INVALID_CHARACTER_ERR"],
[null, "-foo", "INVALID_CHARACTER_ERR"],
[null, ".foo", "INVALID_CHARACTER_ERR"],
[null, ":foo", null],
[null, ":foo", "INVALID_CHARACTER_ERR"],
[null, "f:oo", "NAMESPACE_ERR"],
[null, "foo:", "INVALID_CHARACTER_ERR"],
[null, "f:o:o", "NAMESPACE_ERR"],
@ -39,7 +39,7 @@ var createElementNS_tests = [
[null, "xmlfoo:bar", "NAMESPACE_ERR"],
[null, "null:xml", "NAMESPACE_ERR"],
["", null, null],
["", ":foo", null],
["", ":foo", "INVALID_CHARACTER_ERR"],
["", "f:oo", "NAMESPACE_ERR"],
["", "foo:", "INVALID_CHARACTER_ERR"],
[undefined, null, null],
@ -48,10 +48,10 @@ var createElementNS_tests = [
[undefined, "1foo", "INVALID_CHARACTER_ERR"],
[undefined, "f1oo", null],
[undefined, "foo1", null],
[undefined, ":foo", null],
[undefined, ":foo", "INVALID_CHARACTER_ERR"],
[undefined, "f:oo", "NAMESPACE_ERR"],
[undefined, "foo:", "INVALID_CHARACTER_ERR"],
[undefined, "f::oo", "NAMESPACE_ERR"],
[undefined, "f::oo", "INVALID_CHARACTER_ERR"],
[undefined, "xml", null],
[undefined, "xmlns", "NAMESPACE_ERR"],
[undefined, "xmlfoo", null],
@ -66,11 +66,11 @@ var createElementNS_tests = [
["http://example.com/", ".foo", "INVALID_CHARACTER_ERR"],
["http://example.com/", "f1oo", null],
["http://example.com/", "foo1", null],
["http://example.com/", ":foo", null],
["http://example.com/", ":foo", "INVALID_CHARACTER_ERR"],
["http://example.com/", "f:oo", null],
["http://example.com/", "f:o:o", null],
["http://example.com/", "foo:", "INVALID_CHARACTER_ERR"],
["http://example.com/", "f::oo", null],
["http://example.com/", "f::oo", "INVALID_CHARACTER_ERR"],
["http://example.com/", "a:0", "INVALID_CHARACTER_ERR"],
["http://example.com/", "0:a", null],
["http://example.com/", "a:_", null],
@ -103,7 +103,7 @@ var createElementNS_tests = [
["http://example.com/", "xmlns:foo", "NAMESPACE_ERR"],
["http://example.com/", "XMLNS:foo", null],
["http://example.com/", "xmlfoo:bar", null],
["http://example.com/", "prefix::local", null],
["http://example.com/", "prefix::local", "INVALID_CHARACTER_ERR"],
["http://example.com/", "namespaceURI:{", "INVALID_CHARACTER_ERR"],
["http://example.com/", "namespaceURI:}", "INVALID_CHARACTER_ERR"],
["http://example.com/", "namespaceURI:~", "INVALID_CHARACTER_ERR"],
@ -135,7 +135,7 @@ var createElementNS_tests = [
["/", "1foo", "INVALID_CHARACTER_ERR"],
["/", "f1oo", null],
["/", "foo1", null],
["/", ":foo", null],
["/", ":foo", "INVALID_CHARACTER_ERR"],
["/", "f:oo", null],
["/", "foo:", "INVALID_CHARACTER_ERR"],
["/", "xml", null],
@ -148,7 +148,7 @@ var createElementNS_tests = [
["http://www.w3.org/XML/1998/namespace", "1foo", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/XML/1998/namespace", "f1oo", null],
["http://www.w3.org/XML/1998/namespace", "foo1", null],
["http://www.w3.org/XML/1998/namespace", ":foo", null],
["http://www.w3.org/XML/1998/namespace", ":foo", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/XML/1998/namespace", "f:oo", null],
["http://www.w3.org/XML/1998/namespace", "foo:", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/XML/1998/namespace", "xml", null],
@ -163,7 +163,7 @@ var createElementNS_tests = [
["http://www.w3.org/2000/xmlns/", "1foo", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/2000/xmlns/", "f1oo", "NAMESPACE_ERR"],
["http://www.w3.org/2000/xmlns/", "foo1", "NAMESPACE_ERR"],
["http://www.w3.org/2000/xmlns/", ":foo", "NAMESPACE_ERR"],
["http://www.w3.org/2000/xmlns/", ":foo", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/2000/xmlns/", "f:oo", "NAMESPACE_ERR"],
["http://www.w3.org/2000/xmlns/", "foo:", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/2000/xmlns/", "xml", "NAMESPACE_ERR"],
@ -177,7 +177,7 @@ var createElementNS_tests = [
["foo:", "1foo", "INVALID_CHARACTER_ERR"],
["foo:", "f1oo", null],
["foo:", "foo1", null],
["foo:", ":foo", null],
["foo:", ":foo", "INVALID_CHARACTER_ERR"],
["foo:", "f:oo", null],
["foo:", "foo:", "INVALID_CHARACTER_ERR"],
["foo:", "xml", null],