aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls')
-rw-r--r--tests/auto/controls/data/tst_slider.qml30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml
index 40bb389d..b02e77d0 100644
--- a/tests/auto/controls/data/tst_slider.qml
+++ b/tests/auto/controls/data/tst_slider.qml
@@ -229,7 +229,7 @@ TestCase {
var movedSpy = signalSpy.createObject(control, {target: control, signalName: "moved"})
verify(movedSpy.valid)
- mousePress(control, 0, 0, Qt.LeftButton)
+ mousePress(control, 0, control.height, Qt.LeftButton)
compare(pressedSpy.count, ++pressedCount)
compare(movedSpy.count, movedCount)
compare(control.pressed, true)
@@ -258,17 +258,17 @@ TestCase {
compare(control.value, 0.5)
compare(control.position, 0.5)
- mousePress(control, control.width, control.height, Qt.LeftButton)
+ mousePress(control, control.width, 0, Qt.LeftButton)
compare(pressedSpy.count, ++pressedCount)
- compare(movedSpy.count, movedCount)
+ compare(movedSpy.count, ++movedCount)
compare(control.pressed, true)
- compare(control.value, 0.5)
- compare(control.position, 0.5)
+ compare(control.value, data.live ? 1.0 : 0.5)
+ compare(control.position, 1.0)
// maximum on the right in horizontal vs. at the top in vertical
mouseMove(control, control.width * 2, -control.height, 0)
compare(pressedSpy.count, pressedCount)
- compare(movedSpy.count, ++movedCount)
+ compare(movedSpy.count, movedCount)
compare(control.pressed, true)
compare(control.value, data.live ? 1.0 : 0.5)
compare(control.position, 1.0)
@@ -617,8 +617,8 @@ TestCase {
compare(pressedSpy.count, 3)
compare(control.pressed, true)
compare(control.value, 0.0)
- compare(control.position, 0.0)
- compare(control.visualPosition, 1.0)
+ compare(control.position, 1.0)
+ compare(control.visualPosition, 0.0)
mouseMove(control, control.leftPadding + control.availableWidth * 0.5, control.height * 0.5, 0)
compare(pressedSpy.count, 3)
@@ -642,22 +642,22 @@ TestCase {
compare(control.visualPosition, 0.5)
}
- function test_snapMode_data() {
+ function test_snapMode_data(immediate) {
return [
{ tag: "NoSnap", snapMode: Slider.NoSnap, from: 0, to: 2, values: [0, 0, 0.25], positions: [0, 0.1, 0.1] },
{ tag: "SnapAlways (0..2)", snapMode: Slider.SnapAlways, from: 0, to: 2, values: [0.0, 0.0, 0.2], positions: [0.0, 0.1, 0.1] },
{ tag: "SnapAlways (1..3)", snapMode: Slider.SnapAlways, from: 1, to: 3, values: [1.0, 1.0, 1.2], positions: [0.0, 0.1, 0.1] },
- { tag: "SnapAlways (-1..1)", snapMode: Slider.SnapAlways, from: -1, to: 1, values: [0.0, 0.0, -0.8], positions: [0.5, 0.1, 0.1] },
- { tag: "SnapAlways (1..-1)", snapMode: Slider.SnapAlways, from: 1, to: -1, values: [0.0, 0.0, 0.8], positions: [0.5, 0.1, 0.1] },
+ { tag: "SnapAlways (-1..1)", snapMode: Slider.SnapAlways, from: -1, to: 1, values: [0.0, 0.0, -0.8], positions: [immediate ? 0.0 : 0.5, 0.1, 0.1] },
+ { tag: "SnapAlways (1..-1)", snapMode: Slider.SnapAlways, from: 1, to: -1, values: [0.0, 0.0, 0.8], positions: [immediate ? 0.0 : 0.5, 0.1, 0.1] },
{ tag: "SnapOnRelease (0..2)", snapMode: Slider.SnapOnRelease, from: 0, to: 2, values: [0.0, 0.0, 0.2], positions: [0.0, 0.1, 0.1] },
{ tag: "SnapOnRelease (1..3)", snapMode: Slider.SnapOnRelease, from: 1, to: 3, values: [1.0, 1.0, 1.2], positions: [0.0, 0.1, 0.1] },
- { tag: "SnapOnRelease (-1..1)", snapMode: Slider.SnapOnRelease, from: -1, to: 1, values: [0.0, 0.0, -0.8], positions: [0.5, 0.1, 0.1] },
- { tag: "SnapOnRelease (1..-1)", snapMode: Slider.SnapOnRelease, from: 1, to: -1, values: [0.0, 0.0, 0.8], positions: [0.5, 0.1, 0.1] }
+ { tag: "SnapOnRelease (-1..1)", snapMode: Slider.SnapOnRelease, from: -1, to: 1, values: [0.0, 0.0, -0.8], positions: [immediate ? 0.0 : 0.5, 0.1, 0.1] },
+ { tag: "SnapOnRelease (1..-1)", snapMode: Slider.SnapOnRelease, from: 1, to: -1, values: [0.0, 0.0, 0.8], positions: [immediate ? 0.0 : 0.5, 0.1, 0.1] }
]
}
function test_snapMode_mouse_data() {
- return test_snapMode_data()
+ return test_snapMode_data(true)
}
function test_snapMode_mouse(data) {
@@ -681,7 +681,7 @@ TestCase {
}
function test_snapMode_touch_data() {
- return test_snapMode_data()
+ return test_snapMode_data(false)
}
function test_snapMode_touch(data) {