Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: LayoutTests/http/tests/dom/document-contentType.html

Issue 151653004: Implemented Document.contentType (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:&quot;hello world&quot;;"></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>

Powered by Google App Engine
This is Rietveld 408576698