Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/effects/maximize_animation_test.cpp
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 108 | { | |||
---|---|---|---|---|---|
111 | 111 | | |||
112 | using namespace KWayland::Client; | 112 | using namespace KWayland::Client; | ||
113 | 113 | | |||
114 | // Create the test client. | 114 | // Create the test client. | ||
115 | QScopedPointer<Surface> surface(Test::createSurface()); | 115 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
116 | QVERIFY(!surface.isNull()); | 116 | QVERIFY(!surface.isNull()); | ||
117 | 117 | | |||
118 | QFETCH(Test::ShellSurfaceType, type); | 118 | QFETCH(Test::ShellSurfaceType, type); | ||
119 | QScopedPointer<XdgShellSurface> shellSurface(qobject_cast<XdgShellSurface *>( | 119 | QScopedPointer<XdgShellSurface> shellSurface(createXdgShellSurface(type, surface.data(), nullptr, Test::CreationSetup::CreateOnly)); | ||
120 | Test::createShellSurface(type, surface.data()))); | | |||
121 | 120 | | |||
122 | // Wait for the initial configure event. | 121 | // Wait for the initial configure event. | ||
123 | XdgShellSurface::States states; | 122 | XdgShellSurface::States states; | ||
124 | QSignalSpy configureRequestedSpy(shellSurface.data(), &XdgShellSurface::configureRequested); | 123 | QSignalSpy configureRequestedSpy(shellSurface.data(), &XdgShellSurface::configureRequested); | ||
124 | | ||||
125 | surface->commit(Surface::CommitFlag::None); | ||||
126 | | ||||
125 | QVERIFY(configureRequestedSpy.isValid()); | 127 | QVERIFY(configureRequestedSpy.isValid()); | ||
126 | QVERIFY(configureRequestedSpy.wait()); | 128 | QVERIFY(configureRequestedSpy.wait()); | ||
127 | QCOMPARE(configureRequestedSpy.count(), 1); | 129 | QCOMPARE(configureRequestedSpy.count(), 1); | ||
128 | QCOMPARE(configureRequestedSpy.last().at(0).value<QSize>(), QSize(0, 0)); | 130 | QCOMPARE(configureRequestedSpy.last().at(0).value<QSize>(), QSize(0, 0)); | ||
129 | states = configureRequestedSpy.last().at(1).value<XdgShellSurface::States>(); | 131 | states = configureRequestedSpy.last().at(1).value<XdgShellSurface::States>(); | ||
130 | QVERIFY(!states.testFlag(XdgShellSurface::State::Activated)); | 132 | QVERIFY(!states.testFlag(XdgShellSurface::State::Activated)); | ||
131 | QVERIFY(!states.testFlag(XdgShellSurface::State::Maximized)); | 133 | QVERIFY(!states.testFlag(XdgShellSurface::State::Maximized)); | ||
132 | 134 | | |||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |