From d6f5e77800d450422b740f9da751b072f8bbb25c Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Fri, 19 Oct 2012 09:57:30 +0300 Subject: Change qtdeclartive tst_examples autotest to use qWaitForWindowExposed. The QtDeclartive tst_examples autotest has been flaky. After some investigation I found that it has been using qWaitForWindowActive, which basically means that window itself or it's child has taken focus. When running tst_examples locally I found that some tested QML files stay on screen for maximum time given for qWaitForWindowActive. This probably happens because not all QML demos take focus. From Git logs I also found that test case intially used qWaitForWindowShown (15e48b7387ae302a1b07a57b8374b097dc9c96a4), but that was changed to qWaitForWindowActive when qWaitForWindowShown was deprecated. Based on documentation qWaitForWindowExposed should be used instead of qWaitForWindowShown. --> Switch qWaitForWindowActive to qWaitForWindowExposed to decrease execution time of tst_examples in CI system and make tests to pass more consistently. Change-Id: Id859b377e577c44e85216a5acb51e69fe9659699 Reviewed-by: Simon Hausmann --- tests/auto/declarative/examples/tst_examples.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp index 8b783f44..85427b82 100644 --- a/tests/auto/declarative/examples/tst_examples.cpp +++ b/tests/auto/declarative/examples/tst_examples.cpp @@ -224,7 +224,7 @@ void tst_examples::examples() viewer.show(); - QVERIFY(QTest::qWaitForWindowActive(&viewer, 3000)); + QVERIFY(QTest::qWaitForWindowExposed(&viewer, 3000)); } QTEST_MAIN(tst_examples) -- cgit v1.2.3