aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_scrollbar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls/data/tst_scrollbar.qml')
-rw-r--r--tests/auto/controls/data/tst_scrollbar.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_scrollbar.qml b/tests/auto/controls/data/tst_scrollbar.qml
index d7bc792d..27d055da 100644
--- a/tests/auto/controls/data/tst_scrollbar.qml
+++ b/tests/auto/controls/data/tst_scrollbar.qml
@@ -288,4 +288,28 @@ TestCase {
container.destroy()
}
+
+ function test_hover_data() {
+ return [
+ { tag: "enabled", hoverEnabled: true },
+ { tag: "disabled", hoverEnabled: false },
+ ]
+ }
+
+ function test_hover(data) {
+ var control = scrollBar.createObject(testCase, {hoverEnabled: data.hoverEnabled})
+ verify(control)
+
+ compare(control.hovered, false)
+
+ mouseMove(control)
+ compare(control.hovered, data.hoverEnabled)
+ compare(control.active, data.hoverEnabled)
+
+ mouseMove(control, -1, -1)
+ compare(control.hovered, false)
+ compare(control.active, false)
+
+ control.destroy()
+ }
}