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

Unified Diff: third_party/WebKit/LayoutTests/touchadjustment/touch-links-longpress.html

Issue 2247963002: Suppress drag and drop on links on touch screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase mac result so it uses the expected txt shared by all platforms Created 4 years, 4 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: third_party/WebKit/LayoutTests/touchadjustment/touch-links-longpress.html
diff --git a/third_party/WebKit/LayoutTests/touchadjustment/touch-links-longpress.html b/third_party/WebKit/LayoutTests/touchadjustment/touch-links-longpress.html
index 4d6c5d7b92ab6ad02cb106678812cb0b6ed1e5ba..c737d0cdae24e9bc3e870e618f82c73b48bffe74 100644
--- a/third_party/WebKit/LayoutTests/touchadjustment/touch-links-longpress.html
+++ b/third_party/WebKit/LayoutTests/touchadjustment/touch-links-longpress.html
@@ -16,7 +16,7 @@
<body>
<div id="sandbox">
-<p><a href="" id="link1">I</a> propose to consider <a href="" id="link2">the question</a>, "Can machines think?"<br>This should begin with definitions of the meaning of the terms "machine" and <a href="" id="link3">"think."</a></p>
+<p><a id="link1">I</a> propose to consider <a id="link2">the question</a>, "Can machines think?"<br>This should begin with definitions of the meaning of the terms "machine" and <a id="link3">"think."</a></p>
</div>
<p id='description'></p>
@@ -35,8 +35,15 @@
function testLongPress(touchpoint)
{
- if (eventSender.gestureLongPress)
+ if (eventSender.gestureLongPress) {
+ // Anchor tags without href are not treated as links, but as texts
+ // instead.
+ // The first long press selects the text. The second long press will
+ // initiate drag and drop.
eventSender.gestureLongPress(touchpoint.x, touchpoint.y, touchpoint.width, touchpoint.height);
+ eventSender.leapForward(100);
+ eventSender.gestureLongPress(touchpoint.x, touchpoint.y, touchpoint.width, touchpoint.height);
+ }
else
debug("gestureLongPress not implemented by this platform.");
}

Powered by Google App Engine
This is Rietveld 408576698