summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2012-10-19 09:57:30 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-19 13:25:32 +0200
commitd6f5e77800d450422b740f9da751b072f8bbb25c (patch)
treef172fc065ffc3e1c5bb75c3db0c27fa29b10aec6
parentd6d2074ffedd47561a5ca4afe48a7ed816d4e595 (diff)
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 <simon.hausmann@digia.com>
-rw-r--r--tests/auto/declarative/examples/tst_examples.cpp2
1 files changed, 1 insertions, 1 deletions
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)