[kwin_wayland] Test that Seat gets destroyed when Display terminates
This commit is contained in:
parent
7e27f2fc0c
commit
515903cc33
1 changed files with 13 additions and 0 deletions
|
@ -34,6 +34,7 @@ private Q_SLOTS:
|
||||||
void testName();
|
void testName();
|
||||||
void testPointerButton();
|
void testPointerButton();
|
||||||
void testPointerPos();
|
void testPointerPos();
|
||||||
|
void testDestroyThroughTerminate();
|
||||||
};
|
};
|
||||||
|
|
||||||
static const QString s_socketName = QStringLiteral("kwin-wayland-server-seat-test-0");
|
static const QString s_socketName = QStringLiteral("kwin-wayland-server-seat-test-0");
|
||||||
|
@ -157,5 +158,17 @@ void TestWaylandServerSeat::testPointerPos()
|
||||||
QCOMPARE(posSpy.count(), 1);
|
QCOMPARE(posSpy.count(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TestWaylandServerSeat::testDestroyThroughTerminate()
|
||||||
|
{
|
||||||
|
Display display;
|
||||||
|
display.setSocketName(s_socketName);
|
||||||
|
display.start();
|
||||||
|
SeatInterface *seat = display.createSeat();
|
||||||
|
QSignalSpy destroyedSpy(seat, SIGNAL(destroyed(QObject*)));
|
||||||
|
QVERIFY(destroyedSpy.isValid());
|
||||||
|
display.terminate();
|
||||||
|
QVERIFY(!destroyedSpy.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
QTEST_MAIN(TestWaylandServerSeat)
|
QTEST_MAIN(TestWaylandServerSeat)
|
||||||
#include "test_seat.moc"
|
#include "test_seat.moc"
|
||||||
|
|
Loading…
Reference in a new issue