diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-06-06 13:51:01 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-06-14 12:41:36 +0000 |
commit | ce5da3f31cd8d5a422053f003be2f5b1b432b1bb (patch) | |
tree | 3f6dceacfc8c082e35b0d74a7c505f0b7533d455 /tests/auto/core/qwebengineurlrequestinterceptor | |
parent | b50ad69de28ae3aac9d374d95514a759339cd31a (diff) |
Auto test adaptations for Chromium 58
Adjustments to auto tests to pass with Chromium 58
Change-Id: I7f6905e5344c528c608734bc660cbf43c89d4a63
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/core/qwebengineurlrequestinterceptor')
-rw-r--r-- | tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp b/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp index 89ebbac62..daf4d811e 100644 --- a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp +++ b/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp @@ -106,6 +106,7 @@ void tst_QWebEngineUrlRequestInterceptor::interceptRequest() { QWebEngineView view; TestRequestInterceptor interceptor(/* intercept */ true); + view.page()->settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false); QSignalSpy loadSpy(&view, SIGNAL(loadFinished(bool))); view.page()->profile()->setRequestInterceptor(&interceptor); @@ -193,21 +194,19 @@ void tst_QWebEngineUrlRequestInterceptor::requestedUrl() page.setUrl(QUrl("qrc:///resources/__placeholder__")); QVERIFY(spy.wait()); - QCOMPARE(spy.count(), 1); + QTRY_COMPARE(spy.count(), 1); QCOMPARE(interceptor.observedUrls.at(0), QUrl("qrc:///resources/content.html")); QCOMPARE(page.requestedUrl(), QUrl("qrc:///resources/__placeholder__")); QCOMPARE(page.url(), QUrl("qrc:///resources/content.html")); page.setUrl(QUrl("qrc:/non-existent.html")); - QVERIFY(spy.wait()); - QCOMPARE(spy.count(), 2); + QTRY_COMPARE(spy.count(), 2); QCOMPARE(interceptor.observedUrls.at(2), QUrl("qrc:/non-existent.html")); QCOMPARE(page.requestedUrl(), QUrl("qrc:///resources/__placeholder__")); QCOMPARE(page.url(), QUrl("qrc:///resources/content.html")); page.setUrl(QUrl("http://abcdef.abcdef")); - QVERIFY(spy.wait()); - QCOMPARE(spy.count(), 3); + QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 3, 12000); QCOMPARE(interceptor.observedUrls.at(3), QUrl("http://abcdef.abcdef/")); QCOMPARE(page.requestedUrl(), QUrl("qrc:///resources/__placeholder__")); QCOMPARE(page.url(), QUrl("qrc:///resources/content.html")); |