OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <title>document.contentType</title> | |
3 <link rel="help" href="http://dom.spec.whatwg.org/#dom-document-contenttype"> | |
4 <script src="/js-test-resources/js-test.js"></script> | |
5 <body> | |
6 <p> | |
7 <iframe data-mt="text/css" src="../resources/dummy.css"></iframe> | |
8 <iframe data-mt="application/x-javascript" src="../resources/dummy.js"></iframe> | |
9 <iframe data-mt="text/html" src="../resources/dummy.html"></iframe> | |
10 <iframe data-mt="text/html" src="resources/send-mime-type.php"></iframe> | |
11 <iframe data-mt="text/xml" src="resources/send-mime-type.php?m=text/xml"></ifram e> | |
12 <iframe data-mt="text/xml" src="resources/send-mime-type.php?m=text/xml;charset= utf-8"></iframe> | |
13 <iframe data-mt="text/html" src="javascript:"hello world";"></iframe> | |
14 <iframe data-mt="text/html" src="about:blank"></iframe> | |
15 <iframe data-mt="text/plain" src="../resources/dummy.txt"></iframe> | |
16 <iframe data-mt="application/xml" src="../resources/dummy.xml"></iframe> | |
17 <iframe data-mt="image/bmp" src="../resources/square20.bmp"></iframe> | |
18 <iframe data-mt="image/gif" src="../resources/square20.gif"></iframe> | |
19 <iframe data-mt="image/jpeg" src="../resources/square20.jpg"></iframe> | |
20 <iframe data-mt="image/png" src="../resources/square20.png"></iframe> | |
21 </p> | |
22 <script> | |
23 var iframes; | |
24 onload = function() { | |
arv (Not doing code reviews)
2014/03/24 16:20:11
window.onload = function() {
| |
25 iframes = document.getElementsByTagName('iframe'); | |
26 for (var k = 0; iframes[k]; k++) { | |
27 shouldBeEqualToString('iframes[' + k + '].contentDocument.contentType', | |
28 iframes[k].dataset.mt); | |
29 shouldBeEqualToString('iframes[' + k + '].contentDocument.cloneNode(fals e).contentType', | |
30 iframes[k].dataset.mt); | |
31 } | |
32 }; | |
33 </script> | |
OLD | NEW |