Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/lockscreen.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
57 | 57 | | |||
58 | class LockScreenTest : public QObject | 58 | class LockScreenTest : public QObject | ||
59 | { | 59 | { | ||
60 | Q_OBJECT | 60 | Q_OBJECT | ||
61 | private Q_SLOTS: | 61 | private Q_SLOTS: | ||
62 | void initTestCase(); | 62 | void initTestCase(); | ||
63 | void init(); | 63 | void init(); | ||
64 | void cleanup(); | 64 | void cleanup(); | ||
65 | void testStackingOrder(); | ||||
65 | void testPointer(); | 66 | void testPointer(); | ||
66 | void testPointerButton(); | 67 | void testPointerButton(); | ||
67 | void testPointerAxis(); | 68 | void testPointerAxis(); | ||
68 | void testKeyboard(); | 69 | void testKeyboard(); | ||
69 | void testScreenEdge(); | 70 | void testScreenEdge(); | ||
70 | void testEffects(); | 71 | void testEffects(); | ||
71 | void testEffectsKeyboard(); | 72 | void testEffectsKeyboard(); | ||
72 | void testEffectsKeyboardAutorepeat(); | 73 | void testEffectsKeyboardAutorepeat(); | ||
▲ Show 20 Lines • Show All 145 Lines • ▼ Show 20 Line(s) | 210 | { | |||
218 | Cursor::setPos(QPoint(640, 512)); | 219 | Cursor::setPos(QPoint(640, 512)); | ||
219 | } | 220 | } | ||
220 | 221 | | |||
221 | void LockScreenTest::cleanup() | 222 | void LockScreenTest::cleanup() | ||
222 | { | 223 | { | ||
223 | Test::destroyWaylandConnection(); | 224 | Test::destroyWaylandConnection(); | ||
224 | } | 225 | } | ||
225 | 226 | | |||
227 | void LockScreenTest::testStackingOrder() | ||||
228 | { | ||||
229 | // This test verifies that the lockscreen greeter is placed above other windows. | ||||
230 | | ||||
231 | QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); | ||||
232 | QVERIFY(clientAddedSpy.isValid()); | ||||
233 | | ||||
234 | LOCK | ||||
235 | QVERIFY(clientAddedSpy.wait()); | ||||
236 | | ||||
237 | AbstractClient *client = clientAddedSpy.first().first().value<AbstractClient *>(); | ||||
238 | QVERIFY(client); | ||||
239 | QVERIFY(client->isLockScreen()); | ||||
240 | QCOMPARE(client->layer(), UnmanagedLayer); | ||||
241 | | ||||
242 | UNLOCK | ||||
243 | } | ||||
244 | | ||||
226 | void LockScreenTest::testPointer() | 245 | void LockScreenTest::testPointer() | ||
227 | { | 246 | { | ||
228 | using namespace KWayland::Client; | 247 | using namespace KWayland::Client; | ||
229 | 248 | | |||
230 | QScopedPointer<Pointer> pointer(m_seat->createPointer()); | 249 | QScopedPointer<Pointer> pointer(m_seat->createPointer()); | ||
231 | QVERIFY(!pointer.isNull()); | 250 | QVERIFY(!pointer.isNull()); | ||
232 | QSignalSpy enteredSpy(pointer.data(), &Pointer::entered); | 251 | QSignalSpy enteredSpy(pointer.data(), &Pointer::entered); | ||
233 | QVERIFY(enteredSpy.isValid()); | 252 | QVERIFY(enteredSpy.isValid()); | ||
▲ Show 20 Lines • Show All 535 Lines • Show Last 20 Lines |