<!DOCTYPE html>
<title>document.contentType</title>
<link rel="help" href="https://dom.spec.whatwg.org/#dom-document-contenttype">
<script src="../../resources/js-test.js"></script>
<body>
<script>
var doc = document.implementation.createHTMLDocument('f');
shouldBe('doc.contentType', '"text/html"');
doc = document.implementation.createDocument(null, 'root', null);
shouldBe('doc.contentType', '"application/xml"');
</script>