From 70a76770763a4abd5cc9ce27659db16746dce06c Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 8 Feb 2017 13:41:15 +0100 Subject: 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 --- tests/auto/quick/qmltests/data/TestWebEngineView.qml | 2 +- tests/auto/quick/qmltests/data/tst_loadFail.qml | 2 +- tests/auto/quick/qmltests/data/tst_loadUrl.qml | 4 ++-- tests/auto/quick/qmltests/data/tst_viewSource.qml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/auto/quick/qmltests/data') diff --git a/tests/auto/quick/qmltests/data/TestWebEngineView.qml b/tests/auto/quick/qmltests/data/TestWebEngineView.qml index aa1f77942..a7d890072 100644 --- a/tests/auto/quick/qmltests/data/TestWebEngineView.qml +++ b/tests/auto/quick/qmltests/data/TestWebEngineView.qml @@ -53,7 +53,7 @@ WebEngineView { return _waitFor(function() { return windowCloseRequestedSignalEmitted; }); } function _waitFor(predicate) { - var timeout = 5000 + var timeout = 12000 var i = 0 while (i < timeout && !predicate()) { testResult.wait(50) diff --git a/tests/auto/quick/qmltests/data/tst_loadFail.qml b/tests/auto/quick/qmltests/data/tst_loadFail.qml index 9ce70fc96..47f4a2862 100644 --- a/tests/auto/quick/qmltests/data/tst_loadFail.qml +++ b/tests/auto/quick/qmltests/data/tst_loadFail.qml @@ -139,7 +139,7 @@ TestWebEngineView { verify(loadRequest.isErrorPage) compare(webEngineView.url, unavailableUrl) - compare(webEngineView.title, unavailableUrl + " failed to load") + compare(webEngineView.title, unavailableUrl) } } } diff --git a/tests/auto/quick/qmltests/data/tst_loadUrl.qml b/tests/auto/quick/qmltests/data/tst_loadUrl.qml index 2a43e1577..2cb9f6b81 100644 --- a/tests/auto/quick/qmltests/data/tst_loadUrl.qml +++ b/tests/auto/quick/qmltests/data/tst_loadUrl.qml @@ -126,7 +126,7 @@ TestWebEngineView { // Test failed load var bogusSite = "http://www.somesitethatdoesnotexist.abc/"; webEngineView.url = bogusSite; - tryCompare(loadRequestArray, "length", 2); + tryCompare(loadRequestArray, "length", 2, 12000); loadRequest = loadRequestArray[0]; compare(loadRequest.status, WebEngineView.LoadStartedStatus); @@ -217,7 +217,7 @@ TestWebEngineView { } webEngineView.loadingChanged.connect(handleLoadFailed); webEngineView.url = bogusSite - tryCompare(loadRequestArray, "length", 4); + tryCompare(loadRequestArray, "length", 4, 12000); webEngineView.loadingChanged.disconnect(handleLoadFailed); loadRequest = loadRequestArray[0]; diff --git a/tests/auto/quick/qmltests/data/tst_viewSource.qml b/tests/auto/quick/qmltests/data/tst_viewSource.qml index 8076d99f8..22c3947d3 100644 --- a/tests/auto/quick/qmltests/data/tst_viewSource.qml +++ b/tests/auto/quick/qmltests/data/tst_viewSource.qml @@ -103,8 +103,8 @@ TestWebEngineView { { tag: "view-source:about:blank", userInputUrl: "view-source:about:blank", loadSucceed: true, url: "view-source:about:blank", title: "view-source:about:blank" }, { tag: testLocalUrl, userInputUrl: testLocalUrl, loadSucceed: true, url: testLocalUrl, title: "test1.html" }, { tag: testLocalUrlWithoutScheme, userInputUrl: testLocalUrlWithoutScheme, loadSucceed: true, url: testLocalUrl, title: "test1.html" }, - { tag: "view-source:http://non.existent", userInputUrl: "view-source:http://non.existent", loadSucceed: false, url: "view-source:http://non.existent/", title: "http://non.existent/ is not available" }, - { tag: "view-source:non.existent", userInputUrl: "view-source:non.existent", loadSucceed: false, url: "view-source:http://non.existent/", title: "http://non.existent/ is not available" }, + { tag: "view-source:http://non.existent", userInputUrl: "view-source:http://non.existent", loadSucceed: false, url: "view-source:http://non.existent/", title: "non.existent" }, + { tag: "view-source:non.existent", userInputUrl: "view-source:non.existent", loadSucceed: false, url: "view-source:http://non.existent/", title: "non.existent" }, ]; } -- cgit v1.2.3