aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-15 13:54:38 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-15 13:55:26 +0100
commit0edce6c41e9b193c7482334e313c4886c94702f1 (patch)
tree84f81f15f0e5e17913bcee1c37afbe5b7189f6ce /tests
parent7091cfe7b007926445bc76c84d9b7d03d1bc862e (diff)
parent0e4ad6198a43c621538a95cf6f1a6ff5ddfed596 (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/drawer/BLACKLIST2
-rw-r--r--tests/auto/drawer/tst_drawer.cpp11
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()