Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=676619 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for the download attribute</title> |
michael@0 | 8 | |
michael@0 | 9 | </head> |
michael@0 | 10 | <body> |
michael@0 | 11 | <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=676619">Bug 676619</a> |
michael@0 | 12 | <br/> |
michael@0 | 13 | <ul> |
michael@0 | 14 | <li><a href="data:text/plain,Hey What are you looking for?" |
michael@0 | 15 | download="test.txt" id="link1">Download "test.txt"</a></li> |
michael@0 | 16 | <li><a href="video.ogg" |
michael@0 | 17 | download id="link2">Download "video.ogg"</a></li> |
michael@0 | 18 | <li><a href="video.ogg" |
michael@0 | 19 | download="just some video" id="link3">Download "just some video"</a></li> |
michael@0 | 20 | <li><a href="data:text/plain,test" |
michael@0 | 21 | download="with-target.txt" id="link4">Download "with-target.txt"</a></li> |
michael@0 | 22 | <li><a href="javascript:1+2" |
michael@0 | 23 | download="javascript.txt" id="link5">Download "javascript.txt"</a></li> |
michael@0 | 24 | </ul> |
michael@0 | 25 | <script> |
michael@0 | 26 | var li = document.createElement('li'); |
michael@0 | 27 | var a = document.createElement('a'); |
michael@0 | 28 | |
michael@0 | 29 | a.href = window.URL.createObjectURL(new Blob(["just text"])) ; |
michael@0 | 30 | a.download = "test.blob"; |
michael@0 | 31 | a.id = "link6"; |
michael@0 | 32 | a.textContent = 'Download "test.blob"'; |
michael@0 | 33 | |
michael@0 | 34 | li.appendChild(a); |
michael@0 | 35 | document.getElementsByTagName('ul')[0].appendChild(li); |
michael@0 | 36 | |
michael@0 | 37 | window.addEventListener("beforeunload", function (evt) { |
michael@0 | 38 | document.getElementById("unload-flag").textContent = "Fail"; |
michael@0 | 39 | }); |
michael@0 | 40 | </script> |
michael@0 | 41 | <ul> |
michael@0 | 42 | <li><a href="http://example.com/" |
michael@0 | 43 | download="example.com" id="link7" target="_blank">Download "example.com"</a></li> |
michael@0 | 44 | <ul> |
michael@0 | 45 | <div id="unload-flag">Okay</div> |
michael@0 | 46 | </body> |
michael@0 | 47 | </html> |