diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp | 4 |
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) { |