summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-02-21 13:27:50 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-02-22 09:02:35 +0000
commit1e5ac8c491381f2ef70df6383407e9cbe226b4b9 (patch)
treee841dcf231ae7ef3ba4584bf8de91fcd594905b9 /tests
parentac5a6f9ed06b98aa63981dd5d30e0febf36010d8 (diff)
Catch terminating render process in file picker test
These tests have been broken for some time but we didn't catch that the web-process self-terminated. This change ensures we catch it and adds the failing tests to the black list. It also fixes BLACKLIST support by following what QUICK_TEST_MAIN does. Change-Id: I31cc123e1d653f37e33ccb3a754b9fae8cfe02d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qmltests/BLACKLIST8
-rw-r--r--tests/auto/quick/qmltests/data/tst_filePicker.qml14
-rw-r--r--tests/auto/quick/qmltests/tst_qmltests.cpp4
3 files changed, 24 insertions, 2 deletions
diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST
index dd8258ba4..5788ce25b 100644
--- a/tests/auto/quick/qmltests/BLACKLIST
+++ b/tests/auto/quick/qmltests/BLACKLIST
@@ -10,3 +10,11 @@ linux
[DesktopWebEngineViewLinkHovered::test_linkHoveredDoesntEmitRepeated]
linux
+[WebEngineViewSingleFileUpload::test_acceptDirectory]
+*
+
+[WebEngineViewSingleFileUpload::test_acceptMultipleFilesSelection]
+*
+
+[WebEngineViewSingleFileUpload::test_acceptSingleFileSelection]
+*
diff --git a/tests/auto/quick/qmltests/data/tst_filePicker.qml b/tests/auto/quick/qmltests/data/tst_filePicker.qml
index 4e74af733..655789bb3 100644
--- a/tests/auto/quick/qmltests/data/tst_filePicker.qml
+++ b/tests/auto/quick/qmltests/data/tst_filePicker.qml
@@ -41,6 +41,11 @@ TestWebEngineView {
target: webEngineView
signalName: "titleChanged"
}
+ SignalSpy {
+ id: terminationSpy
+ target: webEngineView
+ signalName: "renderProcessTerminated"
+ }
TestCase {
name: "WebEngineViewSingleFileUpload"
@@ -51,11 +56,16 @@ TestWebEngineView {
FilePickerParams.selectFiles = false
FilePickerParams.selectedFilesUrl = []
titleSpy.clear()
+ terminationSpy.clear()
}
- // FIXME: Almost every second url loading progress does get stuck at about 90 percent, so the loadFinished signal won't arrive.
- // This cleanup function is a workaround for this problem.
function cleanup() {
+ // Test that the render process doesn't crash, and make sure if it does it does so now.
+ wait(1000)
+ verify(terminationSpy.count == 0, "Render process didn't self terminate")
+
+ // FIXME: Almost every second url loading progress does get stuck at about 90 percent, so the loadFinished signal won't arrive.
+ // This cleanup function is a workaround for this problem.
webEngineView.url = Qt.resolvedUrl("about:blank")
webEngineView.waitForLoadSucceeded()
}
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp
index 6b5c4d00b..fa2f069f5 100644
--- a/tests/auto/quick/qmltests/tst_qmltests.cpp
+++ b/tests/auto/quick/qmltests/tst_qmltests.cpp
@@ -42,6 +42,10 @@ int main(int argc, char **argv)
if (!QCoreApplication::instance())
app.reset(new Application(argc, argv));
QtWebEngine::initialize();
+
+ QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS
+ QTEST_SET_MAIN_SOURCE_PATH
+
int i = quick_test_main(argc, argv, "qmltests", QUICK_TEST_SOURCE_DIR);
return i;
}