summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-25 15:33:01 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-25 14:41:02 +0000
commit448478729cfdf5098dd24a6a870bacdbcd8cf9a7 (patch)
tree546386ed2957dfc39725180a992191745dbef177 /tests
parent5ab157588214bfbbc1d1f258a461b1cab4cc3991 (diff)
Adaptations for Chromium 62
Change-Id: I49cd3c419d4dd1180144c3c07bdd9a628ab73caa Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qmltests/data/tst_favicon.qml4
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadFail.qml4
-rw-r--r--tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp6
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp7
4 files changed, 9 insertions, 12 deletions
diff --git a/tests/auto/quick/qmltests/data/tst_favicon.qml b/tests/auto/quick/qmltests/data/tst_favicon.qml
index 1159f3194..6f8adeb67 100644
--- a/tests/auto/quick/qmltests/data/tst_favicon.qml
+++ b/tests/auto/quick/qmltests/data/tst_favicon.qml
@@ -179,7 +179,7 @@ TestWebEngineView {
compare(iconChangedSpy.count, 0)
- var url = Qt.resolvedUrl("invalid://url")
+ var url = Qt.resolvedUrl("http://url.invalid")
webEngineView.url = url
verify(webEngineView.waitForLoadFailed())
verify(webEngineView.testSupport.waitForErrorPageLoadSucceeded())
@@ -195,7 +195,7 @@ TestWebEngineView {
compare(iconChangedSpy.count, 0)
- var url = Qt.resolvedUrl("invalid://url")
+ var url = Qt.resolvedUrl("http://url.invalid")
webEngineView.url = url
verify(webEngineView.waitForLoadFailed())
diff --git a/tests/auto/quick/qmltests/data/tst_loadFail.qml b/tests/auto/quick/qmltests/data/tst_loadFail.qml
index 47f4a2862..7b51009a1 100644
--- a/tests/auto/quick/qmltests/data/tst_loadFail.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadFail.qml
@@ -128,14 +128,14 @@ TestWebEngineView {
loadRequest = loadRequestArray[2]
compare(loadRequest.status, WebEngineView.LoadStartedStatus)
compare(loadRequest.errorDomain, WebEngineView.NoErrorDomain)
- compare(loadRequest.url, "data:text/html,chromewebdata")
+ compare(loadRequest.url, "chrome-error://chromewebdata/")
verify(loadRequest.isErrorPage)
// Loading of the error page must be successful
loadRequest = loadRequestArray[3]
compare(loadRequest.status, WebEngineView.LoadSucceededStatus)
compare(loadRequest.errorDomain, WebEngineView.NoErrorDomain)
- compare(loadRequest.url, "data:text/html,chromewebdata")
+ compare(loadRequest.url, "chrome-error://chromewebdata/")
verify(loadRequest.isErrorPage)
compare(webEngineView.url, unavailableUrl)
diff --git a/tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp b/tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp
index 6ae4c41e6..0f7d590c2 100644
--- a/tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp
+++ b/tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp
@@ -236,10 +236,10 @@ void tst_QWebEngineFaviconManager::errorPageEnabled()
QSignalSpy iconUrlChangedSpy(m_page, SIGNAL(iconUrlChanged(QUrl)));
QSignalSpy iconChangedSpy(m_page, SIGNAL(iconChanged(QIcon)));
- QUrl url("invalid://url");
+ QUrl url("http://url.invalid");
m_page->load(url);
- QTRY_COMPARE(loadFinishedSpy.count(), 2);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 12000);
QCOMPARE(iconUrlChangedSpy.count(), 0);
QCOMPARE(iconChangedSpy.count(), 0);
@@ -255,7 +255,7 @@ void tst_QWebEngineFaviconManager::errorPageDisabled()
QSignalSpy iconUrlChangedSpy(m_page, SIGNAL(iconUrlChanged(QUrl)));
QSignalSpy iconChangedSpy(m_page, SIGNAL(iconChanged(QIcon)));
- QUrl url("invalid://url");
+ QUrl url("http://url.invalid");
m_page->load(url);
QTRY_COMPARE(loadFinishedSpy.count(), 1);
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 7d6921368..c41b07b47 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -4053,10 +4053,8 @@ void tst_QWebEnginePage::setUrlUsingStateObject()
url = QUrl("qrc:/resources/test1.html");
m_page->setUrl(url);
- QSignalSpy spyFinished(m_page, &QWebEnginePage::loadFinished);
- QVERIFY(spyFinished.wait());
expectedUrlChangeCount++;
- QCOMPARE(urlChangedSpy.count(), expectedUrlChangeCount);
+ QTRY_COMPARE(urlChangedSpy.count(), expectedUrlChangeCount);
QCOMPARE(m_page->url(), url);
QCOMPARE(m_page->history()->count(), 1);
@@ -4076,9 +4074,8 @@ void tst_QWebEnginePage::setUrlUsingStateObject()
QVERIFY(m_page->history()->canGoBack());
evaluateJavaScriptSync(m_page, "window.history.back()");
- QTest::qWait(100);
expectedUrlChangeCount++;
- QCOMPARE(urlChangedSpy.count(), expectedUrlChangeCount);
+ QTRY_COMPARE(urlChangedSpy.count(), expectedUrlChangeCount);
QCOMPARE(m_page->url(), QUrl("qrc:/resources/test1.html"));
QVERIFY(m_page->history()->canGoForward());
QVERIFY(!m_page->history()->canGoBack());