Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/pointer_constraints_test.cpp
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | 113 | { | |||
---|---|---|---|---|---|
127 | QTest::newRow("XdgShellV5 - bottomLeft") << Test::ShellSurfaceType::XdgShellV5 << bottomLeft << -1 << 1; | 127 | QTest::newRow("XdgShellV5 - bottomLeft") << Test::ShellSurfaceType::XdgShellV5 << bottomLeft << -1 << 1; | ||
128 | QTest::newRow("XdgShellV5 - bottomRight") << Test::ShellSurfaceType::XdgShellV5 << bottomRight << 1 << 1; | 128 | QTest::newRow("XdgShellV5 - bottomRight") << Test::ShellSurfaceType::XdgShellV5 << bottomRight << 1 << 1; | ||
129 | QTest::newRow("XdgShellV5 - topLeft") << Test::ShellSurfaceType::XdgShellV5 << topLeft << -1 << -1; | 129 | QTest::newRow("XdgShellV5 - topLeft") << Test::ShellSurfaceType::XdgShellV5 << topLeft << -1 << -1; | ||
130 | QTest::newRow("XdgShellV5 - topRight") << Test::ShellSurfaceType::XdgShellV5 << topRight << 1 << -1; | 130 | QTest::newRow("XdgShellV5 - topRight") << Test::ShellSurfaceType::XdgShellV5 << topRight << 1 << -1; | ||
131 | QTest::newRow("XdgShellV6 - bottomLeft") << Test::ShellSurfaceType::XdgShellV6 << bottomLeft << -1 << 1; | 131 | QTest::newRow("XdgShellV6 - bottomLeft") << Test::ShellSurfaceType::XdgShellV6 << bottomLeft << -1 << 1; | ||
132 | QTest::newRow("XdgShellV6 - bottomRight") << Test::ShellSurfaceType::XdgShellV6 << bottomRight << 1 << 1; | 132 | QTest::newRow("XdgShellV6 - bottomRight") << Test::ShellSurfaceType::XdgShellV6 << bottomRight << 1 << 1; | ||
133 | QTest::newRow("XdgShellV6 - topLeft") << Test::ShellSurfaceType::XdgShellV6 << topLeft << -1 << -1; | 133 | QTest::newRow("XdgShellV6 - topLeft") << Test::ShellSurfaceType::XdgShellV6 << topLeft << -1 << -1; | ||
134 | QTest::newRow("XdgShellV6 - topRight") << Test::ShellSurfaceType::XdgShellV6 << topRight << 1 << -1; | 134 | QTest::newRow("XdgShellV6 - topRight") << Test::ShellSurfaceType::XdgShellV6 << topRight << 1 << -1; | ||
135 | QTest::newRow("XdgWmBase - bottomLeft") << Test::ShellSurfaceType::XdgShellStable << bottomLeft << -1 << 1; | ||||
136 | QTest::newRow("XdgWmBase - bottomRight") << Test::ShellSurfaceType::XdgShellStable << bottomRight << 1 << 1; | ||||
137 | QTest::newRow("XdgWmBase - topLeft") << Test::ShellSurfaceType::XdgShellStable << topLeft << -1 << -1; | ||||
138 | QTest::newRow("XdgWmBase - topRight") << Test::ShellSurfaceType::XdgShellStable << topRight << 1 << -1; | ||||
135 | } | 139 | } | ||
136 | 140 | | |||
137 | void TestPointerConstraints::testConfinedPointer() | 141 | void TestPointerConstraints::testConfinedPointer() | ||
138 | { | 142 | { | ||
139 | // this test sets up a Surface with a confined pointer | 143 | // this test sets up a Surface with a confined pointer | ||
140 | // simple interaction test to verify that the pointer gets confined | 144 | // simple interaction test to verify that the pointer gets confined | ||
141 | QScopedPointer<Surface> surface(Test::createSurface()); | 145 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
142 | QFETCH(Test::ShellSurfaceType, type); | 146 | QFETCH(Test::ShellSurfaceType, type); | ||
▲ Show 20 Lines • Show All 152 Lines • ▼ Show 20 Line(s) | |||||
295 | 299 | | |||
296 | void TestPointerConstraints::testLockedPointer_data() | 300 | void TestPointerConstraints::testLockedPointer_data() | ||
297 | { | 301 | { | ||
298 | QTest::addColumn<Test::ShellSurfaceType>("type"); | 302 | QTest::addColumn<Test::ShellSurfaceType>("type"); | ||
299 | 303 | | |||
300 | QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell; | 304 | QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell; | ||
301 | QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5; | 305 | QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5; | ||
302 | QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6; | 306 | QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6; | ||
307 | QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable; | ||||
303 | } | 308 | } | ||
304 | 309 | | |||
305 | void TestPointerConstraints::testLockedPointer() | 310 | void TestPointerConstraints::testLockedPointer() | ||
306 | { | 311 | { | ||
307 | // this test sets up a Surface with a locked pointer | 312 | // this test sets up a Surface with a locked pointer | ||
308 | // simple interaction test to verify that the pointer gets locked | 313 | // simple interaction test to verify that the pointer gets locked | ||
309 | // the various ways to unlock are not tested as that's already verified by testConfinedPointer | 314 | // the various ways to unlock are not tested as that's already verified by testConfinedPointer | ||
310 | QScopedPointer<Surface> surface(Test::createSurface()); | 315 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | |||||
373 | 378 | | |||
374 | void TestPointerConstraints::testCloseWindowWithLockedPointer_data() | 379 | void TestPointerConstraints::testCloseWindowWithLockedPointer_data() | ||
375 | { | 380 | { | ||
376 | QTest::addColumn<Test::ShellSurfaceType>("type"); | 381 | QTest::addColumn<Test::ShellSurfaceType>("type"); | ||
377 | 382 | | |||
378 | QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell; | 383 | QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell; | ||
379 | QTest::newRow("XdgShellV5") << Test::ShellSurfaceType::XdgShellV5; | 384 | QTest::newRow("XdgShellV5") << Test::ShellSurfaceType::XdgShellV5; | ||
380 | QTest::newRow("XdgShellV6") << Test::ShellSurfaceType::XdgShellV6; | 385 | QTest::newRow("XdgShellV6") << Test::ShellSurfaceType::XdgShellV6; | ||
386 | QTest::newRow("XdgWmBase") << Test::ShellSurfaceType::XdgShellStable; | ||||
381 | } | 387 | } | ||
382 | 388 | | |||
383 | void TestPointerConstraints::testCloseWindowWithLockedPointer() | 389 | void TestPointerConstraints::testCloseWindowWithLockedPointer() | ||
384 | { | 390 | { | ||
385 | // test case which verifies that the pointer gets unlocked when the window for it gets closed | 391 | // test case which verifies that the pointer gets unlocked when the window for it gets closed | ||
386 | QScopedPointer<Surface> surface(Test::createSurface()); | 392 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
387 | QFETCH(Test::ShellSurfaceType, type); | 393 | QFETCH(Test::ShellSurfaceType, type); | ||
388 | QScopedPointer<QObject> shellSurface(Test::createShellSurface(type, surface.data())); | 394 | QScopedPointer<QObject> shellSurface(Test::createShellSurface(type, surface.data())); | ||
Show All 29 Lines |