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

Unified Diff: LayoutTests/svg/text/resources/SelectionTestCase.js

Issue 1108033002: Fix "mouse" position selection in svg/text/resources/SelectionTestCase.js (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/text/resources/SelectionTestCase.js
diff --git a/LayoutTests/svg/text/resources/SelectionTestCase.js b/LayoutTests/svg/text/resources/SelectionTestCase.js
index fe43dcf63bb3174b7a11ccb55a4341d929e13163..926bc658ff69108d865843c6323e112a4df7a844 100644
--- a/LayoutTests/svg/text/resources/SelectionTestCase.js
+++ b/LayoutTests/svg/text/resources/SelectionTestCase.js
@@ -69,6 +69,11 @@ function selectRange(id, start, end, expectedText) {
var absStartPos = toAbsoluteCoordinates(startPos, element);
var absEndPos = toAbsoluteCoordinates(endPos, element);
+ // Round the points "inwards" to avoid being affected by the truncation
+ // taking place in eventSender.mouseMoveTo(...).
+ absStartPos.x = Math.ceil(absStartPos.x);
hyunjunekim2 2015/04/28 02:22:07 Could you change like this? absStartPos.x = Math.c
pdr. 2015/04/28 03:08:39 Why?
+ absEndPos.x = Math.floor(absEndPos.x);
+
// Move to selection origin and hold down mouse
eventSender.mouseMoveTo(absStartPos.x, absStartPos.y);
eventSender.mouseDown();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698