diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-06-04 09:36:56 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-06-06 07:01:31 +0000 |
commit | 6b23b6b4507b42a96fb3fb7d2315523f54ce1ac0 (patch) | |
tree | b31b03313fdb87cc2f6825f43370ec0eae692dc3 /tests/auto/controls | |
parent | 90a0d4023206cfeed1bec43cb11e026ff0379d3d (diff) |
Attempt to fix tst_controls::ComboBox flakiness
QQuickWindowPrivate::flushFrameSynchronousEvents() is a real trouble
maker in auto tests, because it keeps delivering spurious hover events
based on the last mouse position from earlier test functions and test
cases.
Task-number: QTBUG-61225
Change-Id: I5a8d40a01e3919033f74b26357505f2b514a3281
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls')
-rw-r--r-- | tests/auto/controls/data/tst_combobox.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index 95da47d7..07e49e70 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -80,6 +80,14 @@ TestCase { } } + function init() { + // QTBUG-61225: Move the mouse away to avoid QQuickWindowPrivate::flushFrameSynchronousEvents() + // delivering interfering hover events based on the last mouse position from earlier tests. For + // example, ComboBox::test_activation() kept receiving hover events for the last mouse position + // from CheckDelegate::test_checked(). + mouseMove(testCase, testCase.width - 1, testCase.height - 1) + } + function test_defaults() { var control = createTemporaryObject(comboBox, testCase) verify(control) |