| Index: LayoutTests/http/tests/xmlhttprequest/response-blob-mimetype.html
|
| diff --git a/LayoutTests/http/tests/xmlhttprequest/response-blob-mimetype.html b/LayoutTests/http/tests/xmlhttprequest/response-blob-mimetype.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ee05797567ff4e6c8ac35a1c337fc12f9699cd2e
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/xmlhttprequest/response-blob-mimetype.html
|
| @@ -0,0 +1,38 @@
|
| +<!DOCTYPE html>
|
| +<body>
|
| +
|
| +<script src="/js-test-resources/js-test.js"></script>
|
| +
|
| +<script>
|
| +description('This tests that XMLHttpRequest lowers the MIME Type when creates a response blob.');
|
| +window.jsTestIsAsync = true;
|
| +
|
| +function get(url) {
|
| + return new Promise(function(resolve, reject) {
|
| + var xhr = new XMLHttpRequest();
|
| + var blob = new Blob(['Test Content']);
|
| + xhr.responseType = 'blob';
|
| + xhr.open('GET', url, true);
|
| + xhr.onreadystatechange = function() {
|
| + if (xhr.readyState === 4) {
|
| + resolve(xhr);
|
| + }
|
| + }
|
| + xhr.send(blob);
|
| + });
|
| +}
|
| +
|
| +get('/dom/resources/send-mime-type.php?m=MULTIPART/MIXED').then(function(xhr) {
|
| + returnedMimeType = xhr.response.type;
|
| + shouldBeEqualToString("returnedMimeType", "multipart/mixed");
|
| +
|
| + return get('/dom/resources/send-mime-type.php?m=Text/Plain');
|
| +}).then(function(xhr) {
|
| + returnedMimeType = xhr.response.type;
|
| + shouldBeEqualToString("returnedMimeType", "text/plain");
|
| +}).catch(function(reason) {
|
| + testFailed(String(reason));
|
| +}).then(finishJSTest, finishJSTest);
|
| +
|
| +</script>
|
| +</body>
|
|
|