
  test(function() {
    var p = new DOMParser();
    var doc = p.parseFromString("<foo>", type);
    assert_false(doc instanceof XMLDocument, "Should not be XMLDocument");
  }, "XMLDocument interface for incorrectly parsed document with type " + type);

  test(function() {
    var p = new DOMParser();
    var doc = p.parseFromString(`
      <html>
        <head></head>
        <body>
          <script>document.x = 5;<\/script>
          <noscript><p>test1</p><p>test2</p></noscript>
        </body>
      </