summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-02-08 13:41:15 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-01 12:06:35 +0000
commit70a76770763a4abd5cc9ce27659db16746dce06c (patch)
tree949350035ce0c254926cbfb24f413992aa8cd3a7 /tests/auto/widgets
parenta6e3b9113ba28fee9f705bb93cddaadfec43a917 (diff)
Update auto tests for Chromium 55
Load failures now have a Chromium side timeout of 10s so we need to wait longer than that. Additionally error-pages no longer have descriptive titles, so we can not rely on that in our tests any longer. Change-Id: I33ac8b9f1247403eb214f7260267edb887fe10d0 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp16
-rw-r--r--tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp1
2 files changed, 8 insertions, 9 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 7e78e2b0e..cf409654c 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -3713,8 +3713,7 @@ void tst_QWebEnginePage::requestedUrlAfterSetAndLoadFailures()
const QUrl first("http://abcdef.abcdef/");
page.setUrl(first);
- QVERIFY(spy.wait());
- QCOMPARE(spy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 1, 12000);
QCOMPARE(page.url(), first);
QCOMPARE(page.requestedUrl(), first);
QVERIFY(!spy.at(0).first().toBool());
@@ -3723,8 +3722,7 @@ void tst_QWebEnginePage::requestedUrlAfterSetAndLoadFailures()
QVERIFY(first != second);
page.load(second);
- QVERIFY(spy.wait());
- QCOMPARE(spy.count(), 2);
+ QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 2, 12000);
QCOMPARE(page.url(), first);
QCOMPARE(page.requestedUrl(), second);
QVERIFY(!spy.at(1).first().toBool());
@@ -4494,11 +4492,11 @@ void tst_QWebEnginePage::loadFinishedAfterNotFoundError()
page.settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
page.setUrl(QUrl("http://non.existent/url"));
- QTRY_COMPARE(spy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 1, 12000);
page.settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, true);
page.setUrl(QUrl("http://another.non.existent/url"));
- QTRY_COMPARE(spy.count(), 2);
+ QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 2, 12000);
}
class URLSetter : public QObject {
@@ -4816,8 +4814,8 @@ void tst_QWebEnginePage::viewSourceURL_data()
QUrl testResourceUrl = QUrl(QString("view-source:%1").arg(resourcePath));
QTest::newRow(testResourceUrl.toString().toStdString().c_str()) << testResourceUrl << true << testResourceUrl << QUrl(resourcePath) << testResourceUrl.toString();
- QTest::newRow("view-source:http://non.existent") << QUrl("view-source:non.existent") << false << QUrl("view-source:http://non.existent/") << QUrl("http://non.existent/") << QString("http://non.existent/ is not available");
- QTest::newRow("view-source:non.existent") << QUrl("view-source:non.existent") << false << QUrl("view-source:http://non.existent/") << QUrl("http://non.existent/") << QString("http://non.existent/ is not available");
+ QTest::newRow("view-source:http://non.existent") << QUrl("view-source:non.existent") << false << QUrl("view-source:http://non.existent/") << QUrl("http://non.existent/") << QString("non.existent");
+ QTest::newRow("view-source:non.existent") << QUrl("view-source:non.existent") << false << QUrl("view-source:http://non.existent/") << QUrl("http://non.existent/") << QString("non.existent");
}
void tst_QWebEnginePage::viewSourceURL()
@@ -4835,7 +4833,7 @@ void tst_QWebEnginePage::viewSourceURL()
QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
page.load(userInputUrl);
- QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 12000);
QList<QVariant> arguments = loadFinishedSpy.takeFirst();
QCOMPARE(arguments.at(0).toBool(), loadSucceed);
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
index b173c3474..0451a8c0f 100644
--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
+++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
@@ -854,6 +854,7 @@ void tst_QWebEngineView::focusOnNavigation()
void tst_QWebEngineView::changeLocale()
{
+ QSKIP("Error pages no longer have useful titles in Chromium 55");
QUrl url("http://non.existent/");
QLocale::setDefault(QLocale("de"));