browser/base/content/test/general/download_page.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial