
  assert_equals(doc.characterSet, "UTF-8", "characterSet");
  assert_equals(doc.charset, "UTF-8", "charset");
  assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding");
  assert_equals(doc.contentType, contentType, "contentType");
  assert_equals(doc.location, null, "location");
}

var allowedTypes = ["text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"];

allowedTypes.forEach(function(type) {
  test(function() {
    var p = new DOMParser();
    var doc = p.parseFromString("<foo/>", t