diff options
author | Kirill Burtsev <kirill.burtsev@qt.io> | 2019-02-27 19:02:50 +0100 |
---|---|---|
committer | Aapo Keskimolo <aapo.keskimolo@qt.io> | 2019-03-19 20:40:40 +0000 |
commit | 0f30fe4b6ae26b4797272926318c31b1f07acc20 (patch) | |
tree | 70aa42b8f45dd9613bdb12cfda6220509f32361c /tests/auto/quick | |
parent | 10e65c418625f586430d3033e71bd3b4d69b7420 (diff) |
Notification API cleanup: direction type, parameter and method names
Change-Id: I0349f3eea0028a4df917af8599c073227e0d0ec1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/quick')
-rw-r--r-- | tests/auto/quick/publicapi/tst_publicapi.cpp | 6 | ||||
-rw-r--r-- | tests/auto/quick/qmltests/data/tst_notification.qml | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp index b89652625..0012249c8 100644 --- a/tests/auto/quick/publicapi/tst_publicapi.cpp +++ b/tests/auto/quick/publicapi/tst_publicapi.cpp @@ -99,6 +99,7 @@ static const QStringList hardcodedTypes = QStringList() << "QQuickWebEngineErrorPage*" << "const QQuickWebEngineContextMenuData*" << "QWebEngineCookieStore*" + << "Qt::LayoutDirection" ; static const QStringList expectedAPI = QStringList() @@ -760,10 +761,7 @@ static const QStringList expectedAPI = QStringList() << "QWebEngineNotification.message --> QString" << "QWebEngineNotification.tag --> QString" << "QWebEngineNotification.language --> QString" - << "QWebEngineNotification.direction --> Direction" - << "QWebEngineNotification.LeftToRight --> Direction" - << "QWebEngineNotification.RightToLeft --> Direction" - << "QWebEngineNotification.DirectionAuto --> Direction" + << "QWebEngineNotification.direction --> Qt::LayoutDirection" << "QWebEngineNotification.show() --> void" << "QWebEngineNotification.click() --> void" << "QWebEngineNotification.close() --> void" diff --git a/tests/auto/quick/qmltests/data/tst_notification.qml b/tests/auto/quick/qmltests/data/tst_notification.qml index 609a04f61..af4aebafc 100644 --- a/tests/auto/quick/qmltests/data/tst_notification.qml +++ b/tests/auto/quick/qmltests/data/tst_notification.qml @@ -37,6 +37,7 @@ TestWebEngineView { property bool permissionRequested: false property bool grantPermission: false + property url securityOrigin: '' signal consoleMessage(string message) @@ -48,7 +49,8 @@ TestWebEngineView { onFeaturePermissionRequested: { if (feature === WebEngineView.Notifications) { - permissionRequested = true + view.permissionRequested = true + view.securityOrigin = securityOrigin view.grantFeaturePermission(securityOrigin, feature, grantPermission) } } @@ -111,6 +113,10 @@ TestWebEngineView { tryVerify(function () { return notification !== null }) compare(notification.title, title) compare(notification.message, message) + compare(notification.direction, Qt.RightToLeft) + compare(notification.origin, securityOrigin) + compare(notification.tag, 'tst') + compare(notification.language, 'de') } } } |