Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/quick_tiling_test.cpp
Show First 20 Lines • Show All 186 Lines • ▼ Show 20 Line(s) | 158 | { | |||
---|---|---|---|---|---|
187 | QCOMPARE(quickTileChangedSpy.count(), 1); | 187 | QCOMPARE(quickTileChangedSpy.count(), 1); | ||
188 | // at this point the geometry did not yet change | 188 | // at this point the geometry did not yet change | ||
189 | QCOMPARE(c->frameGeometry(), QRect(0, 0, 100, 50)); | 189 | QCOMPARE(c->frameGeometry(), QRect(0, 0, 100, 50)); | ||
190 | // but quick tile mode already changed | 190 | // but quick tile mode already changed | ||
191 | QCOMPARE(c->quickTileMode(), mode); | 191 | QCOMPARE(c->quickTileMode(), mode); | ||
192 | 192 | | |||
193 | // but we got requested a new geometry | 193 | // but we got requested a new geometry | ||
194 | QVERIFY(configureRequestedSpy.wait()); | 194 | QVERIFY(configureRequestedSpy.wait()); | ||
195 | QEXPECT_FAIL("maximize", "Two configure events are sent for maximized", Continue); | | |||
196 | QCOMPARE(configureRequestedSpy.count(), 2); | 195 | QCOMPARE(configureRequestedSpy.count(), 2); | ||
197 | QCOMPARE(configureRequestedSpy.last().at(0).toSize(), expectedGeometry.size()); | 196 | QCOMPARE(configureRequestedSpy.last().at(0).toSize(), expectedGeometry.size()); | ||
198 | 197 | | |||
199 | // attach a new image | 198 | // attach a new image | ||
200 | shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>()); | 199 | shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>()); | ||
201 | Test::render(surface.data(), expectedGeometry.size(), Qt::red); | 200 | Test::render(surface.data(), expectedGeometry.size(), Qt::red); | ||
202 | 201 | | |||
203 | QVERIFY(frameGeometryChangedSpy.wait()); | 202 | QVERIFY(frameGeometryChangedSpy.wait()); | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 232 | { | |||
267 | // at this point the geometry did not yet change | 266 | // at this point the geometry did not yet change | ||
268 | QCOMPARE(c->frameGeometry(), QRect(0, 0, 100, 50)); | 267 | QCOMPARE(c->frameGeometry(), QRect(0, 0, 100, 50)); | ||
269 | // but quick tile mode already changed | 268 | // but quick tile mode already changed | ||
270 | QCOMPARE(c->quickTileMode(), QuickTileFlag::Maximize); | 269 | QCOMPARE(c->quickTileMode(), QuickTileFlag::Maximize); | ||
271 | QCOMPARE(c->geometryRestore(), QRect(0, 0, 100, 50)); | 270 | QCOMPARE(c->geometryRestore(), QRect(0, 0, 100, 50)); | ||
272 | 271 | | |||
273 | // but we got requested a new geometry | 272 | // but we got requested a new geometry | ||
274 | QVERIFY(configureRequestedSpy.wait()); | 273 | QVERIFY(configureRequestedSpy.wait()); | ||
275 | QEXPECT_FAIL("", "Two configure events are sent for maximized", Continue); | | |||
276 | QCOMPARE(configureRequestedSpy.count(), 2); | 274 | QCOMPARE(configureRequestedSpy.count(), 2); | ||
277 | QCOMPARE(configureRequestedSpy.last().at(0).toSize(), QSize(1280, 1024)); | 275 | QCOMPARE(configureRequestedSpy.last().at(0).toSize(), QSize(1280, 1024)); | ||
278 | 276 | | |||
279 | // attach a new image | 277 | // attach a new image | ||
280 | shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>()); | 278 | shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>()); | ||
281 | Test::render(surface.data(), QSize(1280, 1024), Qt::red); | 279 | Test::render(surface.data(), QSize(1280, 1024), Qt::red); | ||
282 | 280 | | |||
283 | QVERIFY(frameGeometryChangedSpy.wait()); | 281 | QVERIFY(frameGeometryChangedSpy.wait()); | ||
Show All 16 Lines | |||||
300 | c->setQuickTileMode(mode, true); | 298 | c->setQuickTileMode(mode, true); | ||
301 | QCOMPARE(c->quickTileMode(), QuickTileMode(QuickTileFlag::None)); | 299 | QCOMPARE(c->quickTileMode(), QuickTileMode(QuickTileFlag::None)); | ||
302 | QCOMPARE(quickTileChangedSpy.count(), 2); | 300 | QCOMPARE(quickTileChangedSpy.count(), 2); | ||
303 | // geometry not yet changed | 301 | // geometry not yet changed | ||
304 | QCOMPARE(c->frameGeometry(), QRect(0, 0, 1280, 1024)); | 302 | QCOMPARE(c->frameGeometry(), QRect(0, 0, 1280, 1024)); | ||
305 | QCOMPARE(c->geometryRestore(), QRect(0, 0, 100, 50)); | 303 | QCOMPARE(c->geometryRestore(), QRect(0, 0, 100, 50)); | ||
306 | // we got requested a new geometry | 304 | // we got requested a new geometry | ||
307 | QVERIFY(configureRequestedSpy.wait()); | 305 | QVERIFY(configureRequestedSpy.wait()); | ||
308 | QEXPECT_FAIL("", "Two configure events are sent for maximized", Continue); | | |||
309 | QCOMPARE(configureRequestedSpy.count(), 3); | 306 | QCOMPARE(configureRequestedSpy.count(), 3); | ||
310 | QCOMPARE(configureRequestedSpy.last().at(0).toSize(), QSize(100, 50)); | 307 | QCOMPARE(configureRequestedSpy.last().at(0).toSize(), QSize(100, 50)); | ||
311 | 308 | | |||
312 | // render again | 309 | // render again | ||
313 | shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>()); | 310 | shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>()); | ||
314 | Test::render(surface.data(), QSize(100, 50), Qt::yellow); | 311 | Test::render(surface.data(), QSize(100, 50), Qt::yellow); | ||
315 | 312 | | |||
316 | QVERIFY(frameGeometryChangedSpy.wait()); | 313 | QVERIFY(frameGeometryChangedSpy.wait()); | ||
▲ Show 20 Lines • Show All 574 Lines • Show Last 20 Lines |