Index: LayoutTests/http/tests/dom/document-contentType.html |
diff --git a/LayoutTests/http/tests/dom/document-contentType.html b/LayoutTests/http/tests/dom/document-contentType.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c251595571c8e59d0ed90c87bbd26ef222fe8ca6 |
--- /dev/null |
+++ b/LayoutTests/http/tests/dom/document-contentType.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE html> |
+<title>document.contentType</title> |
+<link rel="help" href="http://dom.spec.whatwg.org/#dom-document-contenttype"> |
+<script src="/js-test-resources/js-test.js"></script> |
+<body> |
+<p> |
+<iframe data-mt="text/css" src="../resources/dummy.css"></iframe> |
+<iframe data-mt="application/x-javascript" src="../resources/dummy.js"></iframe> |
+<iframe data-mt="text/html" src="../resources/dummy.html"></iframe> |
+<iframe data-mt="text/html" src="resources/send-mime-type.php"></iframe> |
+<iframe data-mt="text/xml" src="resources/send-mime-type.php?m=text/xml"></iframe> |
+<iframe data-mt="text/xml" src="resources/send-mime-type.php?m=text/xml;charset=utf-8"></iframe> |
+<iframe data-mt="text/html" src="javascript:"hello world";"></iframe> |
+<iframe data-mt="text/html" src="about:blank"></iframe> |
+<iframe data-mt="text/plain" src="../resources/dummy.txt"></iframe> |
+<iframe data-mt="application/xml" src="../resources/dummy.xml"></iframe> |
+<iframe data-mt="image/bmp" src="../resources/square20.bmp"></iframe> |
+<iframe data-mt="image/gif" src="../resources/square20.gif"></iframe> |
+<iframe data-mt="image/jpeg" src="../resources/square20.jpg"></iframe> |
+<iframe data-mt="image/png" src="../resources/square20.png"></iframe> |
+</p> |
+<script> |
+var iframes; |
+onload = function() { |
arv (Not doing code reviews)
2014/03/24 16:20:11
window.onload = function() {
|
+ iframes = document.getElementsByTagName('iframe'); |
+ for (var k = 0; iframes[k]; k++) { |
+ shouldBeEqualToString('iframes[' + k + '].contentDocument.contentType', |
+ iframes[k].dataset.mt); |
+ shouldBeEqualToString('iframes[' + k + '].contentDocument.cloneNode(false).contentType', |
+ iframes[k].dataset.mt); |
+ } |
+}; |
+</script> |