1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../../../resources/js-test.js"></script>
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>
16 function onTextDivDrag() {
17 document
.getElementById("draggableTextResult").innerHTML
= "PASS";
19 function onDragStart() {
20 document
.getElementById("draggableDivResult").innerHTML
= "PASS";
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
)
34 if (eventSender
.gestureLongPress
) {
35 eventSender
.gestureLongPress(50, 50);
36 eventSender
.gestureLongPress(20, 110);
37 eventSender
.gestureLongPress(20, 110);
39 debug("gestureLongPress not implemented by this platform");