UbuntuTestCase.mouseMoveSlowly does not work for negative distance
Bug #1343334 reported by
Renato Araujo Oliveira Filho
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Released
|
Critical
|
Zsombor Egri | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
New
|
Undecided
|
Unassigned | ||
ubuntu-ui-toolkit (Ubuntu RTM) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Trying to use mouseMoveSlowly to simulate a mouse move from right to left does not work.
And moving in the y is broken.
Related branches
lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/elephantMoveSlowly
- PS Jenkins bot: Approve (continuous-integration)
- Zsombor Egri: Approve
-
Diff: 55 lines (+23/-22)1 file modifiedmodules/Ubuntu/Test/UbuntuTestCase.qml (+23/-22)
Changed in ubuntu-ui-toolkit: | |
importance: | Undecided → Critical |
status: | New → Triaged |
assignee: | nobody → Zsombor Egri (zsombi) |
tags: | added: rtm14 |
Changed in ubuntu-ui-toolkit: | |
milestone: | none → 10.24 |
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Fix Released |
Changed in ubuntu-ui-toolkit (Ubuntu RTM): | |
status: | New → Fix Released |
To post a comment you must log in.
This should fix the problem.
function mouseMoveSlowly (item, x, y, dx, dy, steps, stepdelay) {
mouseMove( item, x, y);
var abs_dx = Math.abs(dx)
var abs_dy = Math.abs(dy)
var step_dx = dx / steps;
var step_dy = dy /steps;
var ix = 0;
var iy = 0;
for (var step=0; step < steps; step++) {
ix += step_dx;
iy += step_dy;
mouseMove( item, x + ix, y + iy, stepdelay);
if (ix < abs_dx) {
}
if (iy < abs_dy) {
}
}
}