| Index: content/test/data/download/download-attribute-blob.html
|
| diff --git a/content/test/data/download/download-attribute-blob.html b/content/test/data/download/download-attribute-blob.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b114c0db8b0602e7967edbabfafbe27a1de90e53
|
| --- /dev/null
|
| +++ b/content/test/data/download/download-attribute-blob.html
|
| @@ -0,0 +1,21 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<body>
|
| +<a download="suggested-filename" href="">link</a>
|
| +
|
| +<!-- In addition to initiating a download using a Blob URL, the script below
|
| + will immediately revoke the URL as soon as the click() event has been
|
| + dispatched. This tests that, in addition to handling the blob URL, that
|
| + proper lifetime extensions are in place to prevent the blob from going away
|
| + before the download is complete. -->
|
| +
|
| +<script>
|
| +var anchorElement = document.querySelector('a[download]');
|
| +var blob = new Blob(['hello world!'], {type: 'text/plain'});
|
| +var url = URL.createObjectURL(blob);
|
| +anchorElement.href = url;
|
| +anchorElement.click();
|
| +URL.revokeObjectURL(url);
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|