summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-02-19 05:57:27 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-02-19 06:00:54 (GMT)
commit1d54f0ff2bb7075c8aa27a2be67056d2a2863fc1 (patch)
tree7d73aff2395d39c0e00547f3c0add7d80b3fddf3 /tests
parent5d577b82f93a10918db319eac9d206dd9fe96e2c (diff)
downloadQt-1d54f0ff2bb7075c8aa27a2be67056d2a2863fc1.zip
Qt-1d54f0ff2bb7075c8aa27a2be67056d2a2863fc1.tar.gz
Qt-1d54f0ff2bb7075c8aa27a2be67056d2a2863fc1.tar.bz2
Fix tst_qmlgraphicstextedit::delegateLoading autotest
The test case was wrong before, if one sub-component fails, then the whole component fails to load.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp b/tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp
index 3221e9a..cc2f929 100644
--- a/tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp
+++ b/tests/auto/declarative/qmlgraphicstextedit/tst_qmlgraphicstextedit.cpp
@@ -668,18 +668,12 @@ void tst_qmlgraphicstextedit::delegateLoading()
view->execute();
view->show();
view->setFocus();
- delegate = view->rootObject()->findChild<QmlGraphicsItem*>("delegateOkay");
- QVERIFY(delegate);
- delegate = view->rootObject()->findChild<QmlGraphicsItem*>("delegateFail");
- QVERIFY(!delegate);
+ QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test
view->setSource(QUrl("http://localhost:42332/cursorHttpTestFail2.qml"));
view->execute();
view->show();
view->setFocus();
- delegate = view->rootObject()->findChild<QmlGraphicsItem*>("delegateOkay");
- QVERIFY(delegate);
- delegate = view->rootObject()->findChild<QmlGraphicsItem*>("delegateErrorA");
- QVERIFY(!delegate);
+ QTRY_VERIFY(!view->rootObject()); // there is fail item inside this test
//ErrorB should get a component which is ready but component.create() returns null
//Not sure how to accomplish this with QmlGraphicsTextEdits cursor delegate
//###This could be a case of overzealous defensive programming