Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / drag-display-none-element.html
blobe24503ca81b6d876c4d9591c764495eb6f1e60b5
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 #dragme:-webkit-drag
7 display: none;
9 </style>
10 <script>
11 function runTest()
13 var dragme = document.getElementById('dragme');
14 dragme.addEventListener('dragend', function () {
15 if (window.testRunner)
16 testRunner.notifyDone();
17 document.getElementById('console').appendChild(document.createTextNode('PASS'));
18 dragme.style.display = "none";
19 });
21 if (!window.testRunner)
22 return;
24 testRunner.waitUntilDone();
25 testRunner.dumpAsText();
27 eventSender.mouseMoveTo(dragme.offsetLeft + dragme.offsetWidth / 2, dragme.offsetTop + dragme.offsetHeight / 2);
28 eventSender.mouseDown();
29 eventSender.leapForward(100);
30 eventSender.mouseMoveTo(0, 0);
31 eventSender.mouseUp();
33 window.addEventListener('load', runTest);
34 </script>
35 </head>
36 <body>
37 <div id="dragme" draggable="true">To test, try dragging this div around. It shouldn't crash, the div should disappear and PASS should appear.</div>
38 <div id="console"></div>
39 </body>
40 </html>