tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

005.html (1552B)


      1 <!doctype html>
      2 <title>File drag and tab change during prompt for upload</title>
      3 <style>
      4  body > div {
      5    height: 200px;
      6    width: 200px;
      7    background-color: orange;
      8    display: inline-block;
      9  }
     10 </style>
     11 <script type="text/javascript">
     12 window.onload = function () {
     13  var orange = document.getElementsByTagName('div')[0];
     14  orange.ondragenter = orange.ondragover = function (e) {
     15    e.preventDefault();
     16  };
     17  orange.ondrop = function (e) {
     18    e.preventDefault();
     19    document.getElementsByTagName('ol')[0].innerHTML = ( e.dataTransfer.files[0] && e.dataTransfer.files[0].name );
     20  };
     21 };
     22 </script>
     23 <div draggable="true"></div>
     24 
     25 <ol>
     26  <li>Save <a href="file1.txt">file1.txt</a> and <a href="file2.txt">file2.txt</a> onto your computer.</li>
     27  <li>Open this page in two separate tabs, and start on tab #1.</li>
     28  <li>Drag file1.txt from your computer onto the orange square.</li>
     29  <li>A prompt should appear. Do not dismiss it. If a prompt does not appear, ignore any further steps, and check the tests in ../../file/</li>
     30  <li>Click the other tab to focus it (or focus it in whatever way works). If you cannot change tabs, PASS, and ignore any further steps.</li>
     31  <li>Drag file2.txt from your computer onto the orange square. Fail if this text (but not the orange square) is replaced without any prompt.</li>
     32  <li>If a prompt appears, do not dismiss it.</li>
     33  <li>Return to tab #1.</li>
     34  <li>Accept the prompt. Fail if it cannot be accepted. Pass if this text (but not the orange square) is replaced with the text: file1.txt</li>
     35 </ol>