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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/response-blob-mimetype.html

Issue 887693002: Lower Received MIME type when creating a response blob. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/response-blob-mimetype-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <body>
3
4 <script src="/js-test-resources/js-test.js"></script>
5
6 <script>
7 description('This tests that XMLHttpRequest lowers the MIME Type when creates a response blob.');
8 window.jsTestIsAsync = true;
9
10
tyoshino (SeeGerritForStatus) 2015/02/09 05:39:45 1 blank line
11 function get(url) {
12 return new Promise(function(resolve, reject) {
13 var xhr = new XMLHttpRequest();
14 var blob = new Blob(['Test Content']);
15 xhr.responseType = 'blob';
16 xhr.open('GET', url, true);
17 xhr.onreadystatechange = function() {
18 if (xhr.readyState === 4) {
19 resolve(xhr);
20 }
21 }
22 xhr.send(blob);
23 });
24 }
25
26 get('/dom/resources/send-mime-type.php?m=MULTIPART/MIXED').then(function(xhr) {
27 returnedMimeType = xhr.response.type;
28 shouldBeEqualToString("returnedMimeType", "multipart/mixed");
29
30 return get('/dom/resources/send-mime-type.php?m=Text/Plain');
31 }).then(function(xhr) {
32 returnedMimeType = xhr.response.type;
33 shouldBeEqualToString("returnedMimeType", "text/plain");
34
tyoshino (SeeGerritForStatus) 2015/02/09 05:39:45 remove this blank line
35 }).catch(function(reason) {
36 testFailed(String(reason));
37 }).then(finishJSTest, finishJSTest);
38
39 </script>
40 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/response-blob-mimetype-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698