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