diff --git a/dom/tests/mochitest/bugs/mochitest.ini b/dom/tests/mochitest/bugs/mochitest.ini index dce49b928d61..973829916f37 100644 --- a/dom/tests/mochitest/bugs/mochitest.ini +++ b/dom/tests/mochitest/bugs/mochitest.ini @@ -76,7 +76,6 @@ 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] diff --git a/dom/tests/mochitest/bugs/test_bug411103.html b/dom/tests/mochitest/bugs/test_bug411103.html deleted file mode 100644 index 3830cf03322e..000000000000 --- a/dom/tests/mochitest/bugs/test_bug411103.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Test for Bug 411103 - - - - -Mozilla Bug 411103 -

- - - - - - - - -
-
-
- - diff --git a/parser/expat/lib/moz_extensions.c b/parser/expat/lib/moz_extensions.c index f5b0f6539c57..37b9e7f71e71 100644 --- a/parser/expat/lib/moz_extensions.c +++ b/parser/expat/lib/moz_extensions.c @@ -45,18 +45,15 @@ int MOZ_XMLCheckQName(const char* ptr, const char* end, int ns_aware, nmstrt = ns_aware; /* e.g. "a:0" should be valid if !ns_aware */ break; case BT_NONASCII: - if (nmstrt && !IS_NMSTRT_CHAR_MINBPC(ptr)) { - /* If this is a valid name character and we're namespace-aware, the - QName is malformed. Otherwise, this character's invalid at the - start of a name (or, if we're namespace-aware, at the start of a - localpart). */ - return (IS_NAME_CHAR_MINBPC(ptr) && ns_aware) ? - MOZ_EXPAT_MALFORMED : - MOZ_EXPAT_INVALID_CHARACTER; - } - if (!IS_NAME_CHAR_MINBPC(ptr)) { + if (!IS_NAME_CHAR_MINBPC(ptr) || + (nmstrt && !*colon && !IS_NMSTRT_CHAR_MINBPC(ptr))) { return MOZ_EXPAT_INVALID_CHARACTER; } + if (nmstrt && *colon && !IS_NMSTRT_CHAR_MINBPC(ptr)) { + /* If a non-starting character like a number is right after the colon, + this is a namespace error, not invalid character */ + return MOZ_EXPAT_MALFORMED; + } nmstrt = 0; break; case BT_NMSTRT: diff --git a/testing/web-platform/meta/dom/nodes/DOMImplementation-createDocument.html.ini b/testing/web-platform/meta/dom/nodes/DOMImplementation-createDocument.html.ini index b540807ecb1f..6f2dc3f4dc14 100644 --- a/testing/web-platform/meta/dom/nodes/DOMImplementation-createDocument.html.ini +++ b/testing/web-platform/meta/dom/nodes/DOMImplementation-createDocument.html.ini @@ -1,30 +1,18 @@ [DOMImplementation-createDocument.html] type: testharness - [createDocument test 6: null,"̀foo",null,"INVALID_CHARACTER_ERR"] - expected: FAIL - bug: 1298818 - - [createDocument test 172: metadata for null,null,DocumentType node] - expected: FAIL - bug: 520969 - - [createDocument test 172: null,null,DocumentType node,null] - expected: FAIL - bug: 520969 - - [createDocument test 185: null,"",DocumentType node] - expected: FAIL - bug: 520969 - - [createDocument test: null,"̀foo",null,"INVALID_CHARACTER_ERR"] + [createDocument test: "http://example.com/","a:0",null,"NAMESPACE_ERR"] expected: FAIL + bug: https://github.com/whatwg/dom/issues/319 [createDocument test: null,null,DocumentType node ,null] expected: FAIL + bug: 520969 - [createDocument test 170: metadata for null,null,DocumentType node ] + [createDocument test 195: metadata for null,null,DocumentType node ] expected: FAIL + bug: 520969 [createDocument test: null,"",DocumentType node ] expected: FAIL + bug: 520969 diff --git a/testing/web-platform/meta/dom/nodes/Document-createElementNS.html.ini b/testing/web-platform/meta/dom/nodes/Document-createElementNS.html.ini index 59d6e19151cd..0a772835fb21 100644 --- a/testing/web-platform/meta/dom/nodes/Document-createElementNS.html.ini +++ b/testing/web-platform/meta/dom/nodes/Document-createElementNS.html.ini @@ -1,8 +1,14 @@ [Document-createElementNS.html] type: testharness - [createElementNS test 6: null,"̀foo","INVALID_CHARACTER_ERR"] + [createElementNS test in HTML document: "http://example.com/","a:0","NAMESPACE_ERR"] + bug: https://github.com/whatwg/dom/issues/319 expected: FAIL - [createElementNS test: null,"̀foo","INVALID_CHARACTER_ERR"] + [createElementNS test in XML document: "http://example.com/","a:0","NAMESPACE_ERR"] + bug: https://github.com/whatwg/dom/issues/319 + expected: FAIL + + [createElementNS test in XHTML document: "http://example.com/","a:0","NAMESPACE_ERR"] + bug: https://github.com/whatwg/dom/issues/319 expected: FAIL diff --git a/testing/web-platform/tests/common/dummy.xhtml b/testing/web-platform/tests/common/dummy.xhtml new file mode 100644 index 000000000000..5b208d744505 --- /dev/null +++ b/testing/web-platform/tests/common/dummy.xhtml @@ -0,0 +1,2 @@ + +Dummy XHTML document diff --git a/testing/web-platform/tests/common/dummy.xml b/testing/web-platform/tests/common/dummy.xml new file mode 100644 index 000000000000..4a60c3035fcc --- /dev/null +++ b/testing/web-platform/tests/common/dummy.xml @@ -0,0 +1 @@ +Dummy XML document diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement.html b/testing/web-platform/tests/dom/nodes/Document-createElement.html index 59fa02d83f56..bacaff0f6a00 100644 --- a/testing/web-platform/tests/dom/nodes/Document-createElement.html +++ b/testing/web-platform/tests/dom/nodes/Document-createElement.html @@ -9,6 +9,8 @@
+ + diff --git a/testing/web-platform/tests/dom/nodes/Document-createElementNS.html b/testing/web-platform/tests/dom/nodes/Document-createElementNS.html index 75005a09e2ed..68341bcd44f2 100644 --- a/testing/web-platform/tests/dom/nodes/Document-createElementNS.html +++ b/testing/web-platform/tests/dom/nodes/Document-createElementNS.html @@ -6,59 +6,87 @@
+ +