From 7610ff49a8b2f929a984e4bf1e4514b35a0a984c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 1 Jul 2016 15:21:37 +0200 Subject: [PATCH] [autotests/integration] Make MoveResizeWindowTest more robust A few more cases where we need to ensure that the created window is destroyed before going into next test method. Interesting observation: the generated window ids are identical. Possible problem with KWayland::ClientConnection? --- autotests/integration/move_resize_window_test.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autotests/integration/move_resize_window_test.cpp b/autotests/integration/move_resize_window_test.cpp index 07cbb7ae36..b0738618da 100644 --- a/autotests/integration/move_resize_window_test.cpp +++ b/autotests/integration/move_resize_window_test.cpp @@ -399,6 +399,8 @@ void MoveResizeWindowTest::testPointerMoveEnd() // but releasing the other button should now end moving kwinApp()->platform()->pointerButtonReleased(additionalButton, timestamp++); QVERIFY(!c->isMove()); + surface.reset(); + QVERIFY(Test::waitForWindowDestroyed(c)); } void MoveResizeWindowTest::testPlasmaShellSurfaceMovable_data() @@ -435,6 +437,8 @@ void MoveResizeWindowTest::testPlasmaShellSurfaceMovable() QTEST(c->isMovable(), "movable"); QTEST(c->isMovableAcrossScreens(), "movableAcrossScreens"); QTEST(c->isResizable(), "resizable"); + surface.reset(); + QVERIFY(Test::waitForWindowDestroyed(c)); } void MoveResizeWindowTest::testNetMove() @@ -484,6 +488,7 @@ void MoveResizeWindowTest::testNetMove() QVERIFY(moveEndSpy.isValid()); QSignalSpy moveStepSpy(client, &Client::clientStepUserMovedResized); QVERIFY(moveStepSpy.isValid()); + QVERIFY(!workspace()->getMovingClient()); // use NETRootInfo to trigger a move request NETRootInfo root(c.data(), NET::Properties());