DOMParser: Tweak tests for interface of returned document See https://github.com/whatwg/html/issues/11372. This matches all browsers.
diff --git a/domparsing/DOMParser-parseFromString-html.html b/domparsing/DOMParser-parseFromString-html.html index 86e516d..9834d3f 100644 --- a/domparsing/DOMParser-parseFromString-html.html +++ b/domparsing/DOMParser-parseFromString-html.html
@@ -25,6 +25,10 @@ }, 'Parsing of id attribute'); test(function() { + assert_true(doc instanceof HTMLDocument); +}, 'should be an HTMLDocument'); + +test(function() { assert_equals(doc.contentType, "text/html") }, 'contentType');
diff --git a/domparsing/DOMParser-parseFromString-xml.html b/domparsing/DOMParser-parseFromString-xml.html index b07bb3d..c7f6b89 100644 --- a/domparsing/DOMParser-parseFromString-xml.html +++ b/domparsing/DOMParser-parseFromString-xml.html
@@ -33,7 +33,7 @@ test(function() { var p = new DOMParser(); var doc = p.parseFromString("<foo/>", type); - assert_false(doc instanceof XMLDocument, "Should not be XMLDocument"); + assert_true(doc instanceof XMLDocument, "Should be XMLDocument"); }, "XMLDocument interface for correctly parsed document with type " + type); test(function() { @@ -48,7 +48,7 @@ test(function() { var p = new DOMParser(); var doc = p.parseFromString("<foo>", type); - assert_false(doc instanceof XMLDocument, "Should not be XMLDocument"); + assert_true(doc instanceof XMLDocument, "Should be XMLDocument"); }, "XMLDocument interface for incorrectly parsed document with type " + type); test(function() {