From 9ae04f21005353183047b9ddc1704347bd549a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 20 Sep 2014 16:28:47 +0200 Subject: [PATCH] Extend test_wayland_surface to test frame rendered callback --- src/wayland/autotests/client/test_wayland_surface.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wayland/autotests/client/test_wayland_surface.cpp b/src/wayland/autotests/client/test_wayland_surface.cpp index f84ea8d1d5..f94c92a455 100644 --- a/src/wayland/autotests/client/test_wayland_surface.cpp +++ b/src/wayland/autotests/client/test_wayland_surface.cpp @@ -310,7 +310,9 @@ void TestWaylandSurface::testAttachBuffer() QVERIFY(blueBuffer->isUsed()); s->attachBuffer(blueBuffer); s->damage(QRect(0, 0, 24, 24)); - s->commit(KWayland::Client::Surface::CommitFlag::None); + QSignalSpy frameRenderedSpy(s, SIGNAL(frameRendered())); + QVERIFY(frameRenderedSpy.isValid()); + s->commit(); damageSpy.clear(); QVERIFY(damageSpy.wait()); QVERIFY(!buffer2->isReferenced()); @@ -334,6 +336,9 @@ void TestWaylandSurface::testAttachBuffer() buffer3->unref(); QVERIFY(buffer3->isReferenced()); + serverSurface->frameRendered(1); + QVERIFY(frameRenderedSpy.wait()); + // TODO: add signal test on release buffer->unref(); }