diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-01-31 16:05:47 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-02-01 11:16:10 +0000 |
commit | cd39a62bbd5c6e725547a696c297c46f929b3439 (patch) | |
tree | fc8c95be2063fb54435d49f12426db5febda2ad0 /tests/auto/qmltest | |
parent | ff1a728e957c36d566055caf922d160cbbbd7587 (diff) |
fix test_mouseDrag on RHEL 7.2
mouseDrag(item, x, y, dx, dy, button, modifiers, delay)
in TestCase.qml adds intermediate mouseMove events if dx or dy
is too large (specifically if Math.round(dx/3) > dragThreshold)
and that is affecting the outcome of this test. So we need to
stay under that threshold. The original point of this test is from
f52227f66a7af5692140ad036c06857cd2e7abcf / QTBUG-30188 :
when you drag past the dragThreshold, and the dragged Item "breaks loose"
and starts dragging, the initial distance that it jumps should be
equal to the dragThreshold, not greater. To test it, we need
to move a distance which is greater than the dragThreshold in
one move event, not break it up into smaller movements.
This reverts commit 432eb3344b0581ea1915840365b71376388a75b2.
Task-number: QTBUG-58025
Change-Id: Ib6da69fb465b58fde1bf8ba56c4c3a1cb584f698
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'tests/auto/qmltest')
-rw-r--r-- | tests/auto/qmltest/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/qmltest/events/tst_drag.qml | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/qmltest/BLACKLIST b/tests/auto/qmltest/BLACKLIST index fd796fcdb4..c38347b42a 100644 --- a/tests/auto/qmltest/BLACKLIST +++ b/tests/auto/qmltest/BLACKLIST @@ -9,5 +9,3 @@ linux linux [ListView::test_listInteractiveCurrentIndexEnforce] linux -[mouserelease::test_mouseDrag] -rhel-7.2 diff --git a/tests/auto/qmltest/events/tst_drag.qml b/tests/auto/qmltest/events/tst_drag.qml index ffdc94167c..ae77247a41 100644 --- a/tests/auto/qmltest/events/tst_drag.qml +++ b/tests/auto/qmltest/events/tst_drag.qml @@ -117,9 +117,9 @@ Rectangle{ name:"mouserelease" when:windowShown function test_mouseDrag() { - mouseDrag(container, 10, 10, 20, 30); - compare(container.x, 20 - util.dragThreshold - 1); - compare(container.y, 30 - util.dragThreshold - 1); + mouseDrag(container, 10, 10, util.dragThreshold * 2, util.dragThreshold * 3); + compare(container.x, util.dragThreshold - 1); + compare(container.y, util.dragThreshold * 2 - 1); } function test_doSomethingWhileDragging() { |