summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2016-11-02 18:20:14 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2016-11-08 06:38:35 +0000
commitc15c0f5620a15996f4d178e628f5bd401ab34279 (patch)
treeed98770592da59c7b79f3e01b1a6ff8b2aec87e8 /tests
parent4abee8c89a47592fecd4c0f9247efa600710a06b (diff)
Fix crash when trying to execute script on a detached RenderFrame
Task-number: QTBUG-56661 Change-Id: I546222dde64c54955c62d2c30df79d4773b9973c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qmltests/BLACKLIST3
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadUrl.qml31
2 files changed, 19 insertions, 15 deletions
diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST
index a993fcd32..dea9f3ca1 100644
--- a/tests/auto/quick/qmltests/BLACKLIST
+++ b/tests/auto/quick/qmltests/BLACKLIST
@@ -9,6 +9,3 @@ osx
[WebViewGeopermission::test_geoPermissionRequest]
osx
-
-[WebEngineViewLoadUrl::test_loadDataUrl]
-windows
diff --git a/tests/auto/quick/qmltests/data/tst_loadUrl.qml b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
index 49db85a3e..2a43e1577 100644
--- a/tests/auto/quick/qmltests/data/tst_loadUrl.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
@@ -189,13 +189,6 @@ TestWebEngineView {
var loadRequest = null;
// Test load of a data URL
- // QTBUG-56661: Loading an URL before the data URL load improves the probability
- // of the render process crash after the data URL load.
- var url = Qt.resolvedUrl("test1.html");
- webEngineView.url = url;
- verify(webEngineView.waitForLoadSucceeded());
- webEngineView.clear();
-
var dataUrl = "data:text/html,foo";
webEngineView.url = dataUrl;
tryCompare(loadRequestArray, "length", 2);
@@ -208,11 +201,6 @@ TestWebEngineView {
compare(loadRequest.activeUrl, dataUrl);
webEngineView.clear();
- // QTBUG-56661: This load might fail on Windows
- webEngineView.url = url;
- verify(webEngineView.waitForLoadSucceeded());
- webEngineView.clear();
-
// Test loadHtml after a failed load
var aboutBlank = "about:blank";
webEngineView.url = aboutBlank; // Reset from previous test
@@ -249,6 +237,25 @@ TestWebEngineView {
webEngineView.clear();
}
+ function test_QTBUG_56661() {
+ var url = Qt.resolvedUrl("test1.html");
+
+ // Warm up phase
+ webEngineView.url = url;
+ verify(webEngineView.waitForLoadSucceeded());
+
+ // Load data URL
+ var dataUrl = "data:text/html,foo";
+ webEngineView.url = dataUrl;
+ verify(webEngineView.waitForLoadSucceeded());
+
+ // WebEngine should not try to execute user scripts in the
+ // render frame of the warm up phase otherwise the renderer
+ // crashes.
+ webEngineView.url = url;
+ verify(webEngineView.waitForLoadSucceeded());
+ }
+
function test_stopStatus() {
var loadRequest = null;