Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Unified Diff: LayoutTests/fast/events/touch/gesture/long-press-drag-drop-touch-editing-combined-in-iframe.html

Issue 14089009: Change long press behavior when touch text selection is enabled: (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: patch Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/touch/gesture/long-press-drag-drop-touch-editing-combined-in-iframe.html
diff --git a/LayoutTests/fast/events/touch/gesture/long-press-drag-drop-touch-editing-combined-in-iframe.html b/LayoutTests/fast/events/touch/gesture/long-press-drag-drop-touch-editing-combined-in-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..370408b180391f309384f8f01b2b22300fb6e62e
--- /dev/null
+++ b/LayoutTests/fast/events/touch/gesture/long-press-drag-drop-touch-editing-combined-in-iframe.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<iframe src="resources/drag-inside-iframe2.html" id=testIframe></iframe>
+<p>This test checks long press behavior inside an iframe when both touch drag/drop and touch editing are enabled.<br>
+1. Check that long press on a draggable element starts drag.<br>
+2. Check that long press on non-draggable text selects the text.<br>
+3. Check that long press on selected text starts drag.</p>
+<div id="text">Testing</div>
+<div id="draggableDivResult">FAIL</div>
+<div id="draggableTextResult">FAIL</div>
+<script>
+function onTextDivDrag() {
+ document.getElementById("draggableTextResult").innerHTML = "PASS";
+}
+function onDragStart() {
+ document.getElementById("draggableDivResult").innerHTML = "PASS";
+}
+function runTest()
+{
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ if (window.internals) {
+ internals.settings.setTouchDragDropEnabled(true);
+ internals.settings.setTouchEditingEnabled(true);
+ }
+
+ if (!window.eventSender)
+ return;
+ if (eventSender.gestureLongPress) {
+ eventSender.gestureLongPress(50, 50);
+ eventSender.gestureLongPress(20, 110);
+ eventSender.gestureLongPress(20, 110);
+ } else {
+ debug("gestureLongPress not implemented by this platform");
+ return;
+ }
+}
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698