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

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 function get(url) {
11 return new Promise(function(resolve, reject) {
12 var xhr = new XMLHttpRequest();
13 var blob = new Blob(['Test Content']);
14 xhr.responseType = 'blob';
15 xhr.open('GET', url, true);
16 xhr.onreadystatechange = function() {
17 if (xhr.readyState === 4) {
18 resolve(xhr);
19 }
20 }
21 xhr.send(blob);
22 });
23 }
24
25 get('/dom/resources/send-mime-type.php?m=MULTIPART/MIXED').then(function(xhr) {
26 returnedMimeType = xhr.response.type;
27 shouldBeEqualToString("returnedMimeType", "multipart/mixed");
28
29 return get('/dom/resources/send-mime-type.php?m=Text/Plain');
30 }).then(function(xhr) {
31 returnedMimeType = xhr.response.type;
32 shouldBeEqualToString("returnedMimeType", "text/plain");
33 }).catch(function(reason) {
34 testFailed(String(reason));
35 }).then(finishJSTest, finishJSTest);
36
37 </script>
38 </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