| <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" /> |
| <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsetype-attribute" data-tested-assertations="following::ol[1]/li[4]"/> |
| <link rel="help" href="https://xhr.spec.whatwg.org/#the-response-attribute" data-tested-assertations="following::a[contains(@href,'#blob-response-entity-body')]/.." /> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <title>XMLHttpRequest: The response attribute: Blob data</title> |
| <script type="text/javascript"> |
| var xhr = new XMLHttpRequest(); |
| xhr.onreadystatechange = function() |
| assert_equals(xhr.response, xhr.response, |
| "Response should be cached"); |
| assert_true(blob instanceof Blob, 'blob is a Blob'); |
| var reader = new FileReader(); |
| reader.onload = function() |
| assert_equals(reader.result, content); |
| xhr.open("GET", "./resources/content.py?content=" + content, true); |
| xhr.responseType = "blob"; |