summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/publicapi/tst_publicapi.cpp10
-rw-r--r--tests/auto/quick/qmltests/data/tst_download.qml8
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index 90b768ac7..787510422 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -80,6 +80,7 @@ static const QList<const QMetaObject *> typesToCheck = QList<const QMetaObject *
<< &QQuickWebEngineColorDialogRequest::staticMetaObject
<< &QQuickWebEngineFileDialogRequest::staticMetaObject
<< &QQuickWebEngineFormValidationMessageRequest::staticMetaObject
+ << &QQuickWebEngineTooltipRequest::staticMetaObject
<< &QQuickWebEngineContextMenuRequest::staticMetaObject
<< &QWebEngineQuotaRequest::staticMetaObject
<< &QWebEngineRegisterProtocolHandlerRequest::staticMetaObject
@@ -259,6 +260,7 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineDownloadItem.type --> DownloadType"
<< "QQuickWebEngineDownloadItem.typeChanged() --> void"
<< "QQuickWebEngineDownloadItem.view --> QQuickWebEngineView*"
+ << "QQuickWebEngineDownloadItem.url --> QUrl"
<< "QQuickWebEngineFileDialogRequest.FileModeOpen --> FileMode"
<< "QQuickWebEngineFileDialogRequest.FileModeOpenMultiple --> FileMode"
<< "QQuickWebEngineFileDialogRequest.FileModeSave --> FileMode"
@@ -277,6 +279,13 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineFormValidationMessageRequest.subText --> QString"
<< "QQuickWebEngineFormValidationMessageRequest.text --> QString"
<< "QQuickWebEngineFormValidationMessageRequest.type --> RequestType"
+ << "QQuickWebEngineTooltipRequest.Hide --> RequestType"
+ << "QQuickWebEngineTooltipRequest.Show --> RequestType"
+ << "QQuickWebEngineTooltipRequest.x --> int"
+ << "QQuickWebEngineTooltipRequest.y --> int"
+ << "QQuickWebEngineTooltipRequest.text --> QString"
+ << "QQuickWebEngineTooltipRequest.type --> RequestType"
+ << "QQuickWebEngineTooltipRequest.accepted --> bool"
<< "QQuickWebEngineFullScreenRequest.accept() --> void"
<< "QQuickWebEngineFullScreenRequest.origin --> QUrl"
<< "QQuickWebEngineFullScreenRequest.reject() --> void"
@@ -736,6 +745,7 @@ static const QStringList expectedAPI = QStringList()
#endif
<< "QQuickWebEngineView.title --> QString"
<< "QQuickWebEngineView.titleChanged() --> void"
+ << "QQuickWebEngineView.tooltipRequested(QQuickWebEngineTooltipRequest*) --> void"
<< "QQuickWebEngineView.triggerWebAction(WebAction) --> void"
<< "QQuickWebEngineView.url --> QUrl"
<< "QQuickWebEngineView.urlChanged() --> void"
diff --git a/tests/auto/quick/qmltests/data/tst_download.qml b/tests/auto/quick/qmltests/data/tst_download.qml
index 5eb704cce..04838f57d 100644
--- a/tests/auto/quick/qmltests/data/tst_download.qml
+++ b/tests/auto/quick/qmltests/data/tst_download.qml
@@ -28,7 +28,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtWebEngine 1.9
+import QtWebEngine 1.10
import Qt.labs.platform 1.0
TestWebEngineView {
@@ -42,6 +42,7 @@ TestWebEngineView {
property bool cancelDownload: false
property var downloadState: []
property var downloadInterruptReason: null
+ property url downloadUrl: ""
function urlToPath(url) {
var path = url.toString()
@@ -81,6 +82,7 @@ TestWebEngineView {
download.path = "testfile.zip"
download.accept()
}
+ downloadUrl = download.url
}
onDownloadFinished: {
receivedBytes = download.receivedBytes;
@@ -106,6 +108,7 @@ TestWebEngineView {
webEngineView.url = Qt.resolvedUrl("download.zip")
downLoadRequestedSpy.wait()
compare(downLoadRequestedSpy.count, 1)
+ compare(downloadUrl, webEngineView.url)
compare(downloadState[0], WebEngineDownloadItem.DownloadRequested)
verify(!downloadInterruptReason)
}
@@ -115,6 +118,7 @@ TestWebEngineView {
webEngineView.url = Qt.resolvedUrl("download.zip")
downLoadRequestedSpy.wait()
compare(downLoadRequestedSpy.count, 1)
+ compare(downloadUrl, webEngineView.url)
compare(totalBytes, 325)
verify(!downloadInterruptReason)
}
@@ -124,6 +128,7 @@ TestWebEngineView {
webEngineView.url = Qt.resolvedUrl("download.zip")
downLoadRequestedSpy.wait()
compare(downLoadRequestedSpy.count, 1)
+ compare(downloadUrl, webEngineView.url)
compare(downloadState[0], WebEngineDownloadItem.DownloadRequested)
tryCompare(downloadState, "1", WebEngineDownloadItem.DownloadInProgress)
downloadFinishedSpy.wait()
@@ -138,6 +143,7 @@ TestWebEngineView {
webEngineView.url = Qt.resolvedUrl("download.zip")
downLoadRequestedSpy.wait()
compare(downLoadRequestedSpy.count, 1)
+ compare(downloadUrl, webEngineView.url)
compare(downloadFinishedSpy.count, 1)
tryCompare(downloadState, "1", WebEngineDownloadItem.DownloadCancelled)
tryCompare(webEngineView, "downloadInterruptReason", WebEngineDownloadItem.UserCanceled)