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

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: rebase and fixing tests on windows Created 6 years, 8 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)
17 shouldBe('"' + e.data.obtained + '"', '"' + e.data.expected + '"');
18 else
19 testFailed("Null message payload");
20
21 if (--expectedMessagesCount == 0)
22 finishJSTest();
23 };
24
25 var documentContents = '<script xmlns="http://www.w3.org/1999/xhtml">' +
26 'parent.postMessage(' +
27 '{obtained: document.contentType, expected: "{0}"}, "*");' +
28 '<' + '/script>';
29
30 var iframes = document.getElementsByTagName('iframe');
31 for (var k = 0, f; f = iframes[k]; k++) {
32 f.src = 'data:' + f.dataset.mt + ',' +
33 encodeURIComponent(documentContents.replace('{0}', f.dataset.mt));
34 }
35
36 var expectedMessagesCount = iframes.length;
37
38 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698