Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dom/nodes/DOMImplementation-createDocument.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
var names = []
var firstColonIndex = qualified.indexOf(":")
if (firstColonIndex >= 0) {
names = qualifiedName.split(":", 2);
names = [qualified.substring(0, firstColonIndex), qualified.substring(firstColonIndex + 1)];
} else {
names = [null, qualified]
}
Expand Down
8 changes: 3 additions & 5 deletions dom/nodes/Document-createElementNS.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,17 @@
assert_equals(element.nodeValue, null)
assert_equals(element.ownerDocument, doc)
var qualified = String(qualifiedName)
var tagName = String(qualifiedName)
var names = [];
var firstColonIndex = qualified.indexOf(":")
if (firstColonIndex >= 0) {
names = qualifiedName.split(":", 2);
tagName = names.join(":");
names = [qualified.substring(0, firstColonIndex), qualified.substring(firstColonIndex + 1)];
} else {
names = [null, qualified]
}
assert_equals(element.prefix, names[0], 'element.prefix')
assert_equals(element.localName, names[1], 'element.localName')
assert_equals(element.tagName, tagName, 'element.tagName')
assert_equals(element.nodeName, tagName, 'element.nodeName')
assert_equals(element.tagName, qualified, 'element.tagName')
assert_equals(element.nodeName, qualified, 'element.nodeName')
assert_equals(element.namespaceURI,
namespace === undefined || namespace === "" ? null
: namespace,
Expand Down
6 changes: 3 additions & 3 deletions dom/nodes/Document-createElementNS.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var createElementNS_tests = [
[undefined, ":foo", "INVALID_CHARACTER_ERR"],
[undefined, "f:oo", "NAMESPACE_ERR"],
[undefined, "foo:", "INVALID_CHARACTER_ERR"],
[undefined, "f::oo", "INVALID_CHARACTER_ERR"],
[undefined, "f::oo", "NAMESPACE_ERR"],
[undefined, "xml", null],
[undefined, "xmlns", "NAMESPACE_ERR"],
[undefined, "xmlfoo", null],
Expand All @@ -70,7 +70,7 @@ var createElementNS_tests = [
["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", "INVALID_CHARACTER_ERR"],
["http://example.com/", "f::oo", null],
["http://example.com/", "a:0", "INVALID_CHARACTER_ERR"],
["http://example.com/", "0:a", null],
["http://example.com/", "a:_", null],
Expand Down Expand Up @@ -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", "INVALID_CHARACTER_ERR"],
["http://example.com/", "prefix::local", null],
["http://example.com/", "namespaceURI:{", "INVALID_CHARACTER_ERR"],
["http://example.com/", "namespaceURI:}", "INVALID_CHARACTER_ERR"],
["http://example.com/", "namespaceURI:~", "INVALID_CHARACTER_ERR"],
Expand Down