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

Side by Side Diff: LayoutTests/fast/dom/document-contentType-data-uri.html

Issue 151653004: Implemented Document.contentType (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
(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="../../resources/js-test.js"></script>
5 <body>
6 <p>
7 <iframe data-mt="text/html"></iframe>
8 <iframe data-mt="text/xml"></iframe>
9 <iframe data-mt="application/xml"></iframe>
10 <iframe data-mt="image/svg+xml"></iframe>
11 </p>
12 <script>
13 window.jsTestIsAsync = true;
14
15 window.onmessage = function(e) {
16 if (e.data)
arv (Not doing code reviews) 2014/02/11 16:36:10 Wrong indentation
17 shouldBe('"' + e.data.obtained + '"', '"' + e.data.expected + '" ');
18 else
19 testFailed("Null message payload");
20
21 if (--expected_messages == 0)
22 finishJSTest();
23 };
24
25 var document_contents = '<script xmlns="http://www.w3.org/1999/xhtml">' +
arv (Not doing code reviews) 2014/02/11 16:36:10 no underscores in js
26 'parent.postMessage(' +
27 '{obtained: document.contentType, expected: "{0}"}, "*");' +
28 '<' + '/script>';
29
30 var iframes = document.body.getElementsByTagName('iframe');
arv (Not doing code reviews) 2014/02/11 16:36:10 document.querySelector('iframe') or document.getEl
31 for (var k = 0, f; f = iframes[k]; k++)
32 f.src = 'data:' + f.dataset.mt + ',' +
33 encodeURIComponent(document_contents.replace('{0}', f.dataset.mt ));
34
35 var expected_messages = iframes.length;
36
37 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698