summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineaccessibility
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2016-10-23 20:22:52 +0200
committerDavid Faure <david.faure@kdab.com>2016-11-29 15:06:18 +0000
commitc0950098f3a7d4994ff07b06b8ff32e2a60ee7bf (patch)
tree30a76adcebee0dd93d63420eab125c148bac1423 /tests/auto/widgets/qwebengineaccessibility
parent01c029fd90162bdbbcf9534537f26138a333c570 (diff)
Port autotests from own waitForSignal() to QSignalSpy::wait()
I added QSignalSpy::wait() in Qt 5.0 exactly for this purpose. Change-Id: I895a92f5f7e4e8554e00f6668e6973cc2c903adf Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/widgets/qwebengineaccessibility')
-rw-r--r--tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp b/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
index 3ed4bcc7..85bfa80f 100644
--- a/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
+++ b/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
@@ -88,7 +88,8 @@ void tst_QWebEngineAccessibility::hierarchy()
"<input type='text' value='some text'></input>" \
"</body></html>");
webView.show();
- ::waitForSignal(&webView, SIGNAL(loadFinished(bool)));
+ QSignalSpy spyFinished(&webView, &QWebEngineView::loadFinished);
+ QVERIFY(spyFinished.wait());
QAccessibleInterface *view = QAccessible::queryAccessibleInterface(&webView);
QVERIFY(view);
@@ -150,7 +151,8 @@ void tst_QWebEngineAccessibility::text()
"<input type='text' value='Good day!' placeholder='day'></input>" \
"</body></html>");
webView.show();
- ::waitForSignal(&webView, SIGNAL(loadFinished(bool)));
+ QSignalSpy spyFinished(&webView, &QWebEngineView::loadFinished);
+ QVERIFY(spyFinished.wait());
QAccessibleInterface *view = QAccessible::queryAccessibleInterface(&webView);
// Wait for accessibility to be fully initialized
@@ -215,7 +217,8 @@ void tst_QWebEngineAccessibility::value()
"<div class='progress' role='progressbar' aria-valuenow='77' aria-valuemin='22' aria-valuemax='99'></div>" \
"</body></html>");
webView.show();
- ::waitForSignal(&webView, SIGNAL(loadFinished(bool)));
+ QSignalSpy spyFinished(&webView, &QWebEngineView::loadFinished);
+ QVERIFY(spyFinished.wait());
QAccessibleInterface *view = QAccessible::queryAccessibleInterface(&webView);
QTRY_COMPARE(view->child(0)->childCount(), 2);