summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/nodes/Document-contentType/contentType/contenttype_javascripturi.html
blob: 956589615ac1755315fd9318b3c3cf074d6a3b27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<title>Javascript URI document.contentType === 'text/html'</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
async_test(function() {
  var iframe = document.createElement('iframe');
  iframe.addEventListener('load', this.step_func_done(function() {
    assert_equals(iframe.contentDocument.contentType, "text/html");
    assert_equals(iframe.contentDocument.documentElement.textContent, "text/html");
  }), false);
  iframe.src = "javascript:document.contentType";
  document.body.appendChild(iframe);
});
</script>