| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8" /> |
| 3 <!-- This test checks whether we compute pointer coordinates correctly for the |
| 4 dragstart, dragend, and drop events issued during drag-and-drop operations. |
| 5 This is the easy case. The more interesting situations, which involve |
| 6 iframes, are tested in similarly named files. --> |
| 7 <link rel="stylesheet" href="resources/event-mouse-coordinates.css" /> |
| 8 <script src="../../resources/testharness.js"></script> |
| 9 <script src="../../resources/testharnessreport.js"></script> |
| 10 <script src="resources/event-mouse-coordinates.js"></script> |
| 11 |
| 12 <p> |
| 13 Please drag the "Drag Me" box into the "Drop Here" box. |
| 14 </p> |
| 15 |
| 16 <div class="dragged box" draggable="true"> |
| 17 Drag Me |
| 18 </div> |
| 19 |
| 20 <div class="dropzone box"> |
| 21 Drop Here |
| 22 </div> |
| 23 |
| 24 <script> |
| 25 |
| 26 promise_test((t) => { |
| 27 const dragCenter = elementCenter(document.querySelector('.dragged')); |
| 28 const dropCenter = elementCenter(document.querySelector('.dropzone')); |
| 29 return runDragTest(t, { |
| 30 domRoot: document, |
| 31 frameOffset: { x: 0, y: 0 }, |
| 32 start: { client: dragCenter, page: { x: 250, y: 150 }}, |
| 33 end: { client: dropCenter, page: { x: 450, y: 350 }}, |
| 34 }); |
| 35 }, 'Dragging and dropping a DOM node in the top-level frame'); |
| 36 |
| 37 </script> |
| OLD | NEW |