Backed out changeset 72f66ce70dd8 (bug 1298818) for invalid wpt log messages. r=backout on a CLOSED TREE

This commit is contained in:
Sebastian Hengst 2016-09-01 20:48:24 +02:00
Родитель bdb6a207ff
Коммит 90f3f13901
10 изменённых файлов: 301 добавлений и 283 удалений

Просмотреть файл

@ -76,6 +76,7 @@ skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_bug404748.html]
[test_bug406375.html]
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android'
[test_bug411103.html]
[test_bug414291.html]
tags = openwindow
[test_bug427744.html]

Просмотреть файл

@ -0,0 +1,188 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=411103
-->
<head>
<title>Test for Bug 411103</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=411103">Mozilla Bug 411103</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<!-- XML's createElement and createElementNS aren't HTML's, of course -->
<iframe src="data:application/xml,%3Cfoo%3EXML%3C/foo%3E" name="xmlWindow"></iframe>
<!-- for good measure... -->
<iframe src="data:application/xhtml+xml,%3Chtml%20xmlns=%22http://www.w3.org/1999/xhtml%22%3E%3Cbody%3E%3Cp%3EXHTML%3C/p%3E%3C/body%3E%3C/html%3E"
name="xhtmlWindow"></iframe>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
/** Test for Bug 411103 **/
var allNSTests =
[
{ args: [undefined, undefined] },
{ args: [null, undefined] },
{ args: [undefined, null] },
{ args: [null, null] },
{ args: [null, ""], code: 5 },
{ args: ["", null] },
{ args: ["", ""], code: 5 },
{ args: [null, "<div>"], code: 5 },
{ args: [null, "0div"], code: 5 },
{ args: [null, "di v"], code: 5 },
{ args: [null, "di<v"], code: 5 },
{ args: [null, "-div"], code: 5 },
{ args: [null, ".div"], code: 5 },
{ args: ["http://example.com/", "<div>"], code: 5 },
{ args: ["http://example.com/", "0div"], code: 5 },
{ args: ["http://example.com/", "di<v"], code: 5 },
{ args: ["http://example.com/", "-div"], code: 5 },
{ args: ["http://example.com/", ".div"], code: 5 },
{ args: [null, ":div"], code: 14 },
{ args: [null, "div:"], code: 14 },
{ args: ["http://example.com/", ":div"], code: 14 },
{ args: ["http://example.com/", "div:"], code: 14 },
{ args: [null, "d:iv"], code: 14 },
{ args: [null, "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: [null, "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:0"], code: 5, message: "valid XML name, not a valid QName" },
{ args: ["http://example.com/", "0:a"], code: 5, message: "0 at start makes it not a valid XML name" },
{ args: ["http://example.com/", "a:_"] },
{ args: ["http://example.com/", "a:\u0BC6"], code: 14,
message: "non-ASCII character after colon is CombiningChar, which is " +
"NCNameChar but not (Letter | \"_\") so invalid at start of " +
"NCName (but still a valid XML name, hence not 5)" },
{ args: ["http://example.com/", "\u0BC6:a"], code: 14,
message: "non-ASCII character after colon is CombiningChar, which is " +
"NCNameChar but not (Letter | \"_\") so invalid at start of " +
"NCName (Gecko chooses to throw 14 here, but either is valid " +
"as this is both an invalid XML name and an invalid QName)" },
{ args: ["http://example.com/", "a:a\u0BC6"] },
{ args: ["http://example.com/", "a\u0BC6:a"] },
{ args: ["http://example.com/", "xml:test"], code: 14, message: "binding xml prefix wrong" },
{ args: ["http://example.com/", "xmlns:test"], code: 14, message: "binding xmlns prefix wrong" },
{ args: ["http://www.w3.org/2000/xmlns/", "x:test"], code: 14, message: "binding namespace namespace to wrong prefix" },
{ args: ["http://www.w3.org/2000/xmlns/", "xmlns:test"] },
{ args: ["http://www.w3.org/XML/1998/namespace", "xml:test"] },
{ args: ["http://www.w3.org/XML/1998/namespace", "x:test"] },
];
var allNoNSTests =
[
{ args: [undefined] },
{ args: [null] },
{ args: [""], code: 5 },
{ args: ["<div>"], code: 5 },
{ args: ["0div"], code: 5 },
{ args: ["di v"], code: 5 },
{ args: ["di<v"], code: 5 },
{ args: ["-div"], code: 5 },
{ args: [".div"], code: 5 },
{ args: [":"], message: "valid XML name, invalid QName" },
{ args: [":div"], message: "valid XML name, invalid QName" },
{ args: ["div:"], message: "valid XML name, invalid QName" },
{ args: ["d:iv"] },
{ args: ["a:b:c"], message: "valid XML name, invalid QName" },
{ args: ["a::c"], message: "valid XML name, invalid QName" },
{ args: ["a::c:"], message: "valid XML name, invalid QName" },
{ args: ["a:0"], message: "valid XML name, not a valid QName" },
{ args: ["0:a"], code: 5, message: "0 at start makes it not a valid XML name" },
{ args: ["a:_"] },
{ args: ["a:\u0BC6"],
message: "non-ASCII character after colon is CombiningChar, which is " +
"valid in pre-namespace XML" },
{ args: ["\u0BC6:a"], code: 5, message: "not a valid start character" },
{ args: ["a:a\u0BC6"] },
{ args: ["a\u0BC6:a"] },
{ args: ["xml:test"] },
{ args: ["xmlns:test"] },
{ args: ["x:test"] },
{ args: ["xmlns:test"] },
];
function sourceify(v)
{
switch (typeof v)
{
case "undefined":
return v;
case "string":
return '"' + v.replace('"', '\\"') + '"';
default:
return String(v);
}
}
function sourceifyArgs(args)
{
var copy = new Array(args.length);
for (var i = 0, sz = args.length; i < sz; i++)
copy[i] = sourceify(args[i]);
return copy.join(", ");
}
function runTests(tests, methodName, document)
{
for (var i = 0, sz = tests.length; i < sz; i++)
{
var test = tests[i];
var argStr = sourceifyArgs(test.args);
try
{
document[methodName].apply(document, test.args);
var msg = "expected no exception for " +
"document." + methodName + "(" + argStr + ")";
if ("message" in test)
msg += "; " + test.message;
ok(!("code" in test), msg);
}
catch (e)
{
msg = "exception code for document." + methodName + "(" + argStr + ")";
if ("message" in test)
msg += "; " + test.message;
is(e.code, test.code || "no exception", msg);
}
}
}
function run()
{
// HTML document
runTests(allNSTests, "createElementNS", document);
runTests(allNoNSTests, "createElement", document);
// XML document
var xmlDocument = window.frames.xmlWindow.document;
runTests(allNSTests, "createElementNS", xmlDocument);
runTests(allNoNSTests, "createElement", xmlDocument);
// XHTML document, for good measure
var xhtmlDocument = window.frames.xhtmlWindow.document;
runTests(allNSTests, "createElementNS", xhtmlDocument);
runTests(allNoNSTests, "createElement", xhtmlDocument);
SimpleTest.finish();
}
window.addEventListener("load", run, false);
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -1,14 +1,6 @@
{
"items": {
"manual": [
{
"path": "dummy.xml",
"url": "/dummy.xml"
},
{
"path": "dummy.xhtml",
"url": "/dummy.xhtml"
},
{
"path": "2dcontext/conformance-requirements/2d.coordinatespace-manual.html",
"url": "/2dcontext/conformance-requirements/2d.coordinatespace-manual.html"

Просмотреть файл

@ -1,30 +1,22 @@
[DOMImplementation-createDocument.html]
type: testharness
[createDocument test 7: null,"ெfoo",null,"INVALID_CHARACTER_ERR"]
[createDocument test 6: null,"̀foo",null,"INVALID_CHARACTER_ERR"]
expected: FAIL
bug: 1298818
[createDocument test 67: "http://example.com/","a:0",null,"NAMESPACE_ERR"]
expected: FAIL
bug: https://github.com/whatwg/dom/issues/319
[createDocument test 71: "http://example.com/","ெ:a",null,"INVALID_CHARACTER_ERR"]
expected: FAIL
bug: 1298818
[createDocument test 197: metadata for null,null,DocumentType node]
[createDocument test 172: metadata for null,null,DocumentType node]
expected: FAIL
bug: 520969
[createDocument test 197: null,null,DocumentType node,null]
[createDocument test 172: null,null,DocumentType node,null]
expected: FAIL
bug: 520969
[createDocument test 210: null,"",DocumentType node]
[createDocument test 185: null,"",DocumentType node]
expected: FAIL
bug: 520969
[createDocument test 211: null,"",DocumentType node]
[createDocument test 186: null,"",DocumentType node]
expected: FAIL
bug: 520969

Просмотреть файл

@ -1,32 +1,5 @@
[Document-createElementNS.html]
type: testharness
[createElementNS test 7 in HTML document: null,"ெfoo","INVALID_CHARACTER_ERR"]
expected: FAIL
[createElementNS test 7 in XML document: null,"ெfoo","INVALID_CHARACTER_ERR"]
expected: FAIL
[createElementNS test 7 in XHTML document: null,"ெfoo","INVALID_CHARACTER_ERR"]
expected: FAIL
[createElementNS test 67 in HTML document: "http://example.com/","a:0","NAMESPACE_ERR"]
bug: https://github.com/whatwg/dom/issues/319
expected: FAIL
[createElementNS test 67 in XML document: "http://example.com/","a:0","NAMESPACE_ERR"]
bug: https://github.com/whatwg/dom/issues/319
expected: FAIL
[createElementNS test 67 in XHTML document: "http://example.com/","a:0","NAMESPACE_ERR"]
bug: https://github.com/whatwg/dom/issues/319
expected: FAIL
[createElementNS test 71 in HTML document: "http://example.com/","ெ:a","INVALID_CHARACTER_ERR"]
expected: FAIL
[createElementNS test 71 in XML document: "http://example.com/","ெ:a","INVALID_CHARACTER_ERR"]
expected: FAIL
[createElementNS test 71 in XHTML document: "http://example.com/","ெ:a","INVALID_CHARACTER_ERR"]
[createElementNS test 6: null,"̀foo","INVALID_CHARACTER_ERR"]
expected: FAIL

Просмотреть файл

@ -9,8 +9,6 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="/dummy.xml"></iframe>
<iframe src="/dummy.xhtml"></iframe>
<script>
function toASCIIUppercase(str) {
var diff = "a".charCodeAt(0) - "A".charCodeAt(0);
@ -24,134 +22,64 @@ function toASCIIUppercase(str) {
}
return res;
}
function toASCIILowercase(str) {
var diff = "a".charCodeAt(0) - "A".charCodeAt(0);
var res = "";
for (var i = 0; i < str.length; ++i) {
if ("A" <= str[i] && str[i] <= "Z") {
res += String.fromCharCode(str.charCodeAt(i) + diff);
} else {
res += str[i];
}
}
return res;
}
var HTMLNS = "http://www.w3.org/1999/xhtml",
valid = [
undefined,
null,
"foo",
"f1oo",
"foo1",
"f\u0BC6",
"foo\u0BC6",
":",
":foo",
"f:oo",
"foo:",
"f:o:o",
"f::oo",
"f::oo:",
"foo:0",
"foo:_",
// combining char after :, invalid QName but valid Name
"foo:\u0BC6",
"foo:foo\u0BC6",
"foo\u0BC6:foo",
"xml",
"xmlns",
"xmlfoo",
"xml:foo",
"xmlns:foo",
"xmlfoo:bar",
"svg",
"math",
"FOO",
// Test that non-ASCII chars don't get uppercased/lowercased
"mar\u212a",
"\u0130nput",
"\u0131nput",
],
invalid = [
"",
"1foo",
"1:foo",
"fo o",
"\u0BC6foo",
"}foo",
"f}oo",
"foo}",
"\ufffffoo",
"f\uffffoo",
"foo\uffff",
"<foo",
"foo>",
"<foo>",
"f<oo",
"-foo",
".foo",
"\u0BC6",
]
test(function() {
var HTMLNS = "http://www.w3.org/1999/xhtml",
valid = [
//[input, localName],
[undefined, "undefined"],
[null, "null"],
["foo", "foo"],
["f1oo", "f1oo"],
["foo1", "foo1"],
["f\u0300oo", "f\u0300oo"],
["foo\u0300", "foo\u0300"],
[":foo", ":foo"],
["f:oo", "f:oo"],
["foo:", "foo:"],
["xml", "xml"],
["xmlns", "xmlns"],
["xmlfoo", "xmlfoo"],
["xml:foo", "xml:foo"],
["xmlns:foo", "xmlns:foo"],
["xmlfoo:bar", "xmlfoo:bar"],
["svg", "svg"],
["math", "math"],
["FOO", "foo"],
["mar\u212a", "mar\u212a"],
["\u0130nput", "\u0130nput"],
["\u0131nput", "\u0131nput"]
],
invalid = [
"",
"1foo",
"\u0300foo",
"}foo",
"f}oo",
"foo}",
"\ufffffoo",
"f\uffffoo",
"foo\uffff",
"<foo",
"foo>",
"<foo>",
"f<oo"
]
var xmlIframe = document.querySelector('[src="/dummy.xml"]');
var xhtmlIframe = document.querySelector('[src="/dummy.xhtml"]');
function getWin(desc) {
if (desc == "HTML document") {
return window;
}
if (desc == "XML document") {
assert_equals(xmlIframe.contentDocument.documentElement.textContent,
"Dummy XML document", "XML document didn't load");
return xmlIframe.contentWindow;
}
if (desc == "XHTML document") {
assert_equals(xhtmlIframe.contentDocument.documentElement.textContent,
"Dummy XHTML document", "XHTML document didn't load");
return xhtmlIframe.contentWindow;
}
}
valid.forEach(function(t) {
["HTML document", "XML document", "XHTML document"].forEach(function(desc) {
async_test(function(testObj) {
window.addEventListener("load", function() {
testObj.step(function() {
var win = getWin(desc);
var doc = win.document;
var elt = doc.createElement(t)
assert_true(elt instanceof win.Element, "instanceof Element")
assert_true(elt instanceof win.Node, "instanceof Node")
assert_equals(elt.localName,
desc == "HTML document" ? toASCIILowercase(String(t))
: String(t),
"localName")
assert_equals(elt.tagName,
desc == "HTML document" ? toASCIIUppercase(String(t))
: String(t),
"tagName")
assert_equals(elt.prefix, null, "prefix")
assert_equals(elt.namespaceURI,
desc == "XML document" ? null : HTMLNS, "namespaceURI")
});
testObj.done();
});
}, "createElement(" + format_value(t) + ") in " + desc);
valid.forEach(function(t) {
test(function() {
var elt = document.createElement(t[0])
assert_true(elt instanceof Element)
assert_true(elt instanceof Node)
assert_equals(elt.localName, t[1])
assert_equals(elt.tagName, toASCIIUppercase(t[1]))
assert_equals(elt.prefix, null)
assert_equals(elt.namespaceURI, HTMLNS)
}, "createElement(" + format_value(t[0]) + ")");
});
});
invalid.forEach(function(arg) {
["HTML document", "XML document", "XHTML document"].forEach(function(desc) {
async_test(function(testObj) {
window.addEventListener("load", function() {
testObj.step(function() {
var doc = getWin(desc).document;
assert_throws("InvalidCharacterError",
function() { doc.createElement(arg) })
});
testObj.done();
});
}, "createElement(" + format_value(arg) + ") in " + desc);
invalid.forEach(function(arg) {
test(function() {
assert_throws("INVALID_CHARACTER_ERR", function() { document.createElement(arg) })
}, "createElement(" + format_value(arg) + ")");
});
});
})
</script>

Просмотреть файл

@ -6,88 +6,60 @@
<script src="/resources/testharnessreport.js"></script>
<script src="Document-createElementNS.js"></script>
<div id="log"></div>
<iframe src="/dummy.xml"></iframe>
<iframe src="/dummy.xhtml"></iframe>
<script>
var tests = createElementNS_tests.concat([
/* Arrays with three elements:
* the namespace argument
* the qualifiedName argument
* the expected exception, or null if none
*/
["", "", "INVALID_CHARACTER_ERR"],
[null, null, null],
[null, "", "INVALID_CHARACTER_ERR"],
[undefined, null, null],
[undefined, undefined, null],
[undefined, "", "INVALID_CHARACTER_ERR"],
["http://example.com/", null, null],
["http://example.com/", "", "INVALID_CHARACTER_ERR"],
["/", null, null],
["/", "", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/XML/1998/namespace", null, null],
["http://www.w3.org/XML/1998/namespace", "", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/2000/xmlns/", null, "NAMESPACE_ERR"],
["http://www.w3.org/2000/xmlns/", "", "INVALID_CHARACTER_ERR"],
["foo:", null, null],
["foo:", "", "INVALID_CHARACTER_ERR"],
])
test(function() {
var tests = createElementNS_tests.concat([
/* Arrays with three elements:
* the namespace argument
* the qualifiedName argument
* the expected exception, or null if none
*/
["", "", "INVALID_CHARACTER_ERR"],
[null, null, null],
[null, "", "INVALID_CHARACTER_ERR"],
[undefined, null, null],
[undefined, undefined, null],
[undefined, "", "INVALID_CHARACTER_ERR"],
["http://example.com/", null, null],
["http://example.com/", "", "INVALID_CHARACTER_ERR"],
["/", null, null],
["/", "", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/XML/1998/namespace", null, null],
["http://www.w3.org/XML/1998/namespace", "", "INVALID_CHARACTER_ERR"],
["http://www.w3.org/2000/xmlns/", null, "NAMESPACE_ERR"],
["http://www.w3.org/2000/xmlns/", "", "INVALID_CHARACTER_ERR"],
["foo:", null, null],
["foo:", "", "INVALID_CHARACTER_ERR"],
])
var xmlIframe = document.querySelector('[src="/dummy.xml"]');
var xhtmlIframe = document.querySelector('[src="/dummy.xhtml"]');
function runTest(t, i, desc) {
async_test(function(testObj) {
window.addEventListener("load", function() {
testObj.step(function() {
var doc;
if (desc == "HTML document") {
doc = document;
} else if (desc == "XML document") {
doc = xmlIframe.contentDocument;
// Make sure we're testing the right document
assert_equals(doc.documentElement.textContent, "Dummy XML document");
} else if (desc == "XHTML document") {
doc = xhtmlIframe.contentDocument;
assert_equals(doc.documentElement.textContent, "Dummy XHTML document");
}
var namespace = t[0], qualifiedName = t[1], expected = t[2]
if (expected != null) {
assert_throws(expected, function() { doc.createElementNS(namespace, qualifiedName) })
tests.forEach(function(t, i) {
test(function() {
var namespace = t[0], qualifiedName = t[1], expected = t[2]
if (expected != null) {
assert_throws(expected, function() { document.createElementNS(namespace, qualifiedName) })
} else {
var element = document.createElementNS(namespace, qualifiedName)
assert_not_equals(element, null)
assert_equals(element.nodeType, Node.ELEMENT_NODE)
assert_equals(element.nodeType, element.ELEMENT_NODE)
assert_equals(element.nodeValue, null)
assert_equals(element.ownerDocument, document)
var qualified = String(qualifiedName), names = []
if (qualified.indexOf(":") >= 0) {
names = qualified.split(":", 2)
} else {
var element = doc.createElementNS(namespace, qualifiedName)
assert_not_equals(element, null)
assert_equals(element.nodeType, Node.ELEMENT_NODE)
assert_equals(element.nodeType, element.ELEMENT_NODE)
assert_equals(element.nodeValue, null)
assert_equals(element.ownerDocument, doc)
var qualified = String(qualifiedName), names = []
if (qualified.indexOf(":") >= 0) {
names = qualified.split(":", 2)
} else {
names = [null, qualified]
}
assert_equals(element.prefix, names[0])
assert_equals(element.localName, names[1])
assert_equals(element.tagName, qualified)
assert_equals(element.nodeName, qualified)
assert_equals(element.namespaceURI,
namespace === undefined || namespace === "" ? null
: namespace)
names = [null, qualified]
}
});
testObj.done();
});
}, "createElementNS test " + i + " in " + desc + ": " + t.map(format_value))
}
tests.forEach(function(t, i) {
runTest(t, i, "HTML document")
runTest(t, i, "XML document")
runTest(t, i, "XHTML document")
assert_equals(element.prefix, names[0])
assert_equals(element.localName, names[1])
assert_equals(element.tagName, qualified)
assert_equals(element.nodeName, qualified)
assert_equals(element.namespaceURI, namespace === undefined ? null : namespace)
}
}, "createElementNS test " + i + ": " + t.map(function(el) { return format_value(el) }))
})
})
test(function() {
var HTMLNS = "http://www.w3.org/1999/xhtml";
var element = document.createElementNS(HTMLNS, "span");

Просмотреть файл

@ -4,14 +4,13 @@ var createElementNS_tests = [
* the qualifiedName argument
* the expected exception, or null if none
*/
[null, null, null],
[null, undefined, null],
[null, "foo", null],
[null, "1foo", "INVALID_CHARACTER_ERR"],
[null, "f1oo", null],
[null, "foo1", null],
[null, "1foo", "INVALID_CHARACTER_ERR"],
[null, "\u0BC6foo", "INVALID_CHARACTER_ERR"],
[null, "\u0300foo", "INVALID_CHARACTER_ERR"],
[null, "}foo", "INVALID_CHARACTER_ERR"],
[null, "f}oo", "INVALID_CHARACTER_ERR"],
[null, "foo}", "INVALID_CHARACTER_ERR"],
@ -23,13 +22,9 @@ var createElementNS_tests = [
[null, "<foo>", "INVALID_CHARACTER_ERR"],
[null, "f<oo", "INVALID_CHARACTER_ERR"],
[null, "^^", "INVALID_CHARACTER_ERR"],
[null, "fo o", "INVALID_CHARACTER_ERR"],
[null, "-foo", "INVALID_CHARACTER_ERR"],
[null, ".foo", "INVALID_CHARACTER_ERR"],
[null, ":foo", "NAMESPACE_ERR"],
[null, "f:oo", "NAMESPACE_ERR"],
[null, "foo:", "NAMESPACE_ERR"],
[null, "f:o:o", "NAMESPACE_ERR"],
[null, ":", "NAMESPACE_ERR"],
[null, "xml", null],
[null, "xmlns", "NAMESPACE_ERR"],
@ -38,11 +33,9 @@ var createElementNS_tests = [
[null, "xmlns:foo", "NAMESPACE_ERR"],
[null, "xmlfoo:bar", "NAMESPACE_ERR"],
[null, "null:xml", "NAMESPACE_ERR"],
["", null, null],
["", ":foo", "NAMESPACE_ERR"],
["", "f:oo", "NAMESPACE_ERR"],
["", "foo:", "NAMESPACE_ERR"],
[undefined, null, null],
[undefined, undefined, null],
[undefined, "foo", null],
[undefined, "1foo", "INVALID_CHARACTER_ERR"],
@ -51,7 +44,6 @@ var createElementNS_tests = [
[undefined, ":foo", "NAMESPACE_ERR"],
[undefined, "f:oo", "NAMESPACE_ERR"],
[undefined, "foo:", "NAMESPACE_ERR"],
[undefined, "f::oo", "NAMESPACE_ERR"],
[undefined, "xml", null],
[undefined, "xmlns", "NAMESPACE_ERR"],
[undefined, "xmlfoo", null],
@ -60,28 +52,11 @@ var createElementNS_tests = [
[undefined, "xmlfoo:bar", "NAMESPACE_ERR"],
["http://example.com/", "foo", null],
["http://example.com/", "1foo", "INVALID_CHARACTER_ERR"],
["http://example.com/", "<foo>", "INVALID_CHARACTER_ERR"],
["http://example.com/", "fo<o", "INVALID_CHARACTER_ERR"],
["http://example.com/", "-foo", "INVALID_CHARACTER_ERR"],
["http://example.com/", ".foo", "INVALID_CHARACTER_ERR"],
["http://example.com/", "f1oo", null],
["http://example.com/", "foo1", null],
["http://example.com/", ":foo", "NAMESPACE_ERR"],
["http://example.com/", "f:oo", null],
["http://example.com/", "f:o:o", "NAMESPACE_ERR"],
["http://example.com/", "foo:", "NAMESPACE_ERR"],
["http://example.com/", "f::oo", "NAMESPACE_ERR"],
["http://example.com/", "a:0", "NAMESPACE_ERR"],
["http://example.com/", "0:a", "INVALID_CHARACTER_ERR"],
["http://example.com/", "a:_", null],
["http://example.com/", "a:\u0BC6", "NAMESPACE_ERR"],
["http://example.com/", "\u0BC6:a", "INVALID_CHARACTER_ERR"],
["http://example.com/", "a:a\u0BC6", null],
["http://example.com/", "a\u0BC6:a", null],
["http://example.com/", "xml:test", "NAMESPACE_ERR"],
["http://example.com/", "xmlns:test", "NAMESPACE_ERR"],
["http://example.com/", "test:xmlns", null],
["http://example.com/", "xmlns", "NAMESPACE_ERR"],
["http://example.com/", "_:_", null],
["http://example.com/", "_:h0", null],
["http://example.com/", "_:test", null],

Просмотреть файл

@ -1,2 +0,0 @@
<!DOCTYPE html>
<html><head><title>Dummy XHTML document</title></head><body /></html>

Просмотреть файл

@ -1 +0,0 @@
<foo>Dummy XML document</foo>