tor-browser

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

024.html (1885B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script src="/resources/testdriver.js"></script>
      5 <script src="/resources/testdriver-vendor.js"></script>
      6 <script src="/resources/testdriver-actions.js"></script>
      7 <script src="../resources/test-helper.js"></script>
      8 <head>
      9  <title>Dropping image on the root scrollbar of an object. No drop event should be sent.</title>
     10  <style type="text/css">
     11    p:first-child {
     12      padding-left: 1em;
     13    }
     14 
     15    object {
     16      height: 6em;
     17      width: 3em;
     18    }
     19 
     20    img {
     21      width: 5px;
     22      height: 5px;
     23    }
     24  </style>
     25  <script>
     26    function dragImage() {
     27      event.dataTransfer.effectAllowed = 'copy';
     28    }
     29  </script>
     30 </head>
     31 <body ondragenter="event.preventDefault()" ondragover="return false">
     32  <p><img
     33      src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEElEQVR42mNgaGD4D8YwBgAw9AX9Y9zBwwAAAABJRU5ErkJggg=="
     34      alt="PNG green pixel" ondragstart="dragImage()" /></p>
     35  <p>Drag little square above and drop it on vertical scrollbar. The drop event should not be sent, and the word PASS should not appear in the object.</p>
     36  <object type="application/xhtml+xml" data="helper-drop-vertical-scrollbar.xhtml">XHTML document</object>
     37  <script>
     38    async function test() {
     39      await new Promise(loaded => window.addEventListener("load", loaded));
     40 
     41      const img = document.querySelector('img');
     42      const object = document.querySelector('object');
     43      const objDoc = object.contentDocument || object.contentWindow.document;
     44      const div = objDoc.querySelector('div');
     45 
     46      dragDropTestNoDropEvent(img, div,
     47        'Dragging the image to the vertical object scrollbar should NOT trigger drop event',
     48        /*dragIframe=*/ null, object, DropPosition.RIGHT_SCROLLBAR);
     49    }
     50    test();
     51  </script>
     52 </body>
     53 </html>