summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2023-09-29 13:18:39 +0200
committerSzabolcs David <davidsz@inf.u-szeged.hu>2023-10-01 22:25:52 +0200
commitb8ee80acdadefff927ed2c2884e0e67c9c2fc9a9 (patch)
treefac6188a607a34c6aa89a4790a11e1e87c778e0d /tests/auto
parent3cbb895954e0d22efc20700a1e66413a8a483124 (diff)
Support filePath argument of save() when saving non-HTML files
Currently the filePath argument of QWebEnginePage::save() is ignored when the user tries to download anything but HTML; and the requested download path is the Downloads folder of the OS. Fix this and adjust the corresponding test case with checking path and file name of the download request. Pick-to: 6.6 Task-number: QTBUG-117624 Change-Id: Ia1d3afc898b1aad223aab772b775724a50e88bd3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/quick/qmltests/data/tst_save.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/quick/qmltests/data/tst_save.qml b/tests/auto/quick/qmltests/data/tst_save.qml
index f07a5f212..08d99022a 100644
--- a/tests/auto/quick/qmltests/data/tst_save.qml
+++ b/tests/auto/quick/qmltests/data/tst_save.qml
@@ -137,6 +137,8 @@ TestWebEngineView {
downLoadRequestedSpy.wait()
compare(downLoadRequestedSpy.count, 1)
compare(downloadUrl, webEngineView.url)
+ compare(downloadDir, fileDir)
+ compare(downloadFileName, fileName)
compare(isSavePageDownload, true)
compare(downloadState[0], WebEngineDownloadRequest.DownloadRequested)
}