Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / touch / gesture / long-press-drag-drop-touch-editing-combined-in-iframe.html
blob3b71f90ae760dea91471dee9d563613a05349033
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <iframe src="resources/drag-inside-iframe2.html" id=testIframe></iframe>
8 <p>This test checks long press behavior inside an iframe when both touch drag/drop and touch editing are enabled.<br>
9 1. Check that long press on a draggable element starts drag.<br>
10 2. Check that long press on non-draggable text selects the text.<br>
11 3. Check that long press on selected text starts drag.</p>
12 <div id="text">Testing</div>
13 <div id="draggableDivResult">FAIL</div>
14 <div id="draggableTextResult">FAIL</div>
15 <script>
16 function onTextDivDrag() {
17 document.getElementById("draggableTextResult").innerHTML = "PASS";
19 function onDragStart() {
20 document.getElementById("draggableDivResult").innerHTML = "PASS";
22 function runTest()
24 if (window.testRunner)
25 testRunner.dumpAsText();
27 if (window.internals) {
28 internals.settings.setTouchDragDropEnabled(true);
29 internals.settings.setTouchEditingEnabled(true);
32 if (!window.eventSender)
33 return;
34 if (eventSender.gestureLongPress) {
35 eventSender.gestureLongPress(50, 50);
36 eventSender.gestureLongPress(20, 110);
37 eventSender.gestureLongPress(20, 110);
38 } else {
39 debug("gestureLongPress not implemented by this platform");
40 return;
43 </script>
44 </body>
45 </html>