Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/xclipboardsync_test.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 89 | { | |||
---|---|---|---|---|---|
92 | 92 | | |||
93 | QTest::newRow("x11-wayland") << QStringLiteral("xcb") << QStringLiteral("wayland"); | 93 | QTest::newRow("x11-wayland") << QStringLiteral("xcb") << QStringLiteral("wayland"); | ||
94 | QTest::newRow("wayland-x11") << QStringLiteral("wayland") << QStringLiteral("xcb"); | 94 | QTest::newRow("wayland-x11") << QStringLiteral("wayland") << QStringLiteral("xcb"); | ||
95 | } | 95 | } | ||
96 | 96 | | |||
97 | void XClipboardSyncTest::testSync() | 97 | void XClipboardSyncTest::testSync() | ||
98 | { | 98 | { | ||
99 | // this test verifies the syncing of X11 to Wayland clipboard | 99 | // this test verifies the syncing of X11 to Wayland clipboard | ||
100 | const QString copy = QFINDTESTDATA(QStringLiteral("helper/copy")); | 100 | const QString copy = QFINDTESTDATA(QStringLiteral("copy")); | ||
101 | QVERIFY(!copy.isEmpty()); | 101 | QVERIFY(!copy.isEmpty()); | ||
102 | const QString paste = QFINDTESTDATA(QStringLiteral("helper/paste")); | 102 | const QString paste = QFINDTESTDATA(QStringLiteral("paste")); | ||
103 | QVERIFY(!paste.isEmpty()); | 103 | QVERIFY(!paste.isEmpty()); | ||
104 | 104 | | |||
105 | QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded); | 105 | QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded); | ||
106 | QVERIFY(clientAddedSpy.isValid()); | 106 | QVERIFY(clientAddedSpy.isValid()); | ||
107 | QSignalSpy shellClientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); | 107 | QSignalSpy shellClientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); | ||
108 | QVERIFY(shellClientAddedSpy.isValid()); | 108 | QVERIFY(shellClientAddedSpy.isValid()); | ||
109 | QSignalSpy clipboardChangedSpy(waylandServer()->xclipboardSyncDataDevice().data(), &KWayland::Server::DataDeviceInterface::selectionChanged); | 109 | QSignalSpy clipboardChangedSpy(waylandServer()->xclipboardSyncDataDevice().data(), &KWayland::Server::DataDeviceInterface::selectionChanged); | ||
110 | QVERIFY(clipboardChangedSpy.isValid()); | 110 | QVERIFY(clipboardChangedSpy.isValid()); | ||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |