summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/publicapi
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2022-05-09 13:06:06 +0200
committerSzabolcs David <davidsz@inf.u-szeged.hu>2022-05-26 12:10:35 +0200
commit567739fda232c28992962f32a9e652eab723a4d4 (patch)
treecb933c189d87ed104f71ad8393d9e93d0eec193a /tests/auto/quick/publicapi
parent2ba1f04b4589e5883a399b022b7795266c4d4646 (diff)
Implement File System Access permission API
Allow web pages to safely access the local file system by exposing a permission API. Permissions are stored in-memory. The built-in access rules are the same as the behavior of Chrome: JS can't request access to system libraries, sensitive directories and the application itself. Task-number: QTBUG-97829 Change-Id: Ic675422cafbad5a90243b4fa8f0749c46afa192c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/quick/publicapi')
-rw-r--r--tests/auto/quick/publicapi/tst_publicapi.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index edec675f6..3b7da9759 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -35,6 +35,7 @@
#include <QtTest/QtTest>
#include <QtWebEngineQuick/QQuickWebEngineProfile>
#include <QtWebEngineCore/QWebEngineCertificateError>
+#include <QtWebEngineCore/QWebEngineFileSystemAccessRequest>
#include <QtWebEngineCore/QWebEngineFindTextResult>
#include <QtWebEngineCore/QWebEngineFullScreenRequest>
#include <QtWebEngineCore/QWebEngineHistory>
@@ -85,6 +86,7 @@ static const QList<const QMetaObject *> typesToCheck = QList<const QMetaObject *
<< &QQuickWebEngineTooltipRequest::staticMetaObject
<< &QWebEngineContextMenuRequest::staticMetaObject
<< &QWebEngineCertificateError::staticMetaObject
+ << &QWebEngineFileSystemAccessRequest::staticMetaObject
<< &QWebEngineFindTextResult::staticMetaObject
<< &QWebEngineLoadingInfo::staticMetaObject
<< &QWebEngineNavigationRequest::staticMetaObject
@@ -288,6 +290,16 @@ static const QStringList expectedAPI = QStringList()
<< "QWebEngineFullScreenRequest.origin --> QUrl"
<< "QWebEngineFullScreenRequest.reject() --> void"
<< "QWebEngineFullScreenRequest.toggleOn --> bool"
+ << "QWebEngineFileSystemAccessRequest.File --> HandleType"
+ << "QWebEngineFileSystemAccessRequest.Directory --> HandleType"
+ << "QWebEngineFileSystemAccessRequest.Read --> AccessFlags"
+ << "QWebEngineFileSystemAccessRequest.Write --> AccessFlags"
+ << "QWebEngineFileSystemAccessRequest.origin --> QUrl"
+ << "QWebEngineFileSystemAccessRequest.filePath --> QUrl"
+ << "QWebEngineFileSystemAccessRequest.handleType --> QWebEngineFileSystemAccessRequest::HandleType"
+ << "QWebEngineFileSystemAccessRequest.accessFlags --> QFlags<QWebEngineFileSystemAccessRequest::AccessFlag>"
+ << "QWebEngineFileSystemAccessRequest.accept() --> void"
+ << "QWebEngineFileSystemAccessRequest.reject() --> void"
<< "QWebEngineHistory.backItems --> QWebEngineHistoryModel*"
<< "QWebEngineHistory.clear() --> void"
<< "QWebEngineHistory.forwardItems --> QWebEngineHistoryModel*"
@@ -697,6 +709,7 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.devToolsViewChanged() --> void"
<< "QQuickWebEngineView.featurePermissionRequested(QUrl,Feature) --> void"
<< "QQuickWebEngineView.fileDialogRequested(QQuickWebEngineFileDialogRequest*) --> void"
+ << "QQuickWebEngineView.fileSystemAccessRequested(QWebEngineFileSystemAccessRequest) --> void"
<< "QQuickWebEngineView.findText(QString) --> void"
<< "QQuickWebEngineView.findText(QString,FindFlags) --> void"
<< "QQuickWebEngineView.findText(QString,FindFlags,QJSValue) --> void"