From a193b3b9abb6d742b40d0a8067155932a5c2c2d3 Mon Sep 17 00:00:00 2001 From: Adam Kallai Date: Mon, 15 Sep 2014 02:18:01 -0700 Subject: Fix an assertion in web_content_delegates_qt.cpp If we get a replacement content, we can see a DidFinishLoad event for a frame. This error page should be ignored based on the frame. Change-Id: I3e1cd1773e8c5fc608605197c957011ddf258123 Reviewed-by: Jocelyn Turcotte --- tests/auto/quick/qmltests/data/tst_loadFail.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/quick/qmltests/data/tst_loadFail.qml b/tests/auto/quick/qmltests/data/tst_loadFail.qml index e2282129f..7b0a1849e 100644 --- a/tests/auto/quick/qmltests/data/tst_loadFail.qml +++ b/tests/auto/quick/qmltests/data/tst_loadFail.qml @@ -50,6 +50,12 @@ TestWebEngineView { property variant testUrl + SignalSpy { + id: spyIconChanged + target: webEngineView + signalName: "iconChanged" + } + TestCase { id: test name: "WebEngineViewLoadFail" @@ -57,6 +63,11 @@ TestWebEngineView { testUrl = Qt.resolvedUrl("file_that_does_not_exist.html") webEngineView.url = testUrl verify(webEngineView.waitForLoadFailed()) + spyIconChanged.clear() + + // If this testcase finishes too early, we can not handle the received replacement content. + // So we should wait to ignore this error page. + spyIconChanged.wait() } } -- cgit v1.2.3