diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs
index 1478c043dc8..7a948890a95 100644
--- a/components/script/dom/servoparser/mod.rs
+++ b/components/script/dom/servoparser/mod.rs
@@ -652,13 +652,11 @@ impl FetchResponseListener for ParserContext {
parser.parse_sync();
}
},
- Some(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _))) => {}, // Handle text/xml
+ Some(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _))) | // Handle text/xml, application/xml
+ Some(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _))) => {},
+ Some(ContentType(Mime(TopLevel::Application, SubLevel::Ext(ref sub), _)))
+ if sub.as_str() == "xhtml+xml".to_owned() => {}, // Handle xhtml (application/xhtml+xml)
Some(ContentType(Mime(toplevel, sublevel, _))) => {
- if toplevel.as_str() == "application" && sublevel.as_str() == "xhtml+xml" {
- // Handle xhtml (application/xhtml+xml).
- return;
- }
-
// Show warning page for unknown mime types.
let page = format!("
Unknown content type ({}/{}).
",
toplevel.as_str(),
diff --git a/tests/wpt/metadata/dom/nodes/Document-constructor-xml.xml.ini b/tests/wpt/metadata/dom/nodes/Document-constructor-xml.xml.ini
index 6c33f67c33e..0d3badbb15b 100644
--- a/tests/wpt/metadata/dom/nodes/Document-constructor-xml.xml.ini
+++ b/tests/wpt/metadata/dom/nodes/Document-constructor-xml.xml.ini
@@ -1,3 +1,3 @@
[Document-constructor-xml.xml]
type: testharness
- expected: TIMEOUT
+ expected: ERROR
diff --git a/tests/wpt/metadata/dom/nodes/Document-createElement.html.ini b/tests/wpt/metadata/dom/nodes/Document-createElement.html.ini
index 1d72b6f9b01..5d3819cffbd 100644
--- a/tests/wpt/metadata/dom/nodes/Document-createElement.html.ini
+++ b/tests/wpt/metadata/dom/nodes/Document-createElement.html.ini
@@ -1,110 +1,5 @@
[Document-createElement.html]
type: testharness
- [createElement(undefined) in XML document]
- expected: FAIL
-
- [createElement(null) in XML document]
- expected: FAIL
-
- [createElement("foo") in XML document]
- expected: FAIL
-
- [createElement("f1oo") in XML document]
- expected: FAIL
-
- [createElement("foo1") in XML document]
- expected: FAIL
-
- [createElement("fெ") in XML document]
- expected: FAIL
-
- [createElement("fooெ") in XML document]
- expected: FAIL
-
- [createElement(":") in XML document]
- expected: FAIL
-
- [createElement(":foo") in XML document]
- expected: FAIL
-
- [createElement("f:oo") in XML document]
- expected: FAIL
-
- [createElement("foo:") in XML document]
- expected: FAIL
-
- [createElement("f:o:o") in XML document]
- expected: FAIL
-
- [createElement("f::oo") in XML document]
- expected: FAIL
-
- [createElement("f::oo:") in XML document]
- expected: FAIL
-
- [createElement("foo:0") in XML document]
- expected: FAIL
-
- [createElement("foo:_") in XML document]
- expected: FAIL
-
- [createElement("foo:ெ") in XML document]
- expected: FAIL
-
- [createElement("foo:fooெ") in XML document]
- expected: FAIL
-
- [createElement("fooெ:foo") in XML document]
- expected: FAIL
-
- [createElement("xml") in XML document]
- expected: FAIL
-
- [createElement("xmlns") in XML document]
- expected: FAIL
-
- [createElement("xmlfoo") in XML document]
- expected: FAIL
-
- [createElement("xml:foo") in XML document]
- expected: FAIL
-
- [createElement("xmlns:foo") in XML document]
- expected: FAIL
-
- [createElement("xmlfoo:bar") in XML document]
- expected: FAIL
-
- [createElement("svg") in XML document]
- expected: FAIL
-
- [createElement("math") in XML document]
- expected: FAIL
-
- [createElement("FOO") in XML document]
- expected: FAIL
-
- [createElement("marK") in XML document]
- expected: FAIL
-
- [createElement("İnput") in XML document]
- expected: FAIL
-
- [createElement("ınput") in XML document]
- expected: FAIL
-
- [createElement("") in XML document]
- expected: FAIL
-
- [createElement("1foo") in XML document]
- expected: FAIL
-
- [createElement("1:foo") in XML document]
- expected: FAIL
-
- [createElement("fo o") in XML document]
- expected: FAIL
-
[createElement("ெfoo") in HTML document]
expected: FAIL
@@ -114,42 +9,6 @@
[createElement("ெfoo") in XHTML document]
expected: FAIL
- [createElement("}foo") in XML document]
- expected: FAIL
-
- [createElement("f}oo") in XML document]
- expected: FAIL
-
- [createElement("foo}") in XML document]
- expected: FAIL
-
- [createElement("\\ufffffoo") in XML document]
- expected: FAIL
-
- [createElement("f\\uffffoo") in XML document]
- expected: FAIL
-
- [createElement("foo\\uffff") in XML document]
- expected: FAIL
-
- [createElement("") in XML document]
- expected: FAIL
-
- [createElement("") in XML document]
- expected: FAIL
-
- [createElement("f","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: null,"","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: null,"f","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://example.com/","fo","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://example.com/","namespaceURI:,","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://example.com/","namespaceURI:a ","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://example.com/","namespaceURI:\\"","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "/","foo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "/","1foo","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "/","f1oo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "/","foo1",null]
- expected: FAIL
-
[createElementNS test in XML document: "/",":foo","NAMESPACE_ERR"]
expected: FAIL
- [createElementNS test in XML document: "/","f:oo",null]
- expected: FAIL
-
[createElementNS test in XML document: "/","foo:","NAMESPACE_ERR"]
expected: FAIL
- [createElementNS test in XML document: "/","xml",null]
- expected: FAIL
-
- [createElementNS test in XML document: "/","xmlns","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "/","xmlfoo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "/","xml:foo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "/","xmlns:foo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "/","xmlfoo:bar",null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","foo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","1foo","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","f1oo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","foo1",null]
- expected: FAIL
-
[createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace",":foo","NAMESPACE_ERR"]
expected: FAIL
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","f:oo",null]
- expected: FAIL
-
[createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","foo:","NAMESPACE_ERR"]
expected: FAIL
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","xml",null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","xmlns","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","xmlfoo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","xml:foo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","xmlns:foo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","xmlfoo:bar",null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespaces","xml:foo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/xml/1998/namespace","xml:foo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","foo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","1foo","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","f1oo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","foo1","NAMESPACE_ERR"]
- expected: FAIL
-
[createElementNS test in XML document: "http://www.w3.org/2000/xmlns/",":foo","NAMESPACE_ERR"]
expected: FAIL
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","f:oo","NAMESPACE_ERR"]
- expected: FAIL
-
[createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","foo:","NAMESPACE_ERR"]
expected: FAIL
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","xml","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","xmlns",null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","xmlfoo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","xml:foo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","xmlns:foo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","xmlfoo:bar","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","foo:xmlns","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","foo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","1foo","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","f1oo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","foo1",null]
- expected: FAIL
-
[createElementNS test in XML document: "foo:",":foo","NAMESPACE_ERR"]
expected: FAIL
- [createElementNS test in XML document: "foo:","f:oo",null]
- expected: FAIL
-
[createElementNS test in XML document: "foo:","foo:","NAMESPACE_ERR"]
expected: FAIL
- [createElementNS test in XML document: "foo:","xml",null]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","xmlns","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","xmlfoo",null]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","xml:foo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","xmlns:foo","NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","xmlfoo:bar",null]
- expected: FAIL
-
- [createElementNS test in XML document: "","","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: null,"","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: undefined,"","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://example.com/",null,null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://example.com/","","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "/",null,null]
- expected: FAIL
-
- [createElementNS test in XML document: "/","","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace",null,null]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/XML/1998/namespace","","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/",null,"NAMESPACE_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "http://www.w3.org/2000/xmlns/","","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:",null,null]
- expected: FAIL
-
- [createElementNS test in XML document: "foo:","","INVALID_CHARACTER_ERR"]
- expected: FAIL
-
[createElementNS test in HTML document: null,":foo","INVALID_CHARACTER_ERR"]
expected: FAIL
diff --git a/tests/wpt/metadata/dom/nodes/Node-contains-xml.xml.ini b/tests/wpt/metadata/dom/nodes/Node-contains-xml.xml.ini
index 61a340941bc..f6c851a0a86 100644
--- a/tests/wpt/metadata/dom/nodes/Node-contains-xml.xml.ini
+++ b/tests/wpt/metadata/dom/nodes/Node-contains-xml.xml.ini
@@ -1,3 +1,3 @@
[Node-contains-xml.xml]
type: testharness
- expected: TIMEOUT
+ expected: ERROR
diff --git a/tests/wpt/metadata/dom/nodes/Node-isEqualNode-xhtml.xhtml.ini b/tests/wpt/metadata/dom/nodes/Node-isEqualNode-xhtml.xhtml.ini
deleted file mode 100644
index 0690b87f5a6..00000000000
--- a/tests/wpt/metadata/dom/nodes/Node-isEqualNode-xhtml.xhtml.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[Node-isEqualNode-xhtml.xhtml]
- type: testharness
- [isEqualNode should return true when only the internal subsets of DocumentTypes differ.]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/dom/nodes/getElementsByClassName-10.xml.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-10.xml.ini
index 035e98966b9..e17dde06290 100644
--- a/tests/wpt/metadata/dom/nodes/getElementsByClassName-10.xml.ini
+++ b/tests/wpt/metadata/dom/nodes/getElementsByClassName-10.xml.ini
@@ -1,3 +1,3 @@
[getElementsByClassName-10.xml]
type: testharness
- expected: TIMEOUT
+ expected: ERROR
diff --git a/tests/wpt/metadata/dom/nodes/getElementsByClassName-11.xml.ini b/tests/wpt/metadata/dom/nodes/getElementsByClassName-11.xml.ini
index 46079f465b6..3dff9498eef 100644
--- a/tests/wpt/metadata/dom/nodes/getElementsByClassName-11.xml.ini
+++ b/tests/wpt/metadata/dom/nodes/getElementsByClassName-11.xml.ini
@@ -1,3 +1,3 @@
[getElementsByClassName-11.xml]
type: testharness
- expected: TIMEOUT
+ expected: ERROR