From: Michael Brasser Date: Tue, 10 Jul 2012 03:10:28 +0000 (+1000) Subject: Stabilize Loader test. X-Git-Tag: 1.0_branch~280 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c66d00a7f53d6a6a847bc7171529273f4d089923;p=profile%2Fivi%2Fqtdeclarative.git Stabilize Loader test. Wait for Loader to load its item, rather than using a fixed timeout value. Change-Id: I97ee56d0d7161c9c71a5524f108b0f56d92cc3f3 Reviewed-by: Matthew Vogt --- diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp index fa09779..99ae42b 100644 --- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp +++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp @@ -705,8 +705,10 @@ void tst_QQuickLoader::initialPropertyValues() QQmlComponent component(&engine, qmlFile); QObject *object = component.create(); QVERIFY(object != 0); - qApp->processEvents(); - QTest::qWait(50); + if (expectedWarnings.isEmpty()) { + QQuickLoader *loader = object->findChild("loader"); + QTRY_VERIFY(loader->item()); + } for (int i = 0; i < propertyNames.size(); ++i) QCOMPARE(object->property(propertyNames.at(i).toLatin1().constData()), propertyValues.at(i));