summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-02-11 23:55:56 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-02-12 00:32:44 (GMT)
commit8e872ed96a77a1bef37a5612e1825bd045447029 (patch)
tree947df709c6c5a39c56d469c5892dddb9a7f855e4 /tests
parent4a6feeca991bce5029a74d0e052e0ae2bdb8c207 (diff)
downloadQt-8e872ed96a77a1bef37a5612e1825bd045447029.zip
Qt-8e872ed96a77a1bef37a5612e1825bd045447029.tar.gz
Qt-8e872ed96a77a1bef37a5612e1825bd045447029.tar.bz2
Fixed race condition in tst_qmlgraphicswebview::multipleWindows
This timer must not be started until the web view has finished loading.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml2
-rw-r--r--tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml b/tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml
index 9d13715..b8524af 100644
--- a/tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml
+++ b/tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml
@@ -21,7 +21,7 @@ Grid {
newWindowParent: pages
url: "newwindows.html"
Timer {
- interval: 10; running: total<4; repeat: false;
+ interval: 10; running: webView.status==WebView.Ready && total<4; repeat: false;
onTriggered: {total++; webView.evaluateJavaScript("clickTheLink()")}
}
}
diff --git a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
index c244030..6996a6c 100644
--- a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
+++ b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
@@ -114,6 +114,10 @@ void tst_qmlgraphicswebview::cleanupTestCase()
void tst_qmlgraphicswebview::checkNoErrors(const QmlComponent& component)
{
+ // Wait until the component is ready
+ QTRY_VERIFY(component.isReady());
+
+
if (component.isError()) {
QList<QmlError> errors = component.errors();
for (int ii = 0; ii < errors.count(); ++ii) {