Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/x11_client_test.cpp
Show All 18 Lines | |||||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "kwin_wayland_test.h" | 20 | #include "kwin_wayland_test.h" | ||
21 | #include "atoms.h" | 21 | #include "atoms.h" | ||
22 | #include "client.h" | 22 | #include "client.h" | ||
23 | #include "composite.h" | 23 | #include "composite.h" | ||
24 | #include "effects.h" | 24 | #include "effects.h" | ||
25 | #include "effectloader.h" | 25 | #include "effectloader.h" | ||
26 | #include "cursor.h" | 26 | #include "cursor.h" | ||
27 | #include "deleted.h" | ||||
27 | #include "platform.h" | 28 | #include "platform.h" | ||
28 | #include "screens.h" | 29 | #include "screens.h" | ||
29 | #include "shell_client.h" | 30 | #include "shell_client.h" | ||
30 | #include "wayland_server.h" | 31 | #include "wayland_server.h" | ||
31 | #include "workspace.h" | 32 | #include "workspace.h" | ||
32 | 33 | | |||
33 | #include <KWayland/Client/surface.h> | 34 | #include <KWayland/Client/surface.h> | ||
34 | #include <KWayland/Client/shell.h> | 35 | #include <KWayland/Client/shell.h> | ||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 98 | { | |||
126 | QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded); | 127 | QSignalSpy windowCreatedSpy(workspace(), &Workspace::clientAdded); | ||
127 | QVERIFY(windowCreatedSpy.isValid()); | 128 | QVERIFY(windowCreatedSpy.isValid()); | ||
128 | QVERIFY(windowCreatedSpy.wait()); | 129 | QVERIFY(windowCreatedSpy.wait()); | ||
129 | Client *client = windowCreatedSpy.first().first().value<Client*>(); | 130 | Client *client = windowCreatedSpy.first().first().value<Client*>(); | ||
130 | QVERIFY(client); | 131 | QVERIFY(client); | ||
131 | QCOMPARE(client->window(), w); | 132 | QCOMPARE(client->window(), w); | ||
132 | QVERIFY(client->caption() != QString::fromUtf8(origTitle)); | 133 | QVERIFY(client->caption() != QString::fromUtf8(origTitle)); | ||
133 | QCOMPARE(client->caption(), QString::fromUtf8(origTitle).simplified()); | 134 | QCOMPARE(client->caption(), QString::fromUtf8(origTitle).simplified()); | ||
135 | QCOMPARE(client->internalId().isNull(), false); | ||||
136 | const auto uuid = client->internalId(); | ||||
137 | QUuid deletedUuid; | ||||
138 | QCOMPARE(deletedUuid.isNull(), true); | ||||
139 | | ||||
140 | connect(client, &Client::windowClosed, this, [&deletedUuid] (Toplevel *, Deleted *d) { deletedUuid = d->internalId(); }); | ||||
zzag: Is it a good place for this test? It looks like this test verifies some caption stuff. | |||||
No, it's not. Somehow I followed the ShellClient test and assumed the first test method is generic. Will move to testX11WindowId graesslin: No, it's not. Somehow I followed the ShellClient test and assumed the first test method is… | |||||
134 | 141 | | |||
135 | // and destroy the window again | 142 | // and destroy the window again | ||
136 | xcb_unmap_window(c.data(), w); | 143 | xcb_unmap_window(c.data(), w); | ||
137 | xcb_flush(c.data()); | 144 | xcb_flush(c.data()); | ||
138 | 145 | | |||
139 | QSignalSpy windowClosedSpy(client, &Client::windowClosed); | 146 | QSignalSpy windowClosedSpy(client, &Client::windowClosed); | ||
140 | QVERIFY(windowClosedSpy.isValid()); | 147 | QVERIFY(windowClosedSpy.isValid()); | ||
141 | QVERIFY(windowClosedSpy.wait()); | 148 | QVERIFY(windowClosedSpy.wait()); | ||
149 | QCOMPARE(deletedUuid.isNull(), false); | ||||
150 | QCOMPARE(deletedUuid, uuid); | ||||
142 | xcb_destroy_window(c.data(), w); | 151 | xcb_destroy_window(c.data(), w); | ||
143 | c.reset(); | 152 | c.reset(); | ||
144 | } | 153 | } | ||
145 | 154 | | |||
146 | void X11ClientTest::testFullscreenLayerWithActiveWaylandWindow() | 155 | void X11ClientTest::testFullscreenLayerWithActiveWaylandWindow() | ||
147 | { | 156 | { | ||
148 | // this test verifies that an X11 fullscreen window does not stay in the active layer | 157 | // this test verifies that an X11 fullscreen window does not stay in the active layer | ||
149 | // when a Wayland window is active, see BUG: 375759 | 158 | // when a Wayland window is active, see BUG: 375759 | ||
▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines |
Is it a good place for this test? It looks like this test verifies some caption stuff.