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

Unified Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.html

Issue 705733002: Make sure that selection is cleared after tapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.html
diff --git a/LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.html b/LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.html
new file mode 100644
index 0000000000000000000000000000000000000000..e617c5ef4a3134a3a688cc92b778243db8f350ee
--- /dev/null
+++ b/LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="../../../../resources/js-test.js"></script>
+<body>
Rick Byers 2014/11/13 20:09:01 nit: omit <body> (it's unnecessary and you have no
+<div id="dragme">Make Selection Here</div>
+<p id="description"></p>
Rick Byers 2014/11/13 20:09:01 nit: you can also omit this <p> and the blow conso
+<div id="console"></div>
+<script>
+description("This tests if the selection is reset after tapping of gesture");
+
+var dragme = document.getElementById('dragme');
+var reselt;
Rick Byers 2014/11/13 20:09:01 note this is mis-spelled.
+if (window.eventSender) {
+ var startX = dragme.offsetLeft;
+ var startY = dragme.offsetTop;
+
+ var endX = dragme.offsetLeft + dragme.offsetWidth;
+ var endY = dragme.offsetTop + dragme.offsetHeight;
+
+ eventSender.mouseMoveTo(startX, startY);
+ eventSender.mouseDown();
+ eventSender.leapForward(200);
+ eventSender.mouseMoveTo(endX, endY);
+ eventSender.mouseUp();
Rick Byers 2014/11/13 20:09:01 Could this test be simpler by setting the selectio
+
+ eventSender.gestureTap(startX + dragme.offsetWidth / 2, startY + dragme.offsetHeight / 2);
Rick Byers 2014/11/13 20:09:01 we're trying to start to enforce (with ASSERTs) th
+
+ result = window.getSelection().rangeCount > 0 ? 'FAILED' : 'SUCCESS';
Rick Byers 2014/11/13 20:09:01 no need for the temporary 'result'. Just do a sho
+ shouldBeEqualToString('result', 'SUCCESS');
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698