Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / drop-generate-user-gesture.html
blob9f1a2fbe6b6b9c36da78a46174ba07fb926b72ef
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <style>
6 #div1 {width:350px;height:70px;padding:10px;border:1px solid #aaaaaa;}
7 #drag1{width:170px;height:36px;display:block;}
8 </style>
9 </head>
10 <body>
11 <p>Drag the following text into the rectangle:</p>
12 <div id="div1"></div>
13 <br>
14 <div id="drag1" draggable="true">Drag me</div>
15 <pre id="console"></pre>
16 <script>
17 window.jsTestIsAsync = true;
18 description("Test that drop event generates user gesture");
20 if (window.testRunner) {
21 testRunner.setCloseRemainingWindowsWhenComplete(true);
22 testRunner.setCanOpenWindows();
23 testRunner.setPopupBlockingEnabled(true);
26 function drop() {
27 // Consume user gesture.
28 shouldBeDefined("window.open('about:blank')");
29 finishJSTest();
32 function allowDrop(ev) {
33 ev.preventDefault();
36 document.getElementById("div1").addEventListener("dragover", allowDrop);
37 document.getElementById("div1").addEventListener("drop", drop);
39 if (window.eventSender) {
40 var drag = document.querySelector("#drag1");
41 eventSender.mouseMoveTo(drag.offsetLeft + 10, drag.offsetTop + 5);
42 eventSender.mouseDown();
43 eventSender.leapForward(100);
44 eventSender.mouseMoveTo(drag.offsetLeft + 10, drag.offsetTop - 30);
45 eventSender.mouseUp();
47 </script>
48 </body>
49 </html>