diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/drawer/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/drawer/tst_drawer.cpp | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/auto/drawer/BLACKLIST b/tests/auto/drawer/BLACKLIST deleted file mode 100644 index 1b06b49c..00000000 --- a/tests/auto/drawer/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[touch] -windows diff --git a/tests/auto/drawer/tst_drawer.cpp b/tests/auto/drawer/tst_drawer.cpp index a523beed..4743a8cd 100644 --- a/tests/auto/drawer/tst_drawer.cpp +++ b/tests/auto/drawer/tst_drawer.cpp @@ -723,6 +723,11 @@ void tst_Drawer::touch() QQuickDrawer *drawer = window->property("drawer").value<QQuickDrawer*>(); QVERIFY(drawer); + QSignalSpy drawerOpenedSpy(drawer, SIGNAL(opened())); + QSignalSpy drawerClosedSpy(drawer, SIGNAL(closed())); + QVERIFY(drawerOpenedSpy.isValid()); + QVERIFY(drawerClosedSpy.isValid()); + struct TouchDeviceDeleter { static inline void cleanup(QTouchDevice *device) @@ -741,7 +746,8 @@ void tst_Drawer::touch() QTest::touchEvent(window, device.data()).move(0, QPoint(100, 100)); QTRY_COMPARE(drawer->position(), 0.5); QTest::touchEvent(window, device.data()).release(0, QPoint(100, 100)); - QTRY_COMPARE(drawer->position(), 1.0); + QVERIFY(drawerOpenedSpy.wait()); + QCOMPARE(drawer->position(), 1.0); // drag to close QTest::touchEvent(window, device.data()).press(0, QPoint(300, 100)); @@ -753,7 +759,8 @@ void tst_Drawer::touch() QTest::touchEvent(window, device.data()).move(0, QPoint(100, 100)); QTRY_COMPARE(drawer->position(), 0.5); QTest::touchEvent(window, device.data()).release(0, QPoint(100, 100)); - QTRY_COMPARE(drawer->position(), 0.0); + QVERIFY(drawerClosedSpy.wait()); + QCOMPARE(drawer->position(), 0.0); } void tst_Drawer::grabber() |