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

Side by Side Diff: content/test/data/download/download-attribute-blob.html

Issue 1829413002: [Downloads] Retain a BlobDataHandle in DownloadUrlParameters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <a download="suggested-filename" href="">link</a>
5
6 <!-- In addition to initiating a download using a Blob URL, the script below
7 will immediately revoke the URL as soon as the click() event has been
8 dispatched. This tests that, in addition to handling the blob URL, that
9 proper lifetime extensions are in place to prevent the blob from going away
10 before the download is complete. -->
11
12 <script>
13 var anchorElement = document.querySelector('a[download]');
14 var blob = new Blob(['hello world!'], {type: 'text/plain'});
15 var url = URL.createObjectURL(blob);
16 anchorElement.href = url;
17 anchorElement.click();
18 URL.revokeObjectURL(url);
19 </script>
20 </body>
21 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698