Commit 513878e2 authored by Martin Flöser's avatar Martin Flöser
Browse files

[autotest/integration] Introduce a Test helper library to have less code duplication

Summary:
A new namespace KWin::Test is added which provides a few helper
functions. It makes it easy to setup a KWayland client connection with
the base set to be able to create a Surface and flags to create
additional interfaces. This replaces the KWayland connection dance in
init() methods. For cleanup() there is also a dedicated helper function.

In addition there are helper functions to:
* render a surface
* create a surface
* create a shell surface
* flush the wayland client connection
* access to the created interfaces - for compatibility with existing code

The idea is to extend this Test library also for other common use cases
like creating an X11 connection and X11 windows, etc.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2053
parent 1f2b47a8
......@@ -2,7 +2,7 @@ add_definitions(-DKWINBACKENDPATH="${CMAKE_BINARY_DIR}/plugins/platforms/virtual
add_definitions(-DKWINQPAPATH="${CMAKE_BINARY_DIR}/plugins/qpa/")
add_subdirectory(helper)
add_library(KWinIntegrationTestFramework STATIC kwin_wayland_test.cpp)
add_library(KWinIntegrationTestFramework STATIC kwin_wayland_test.cpp test_helpers.cpp)
target_link_libraries(KWinIntegrationTestFramework kwin Qt5::Test)
function(integrationTest)
......
......@@ -27,8 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/compositor.h>
#include <KWayland/Client/event_queue.h>
#include <KWayland/Client/registry.h>
#include <KWayland/Client/shell.h>
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h>
......@@ -46,6 +44,7 @@ class DebugConsoleTest : public QObject
Q_OBJECT
private Q_SLOTS:
void initTestCase();
void cleanup();
void topLevelTest_data();
void topLevelTest();
void testX11Client();
......@@ -73,6 +72,11 @@ void DebugConsoleTest::initTestCase()
waylandServer()->initWorkspace();
}
void DebugConsoleTest::cleanup()
{
Test::destroyWaylandConnection();
}
void DebugConsoleTest::topLevelTest_data()
{
QTest::addColumn<int>("row");
......@@ -308,51 +312,15 @@ void DebugConsoleTest::testWaylandClient()
QVERIFY(rowsInsertedSpy.isValid());
// create our connection
using namespace KWayland::Client;
// setup connection
QScopedPointer<ConnectionThread> connection(new ConnectionThread);
QSignalSpy connectedSpy(connection.data(), &ConnectionThread::connected);
QVERIFY(connectedSpy.isValid());
connection->setSocketName(s_socketName);
QScopedPointer<QThread> thread(new QThread);
connection->moveToThread(thread.data());
thread->start();
connection->initConnection();
QVERIFY(connectedSpy.wait());
QScopedPointer<EventQueue> queue(new EventQueue);
QVERIFY(!queue->isValid());
queue->setup(connection.data());
QVERIFY(queue->isValid());
Registry registry;
registry.setEventQueue(queue.data());
QSignalSpy interfacesAnnouncedSpy(&registry, &Registry::interfacesAnnounced);
QVERIFY(interfacesAnnouncedSpy.isValid());
registry.create(connection.data());
QVERIFY(registry.isValid());
registry.setup();
QVERIFY(interfacesAnnouncedSpy.wait());
QScopedPointer<Compositor> compositor(registry.createCompositor(registry.interface(Registry::Interface::Compositor).name, registry.interface(Registry::Interface::Compositor).version));
QVERIFY(compositor->isValid());
QScopedPointer<ShmPool> shm(registry.createShmPool(registry.interface(Registry::Interface::Shm).name, registry.interface(Registry::Interface::Shm).version));
QVERIFY(shm->isValid());
QScopedPointer<Shell> shell(registry.createShell(registry.interface(Registry::Interface::Shell).name, registry.interface(Registry::Interface::Shell).version));
QVERIFY(shell->isValid());
QVERIFY(Test::setupWaylandConnection(s_socketName));
// create the Surface and ShellSurface
QScopedPointer<Surface> surface(compositor->createSurface());
using namespace KWayland::Client;
QScopedPointer<Surface> surface(Test::createSurface());
QVERIFY(surface->isValid());
QScopedPointer<ShellSurface> shellSurface(shell->createSurface(surface.data()));
QScopedPointer<ShellSurface> shellSurface(Test::createShellSurface(surface.data()));
QVERIFY(shellSurface->isValid());
QImage img(10, 10, QImage::Format_ARGB32);
img.fill(Qt::red);
surface->attachBuffer(shm->createBuffer(img));
surface->damage(QRect(0, 0, 10, 10));
surface->commit(Surface::CommitFlag::None);
Test::render(surface.data(), QSize(10, 10), Qt::red);
// now we have the window, it should be added to our model
QVERIFY(rowsInsertedSpy.wait());
......@@ -410,18 +378,11 @@ void DebugConsoleTest::testWaylandClient()
surface->attachBuffer(Buffer::Ptr());
surface->commit(Surface::CommitFlag::None);
shellSurface.reset();
connection->flush();
Test::flushWaylandConnection();
qDebug() << rowsRemovedSpy.count();
QEXPECT_FAIL("", "Deleting a ShellSurface does not result in the server removing the ShellClient", Continue);
QVERIFY(rowsRemovedSpy.wait());
// also destroy the connection to ensure the ShellSurface goes away
surface.reset();
shell.reset();
shm.reset();
compositor.reset();
connection.take()->deleteLater();
thread->quit();
QVERIFY(thread->wait());
QVERIFY(rowsRemovedSpy.wait());
QCOMPARE(rowsRemovedSpy.count(), 1);
......
......@@ -33,8 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/compositor.h>
#include <KWayland/Client/event_queue.h>
#include <KWayland/Client/registry.h>
#include <KWayland/Client/pointer.h>
#include <KWayland/Client/server_decoration.h>
#include <KWayland/Client/shell.h>
......@@ -74,14 +72,6 @@ private Q_SLOTS:
private:
AbstractClient *showWindow();
KWayland::Client::ConnectionThread *m_connection = nullptr;
KWayland::Client::Compositor *m_compositor = nullptr;
KWayland::Client::ServerSideDecorationManager *m_deco = nullptr;
KWayland::Client::Seat *m_seat = nullptr;
KWayland::Client::ShmPool *m_shm = nullptr;
KWayland::Client::Shell *m_shell = nullptr;
KWayland::Client::EventQueue *m_queue = nullptr;
QThread *m_thread = nullptr;
};
#define MOTION(target) \
......@@ -105,11 +95,11 @@ AbstractClient *DecorationInputTest::showWindow()
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
VERIFY(clientAddedSpy.isValid());
Surface *surface = m_compositor->createSurface(m_compositor);
Surface *surface = Test::createSurface(Test::waylandCompositor());
VERIFY(surface);
ShellSurface *shellSurface = m_shell->createSurface(surface, surface);
ShellSurface *shellSurface = Test::createShellSurface(surface, surface);
VERIFY(shellSurface);
auto deco = m_deco->create(surface, surface);
auto deco = Test::waylandServerSideDecoration()->create(surface, surface);
QSignalSpy decoSpy(deco, &ServerSideDecoration::modeChanged);
VERIFY(decoSpy.isValid());
VERIFY(decoSpy.wait());
......@@ -117,13 +107,9 @@ AbstractClient *DecorationInputTest::showWindow()
VERIFY(decoSpy.wait());
COMPARE(deco->mode(), ServerSideDecoration::Mode::Server);
// let's render
QImage img(QSize(500, 50), QImage::Format_ARGB32);
img.fill(Qt::blue);
surface->attachBuffer(m_shm->createBuffer(img));
surface->damage(QRect(0, 0, 500, 50));
surface->commit(Surface::CommitFlag::None);
Test::render(surface, QSize(500, 50), Qt::blue);
m_connection->flush();
Test::flushWaylandConnection();
VERIFY(clientAddedSpy.wait());
AbstractClient *c = workspace()->activeClient();
VERIFY(c);
......@@ -166,61 +152,8 @@ void DecorationInputTest::initTestCase()
void DecorationInputTest::init()
{
using namespace KWayland::Client;
// setup connection
m_connection = new ConnectionThread;
QSignalSpy connectedSpy(m_connection, &ConnectionThread::connected);
QVERIFY(connectedSpy.isValid());
m_connection->setSocketName(s_socketName);
m_thread = new QThread(this);
m_connection->moveToThread(m_thread);
m_thread->start();
m_connection->initConnection();
QVERIFY(connectedSpy.wait());
m_queue = new EventQueue(this);
QVERIFY(!m_queue->isValid());
m_queue->setup(m_connection);
QVERIFY(m_queue->isValid());
Registry registry;
registry.setEventQueue(m_queue);
QSignalSpy compositorSpy(&registry, &Registry::compositorAnnounced);
QSignalSpy shmSpy(&registry, &Registry::shmAnnounced);
QSignalSpy shellSpy(&registry, &Registry::shellAnnounced);
QSignalSpy seatSpy(&registry, &Registry::seatAnnounced);
QSignalSpy decorationSpy(&registry, &Registry::serverSideDecorationManagerAnnounced);
QSignalSpy allAnnounced(&registry, &Registry::interfacesAnnounced);
QVERIFY(allAnnounced.isValid());
QVERIFY(shmSpy.isValid());
QVERIFY(shellSpy.isValid());
QVERIFY(compositorSpy.isValid());
QVERIFY(seatSpy.isValid());
QVERIFY(decorationSpy.isValid());
registry.create(m_connection->display());
QVERIFY(registry.isValid());
registry.setup();
QVERIFY(allAnnounced.wait());
QVERIFY(!compositorSpy.isEmpty());
QVERIFY(!shmSpy.isEmpty());
QVERIFY(!shellSpy.isEmpty());
QVERIFY(!seatSpy.isEmpty());
QVERIFY(!decorationSpy.isEmpty());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
QVERIFY(m_compositor->isValid());
m_shm = registry.createShmPool(shmSpy.first().first().value<quint32>(), shmSpy.first().last().value<quint32>(), this);
QVERIFY(m_shm->isValid());
m_shell = registry.createShell(shellSpy.first().first().value<quint32>(), shellSpy.first().last().value<quint32>(), this);
QVERIFY(m_shell->isValid());
m_seat = registry.createSeat(seatSpy.first().first().value<quint32>(), seatSpy.first().last().value<quint32>(), this);
QVERIFY(m_seat->isValid());
m_deco = registry.createServerSideDecorationManager(decorationSpy.first().first().value<quint32>(), decorationSpy.first().last().value<quint32>());
QVERIFY(m_deco->isValid());
QSignalSpy hasPointerSpy(m_seat, &Seat::hasPointerChanged);
QVERIFY(hasPointerSpy.isValid());
QVERIFY(hasPointerSpy.wait());
QVERIFY(Test::setupWaylandConnection(s_socketName, Test::AdditionalWaylandInterface::Seat | Test::AdditionalWaylandInterface::Decoration));
QVERIFY(Test::waitForWaylandPointer());
screens()->setCurrent(0);
Cursor::setPos(QPoint(640, 512));
......@@ -228,26 +161,7 @@ void DecorationInputTest::init()
void DecorationInputTest::cleanup()
{
delete m_compositor;
m_compositor = nullptr;
delete m_deco;
m_deco = nullptr;
delete m_seat;
m_seat = nullptr;
delete m_shm;
m_shm = nullptr;
delete m_shell;
m_shell = nullptr;
delete m_queue;
m_queue = nullptr;
if (m_thread) {
m_connection->deleteLater();
m_thread->quit();
m_thread->wait();
delete m_thread;
m_thread = nullptr;
m_connection = nullptr;
}
Test::destroyWaylandConnection();
}
void DecorationInputTest::testAxis_data()
......
......@@ -33,13 +33,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDecoration2/Decoration>
#include <KWayland/Client/registry.h>
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/compositor.h>
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/shell.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Client/event_queue.h>
namespace KWin
{
......@@ -58,12 +56,6 @@ private Q_SLOTS:
private:
void unlock();
AbstractClient *showWindow();
KWayland::Client::ConnectionThread *m_connection = nullptr;
KWayland::Client::Compositor *m_compositor = nullptr;
KWayland::Client::ShmPool *m_shm = nullptr;
KWayland::Client::Shell *m_shell = nullptr;
KWayland::Client::EventQueue *m_queue = nullptr;
QThread *m_thread = nullptr;
};
void DontCrashCancelAnimationFromAnimationEndedTest::initTestCase()
......@@ -83,69 +75,12 @@ void DontCrashCancelAnimationFromAnimationEndedTest::initTestCase()
void DontCrashCancelAnimationFromAnimationEndedTest::init()
{
using namespace KWayland::Client;
// setup connection
m_connection = new ConnectionThread;
QSignalSpy connectedSpy(m_connection, &ConnectionThread::connected);
QVERIFY(connectedSpy.isValid());
m_connection->setSocketName(s_socketName);
m_thread = new QThread(this);
m_connection->moveToThread(m_thread);
m_thread->start();
m_connection->initConnection();
QVERIFY(connectedSpy.wait());
m_queue = new EventQueue(this);
QVERIFY(!m_queue->isValid());
m_queue->setup(m_connection);
QVERIFY(m_queue->isValid());
Registry registry;
registry.setEventQueue(m_queue);
QSignalSpy compositorSpy(&registry, &Registry::compositorAnnounced);
QSignalSpy shmSpy(&registry, &Registry::shmAnnounced);
QSignalSpy shellSpy(&registry, &Registry::shellAnnounced);
QSignalSpy allAnnounced(&registry, &Registry::interfacesAnnounced);
QVERIFY(allAnnounced.isValid());
QVERIFY(shmSpy.isValid());
QVERIFY(shellSpy.isValid());
QVERIFY(compositorSpy.isValid());
registry.create(m_connection->display());
QVERIFY(registry.isValid());
registry.setup();
QVERIFY(allAnnounced.wait());
QVERIFY(!compositorSpy.isEmpty());
QVERIFY(!shmSpy.isEmpty());
QVERIFY(!shellSpy.isEmpty());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
QVERIFY(m_compositor->isValid());
m_shm = registry.createShmPool(shmSpy.first().first().value<quint32>(), shmSpy.first().last().value<quint32>(), this);
QVERIFY(m_shm->isValid());
m_shell = registry.createShell(shellSpy.first().first().value<quint32>(), shellSpy.first().last().value<quint32>(), this);
QVERIFY(m_shell->isValid());
QVERIFY(Test::setupWaylandConnection(s_socketName));
}
void DontCrashCancelAnimationFromAnimationEndedTest::cleanup()
{
delete m_compositor;
m_compositor = nullptr;
delete m_shm;
m_shm = nullptr;
delete m_shell;
m_shell = nullptr;
delete m_queue;
m_queue = nullptr;
if (m_thread) {
m_connection->deleteLater();
m_thread->quit();
m_thread->wait();
delete m_thread;
m_thread = nullptr;
m_connection = nullptr;
}
Test::destroyWaylandConnection();
}
void DontCrashCancelAnimationFromAnimationEndedTest::testScript()
......@@ -169,18 +104,14 @@ void DontCrashCancelAnimationFromAnimationEndedTest::testScript()
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
QVERIFY(clientAddedSpy.isValid());
Surface *surface = m_compositor->createSurface(m_compositor);
Surface *surface = Test::createSurface(Test::waylandCompositor());
QVERIFY(surface);
ShellSurface *shellSurface = m_shell->createSurface(surface, surface);
ShellSurface *shellSurface = Test::createShellSurface(surface, surface);
QVERIFY(shellSurface);
// let's render
QImage img(QSize(100, 50), QImage::Format_ARGB32);
img.fill(Qt::blue);
surface->attachBuffer(m_shm->createBuffer(img));
surface->damage(QRect(0, 0, 100, 50));
surface->commit(Surface::CommitFlag::None);
Test::render(surface, QSize(100, 50), Qt::blue);
m_connection->flush();
Test::flushWaylandConnection();
QVERIFY(clientAddedSpy.wait());
AbstractClient *c = workspace()->activeClient();
QVERIFY(c);
......
......@@ -28,17 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "shell_client.h"
#include <kwineffects.h>
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/compositor.h>
#include <KWayland/Client/event_queue.h>
#include <KWayland/Client/registry.h>
#include <KWayland/Client/pointer.h>
#include <KWayland/Client/server_decoration.h>
#include <KWayland/Client/shell.h>
#include <KWayland/Client/seat.h>
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h>
#include <KDecoration2/Decoration>
#include <linux/input.h>
......@@ -54,18 +43,7 @@ class DontCrashEmptyDecorationTest : public QObject
private Q_SLOTS:
void initTestCase();
void init();
void cleanup();
void testBug361551();
private:
KWayland::Client::ConnectionThread *m_connection = nullptr;
KWayland::Client::Compositor *m_compositor = nullptr;
KWayland::Client::ServerSideDecorationManager *m_deco = nullptr;
KWayland::Client::Seat *m_seat = nullptr;
KWayland::Client::ShmPool *m_shm = nullptr;
KWayland::Client::Shell *m_shell = nullptr;
KWayland::Client::EventQueue *m_queue = nullptr;
QThread *m_thread = nullptr;
};
void DontCrashEmptyDecorationTest::initTestCase()
......@@ -94,91 +72,10 @@ void DontCrashEmptyDecorationTest::initTestCase()
void DontCrashEmptyDecorationTest::init()
{
using namespace KWayland::Client;
// setup connection
m_connection = new ConnectionThread;
QSignalSpy connectedSpy(m_connection, &ConnectionThread::connected);
QVERIFY(connectedSpy.isValid());
m_connection->setSocketName(s_socketName);
m_thread = new QThread(this);
m_connection->moveToThread(m_thread);
m_thread->start();
m_connection->initConnection();
QVERIFY(connectedSpy.wait());
m_queue = new EventQueue(this);
QVERIFY(!m_queue->isValid());
m_queue->setup(m_connection);
QVERIFY(m_queue->isValid());
Registry registry;
registry.setEventQueue(m_queue);
QSignalSpy compositorSpy(&registry, &Registry::compositorAnnounced);
QSignalSpy shmSpy(&registry, &Registry::shmAnnounced);
QSignalSpy shellSpy(&registry, &Registry::shellAnnounced);
QSignalSpy seatSpy(&registry, &Registry::seatAnnounced);
QSignalSpy decorationSpy(&registry, &Registry::serverSideDecorationManagerAnnounced);
QSignalSpy allAnnounced(&registry, &Registry::interfacesAnnounced);
QVERIFY(allAnnounced.isValid());
QVERIFY(shmSpy.isValid());
QVERIFY(shellSpy.isValid());
QVERIFY(compositorSpy.isValid());
QVERIFY(seatSpy.isValid());
QVERIFY(decorationSpy.isValid());
registry.create(m_connection->display());
QVERIFY(registry.isValid());
registry.setup();
QVERIFY(allAnnounced.wait());
QVERIFY(!compositorSpy.isEmpty());
QVERIFY(!shmSpy.isEmpty());
QVERIFY(!shellSpy.isEmpty());
QVERIFY(!seatSpy.isEmpty());
QVERIFY(!decorationSpy.isEmpty());
m_compositor = registry.createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
QVERIFY(m_compositor->isValid());
m_shm = registry.createShmPool(shmSpy.first().first().value<quint32>(), shmSpy.first().last().value<quint32>(), this);
QVERIFY(m_shm->isValid());
m_shell = registry.createShell(shellSpy.first().first().value<quint32>(), shellSpy.first().last().value<quint32>(), this);
QVERIFY(m_shell->isValid());
m_seat = registry.createSeat(seatSpy.first().first().value<quint32>(), seatSpy.first().last().value<quint32>(), this);
QVERIFY(m_seat->isValid());
m_deco = registry.createServerSideDecorationManager(decorationSpy.first().first().value<quint32>(), decorationSpy.first().last().value<quint32>());
QVERIFY(m_deco->isValid());
QSignalSpy hasPointerSpy(m_seat, &Seat::hasPointerChanged);
QVERIFY(hasPointerSpy.isValid());
QVERIFY(hasPointerSpy.wait());
screens()->setCurrent(0);
Cursor::setPos(QPoint(640, 512));
}
void DontCrashEmptyDecorationTest::cleanup()
{
delete m_compositor;
m_compositor = nullptr;
delete m_deco;
m_deco = nullptr;
delete m_seat;
m_seat = nullptr;
delete m_shm;
m_shm = nullptr;
delete m_shell;
m_shell = nullptr;
delete m_queue;
m_queue = nullptr;
if (m_thread) {
m_connection->deleteLater();
m_thread->quit();
m_thread->wait();
delete m_thread;
m_thread = nullptr;
m_connection = nullptr;
}
}
void DontCrashEmptyDecorationTest::testBug361551()
{
// this test verifies that resizing an X11 window to an invalid size does not result in crash on unmap
......
......@@ -29,15 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "shell_client.h"
#include <kwineffects.h>
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/compositor.h>
#include <KWayland/Client/event_queue.h>
#include <KWayland/Client/registry.h>
#include <KWayland/Client/pointer.h>
#include <KWayland/Client/server_decoration.h>
#include <KWayland/Client/shell.h>
#include <KWayland/Client/seat.h>
#include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h>
#include <KDecoration2/Decoration>
......@@ -57,16 +50,6 @@ private Q_SLOTS:
void init();
void cleanup();
void testCreateWindow();
private:
KWayland::Client::ConnectionThread *m_connection = nullptr;
KWayland::Client::Compositor *m_compositor = nullptr;
KWayland::Client::ServerSideDecorationManager *m_deco = nullptr;
KWayland::Client::Seat *m_seat = nullptr;
KWayland::Client::ShmPool *m_shm = nullptr;
KWayland::Client::Shell *m_shell = nullptr;
KWayland::Client::EventQueue *m_queue = nullptr;
QThread *m_thread = nullptr;
};
void DontCrashNoBorder::initTestCase()
......@@ -100,62 +83,7 @@ void DontCrashNoBorder::initTestCase()
void DontCrashNoBorder::init()
{
using namespace KWayland::Client;
// setup connection
m_connection = new ConnectionThread;
QSignalSpy connectedSpy(m_connection, &ConnectionThread::connected);
QVERIFY(connectedSpy.isValid());
m_connection->setSocketName(s_socketName);
m_thread = new QThread(this);
m_connection->moveToThread(m_thread);
m_thread->start();
m_connection->initConnection();
QVERIFY(connectedSpy.wait());
m_queue = new EventQueue(this);
QVERIFY(!m_queue->isValid());
m_queue->setup(m_connection);
QVERIFY(m_queue->isValid());
Registry registry;
registry.setEventQueue(m_queue);
QSignalSpy compositorSpy(&registry, &Registry::compositorAnnounced);
QSignalSpy shmSpy(&registry, &Registry::shmAnnounced);
QSignalSpy shellSpy(&registry, &Registry::shellAnnounced);
QSignalSpy seatSpy(&registry, &Registry::seatAnnounced);
QSignalSpy decorationSpy(&registry, &Registry::serverSideDecorationManagerAnnounced);
QSignalSpy allAnnounced(&registry, &Registry::interfacesAnnounced);
QVERIFY(allAnnounced.isValid());
QVERIFY(shmSpy.isValid());
QVERIFY(shellSpy.isValid());
QVERIFY(compositorSpy.isValid());
QVERIFY(seatSpy.isValid());
QVERIFY(decorationSpy.isValid());
registry.create(m_connection->display());
QVERIFY(registry.isValid());
registry.setup();
QVERIFY(allAnnounced.wait());