diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-03-20 16:55:11 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-15 13:55:53 +0200 |
commit | 6d0367b9b9c7730012f7c6fe0febc831130863b8 (patch) | |
tree | 12fd8674910ba28200a43eadcb0ae4b1f2903070 /tests | |
parent | d3cb4cfcfa11b71b433184b8116aae4dc57758ec (diff) |
Unskip tst_QWebEngineHistory::popPushState
This also add a loadFinished wait and remove the test of the
removed clearState API.
Change-Id: I677ae0aabdd9b115976bba8e87d59ae421f5b978
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp index 14008d075..f92474d05 100644 --- a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp +++ b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp @@ -434,20 +434,17 @@ void tst_QWebEngineHistory::popPushState_data() QTest::newRow("replaceState") << "history.replaceState(\"a\", \"b\");"; QTest::newRow("back") << "history.back();"; QTest::newRow("forward") << "history.forward();"; - QTest::newRow("clearState") << "history.clearState();"; } /** Crash test, WebKit bug 38840 (https://bugs.webengine.org/show_bug.cgi?id=38840) */ void tst_QWebEngineHistory::popPushState() { -#if !defined(QWEBENGINEPAGE_EVALUATEJAVASCRIPT) - QSKIP("QWEBENGINEPAGE_EVALUATEJAVASCRIPT"); -#else QFETCH(QString, script); QWebEnginePage page; + QSignalSpy spyLoadFinished(&page, SIGNAL(loadFinished(bool))); page.setHtml("<html><body>long live Qt!</body></html>"); - page.evaluateJavaScript(script); -#endif + QTRY_COMPARE(spyLoadFinished.count(), 1); + evaluateJavaScriptSync(&page, script); } /** ::clear */ |