From 622df95fee5ddea737ae3030dbae1286ffd4a454 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 18 Dec 2014 15:44:38 +0100 Subject: [PATCH] Prospective stabilization fix for tst_qwindow::positioning(default) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our theory for the failure of framePosition() not having the expected value after setFramePosition towards the end of the test is that we try to call setFramePosition() while the getting-back-from-fullscreen-to-normal window animation is still running, at which point the compositor may just choose to ignore our move request. Similarly to when going fullscreen, also wait when coming back from it. Change-Id: Icfc92f277d96dccdfad772c4aac252b2a20c6196 Reviewed-by: Jørgen Lind --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index a5442968c6..61ba99c7de 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -298,6 +298,8 @@ void tst_QWindow::positioning() QTRY_VERIFY(window.received(QEvent::Resize) > 0); #endif + QTest::qWait(2000); + QTRY_COMPARE(originalPos, window.position()); QTRY_COMPARE(originalFramePos, window.framePosition()); QTRY_COMPARE(originalMargins, window.frameMargins());