summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qmltests
Commit message (Collapse)AuthorAgeFilesLines
* WebEngineNavigationRequest: add accept/reject and deprecate setActionKirill Burtsev2021-07-211-3/+3
| | | | | | | | | | | | | Match naming with others and use accept/reject methods to handle request. Also, allow to use request object after call scope in QML. [ChangeLog][QWebEngineQuick][WebEngineNavigationRequest] setAction(action) is deprecated in favor of new accept/reject methods Change-Id: I83252370e2e83017008f6951f98b7ecad119e232 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 13254e7950a032ebbeb11b1cf54b850c8326fb30) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Get rid of Quick's TestSupport APIPeter Varga2021-07-2112-258/+253
| | | | | | | | | | | | - Moved TestInputContext and TestInputEvent APIs to tst_qmltests. - Removed loadVisuallyCommitted and use Item.grabToImage to check if page is rendered. - Removed windowCloseRejected signal and use a hidden callback instead. Change-Id: Ica6e4c6017426e0171d738a6a59afa557c786698 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 9c663f51c63f7661edcc604ce89171b3f037543d) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove deprecated useforglobalcertificateverificationPeter Varga2021-07-063-68/+0
| | | | | | | | | | | | | It enabled an unrecommended OCSP path on Linux [ChangeLog] (Q)WebEngineSettings::useForGlobalCertificateVerification has been removed. Task-number: QTBUG-91467 Change-Id: I9f5d1ad5e4fcb59abd31e6a133ded7bf8319c811 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit 8f7a386a5228428122813ebea1d7489783b00633) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Restore WebEngineNewViewRequest::openIn methodAllan Sandfeld Jensen2021-07-061-2/+4
| | | | | | | | Change-Id: Ib765970d4c57f742a53cd4d2c870b00628d527aa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit ca4ba8beb736efcd95445cc801e2b5a77642a931) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove Quick Controls 1 UIDelegates and introduce UIDelegates testBalazs Egedi2021-07-0610-12/+6
| | | | | | | | | | | | | - Renamed Controls2Delegates to ControlsDelegates - Removed option to use Quick Controls 1 delegates - Added test to check if controls are shown Task-number: QTBUG-93666 Change-Id: Iccca948615309285db7fc57d14fb1cdcdef28051 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit 4fe808a8c0ecd143199781e9644a46e4b1b90653) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add mock Menu UIDelegates for Quick Controls 2Balazs Egedi2021-07-068-101/+66
| | | | | | | | | | | Menu and MenuItem are added to Controls2Delegates. contextMenu auto test now works without any Quick Controls. Task-number: QTBUG-93666 Change-Id: Ia2fdaef3456a44cc8792ed4e26c1c13bfee7858e Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit d65c2dc52f758657cce4617517d11cbd1912a4ed) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Stabilize WebViewGeoPermission QML auto testPeter Varga2021-07-052-20/+29
| | | | | | | | | | Do not rely on console messages. Empty message doesn't trigger signal nor is shown in terminal (after 90-based). Change-Id: I8bb705a2e2ba6c3812902ebd50f993fb9d2fe000 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit fa0550312d356519e8ddb614f3419bac31e746c6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix enums access in qml for api typesKirill Burtsev2021-07-023-9/+21
| | | | | | | | | | | Add missing namespace qml registration for WebEngineLoadingInfo, CertificateError Change-Id: I154070df3ab685b36d000cdfc064a074d002afc0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 5f39a1098e7e64bf8d9947077d95b69e13f42416) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add API for favicon databasePeter Varga2021-06-283-0/+249
| | | | | | | | | | | | | [ChangeLog][QtWebEngineCore][QWebEngineProfile] Add new API to access icon database asynchronously. [ChangeLog][QtWebEngineQuick] image:/favicon/ URLs now can be used to access icon database. Task-number: QTBUG-51184 Change-Id: I6096ad9a4210670ed59458c4fa099a02595e8a1e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 2ad450018e8ae22f4c426a421fa5c0995feb1e16) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix super weird flakiness of delegates testsMichal Klocek2021-06-281-5/+17
| | | | | | | | | | | | | | Our tests load mock delegates, however using QML2_IMPORT_PATH, which is set in tst_qmltests (qputenv) to set import path does not always seem to work and results sometimes in loading qqc2 delegates plugin instead. Add setup class to add import paths to qml engine. Change-Id: I31987041e922987254bc22866d4d78f9608daf6f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 376d8ddbb1a9cc174a66aeb6e2d919b28c30887f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add 'testsupport' to cmake buildsMichal Klocek2021-06-281-1/+1
| | | | | | | | | | This enables running more tests. Fix issues with tst_qquickwebengineviewgraphics. Change-Id: Ib223b4e723a7192c18202e8d5dd65d83872f3336 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 4e92dc14b86655154f70e8a1093cc9f3aae1604f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QWebEngineQuick namespace for webenginequick moduleMichal Klocek2021-06-151-1/+1
| | | | | | | | | | | | This is followup change for QtWebEngineQuick rename. [ChangeLog][QtWebEngineQuick] Use namespace QtWebEngineQuick QtWebEngine::initialize() is now QtWebEnigneQuick::initialize() Change-Id: I90acab04ff0240b399a863c88eff915efa360f6f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 5f723fe7469ac9ce3373dbcd3eb0978595271514) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* FIXUP: Fix QWebEngineDownloadRequest signalsBalazs Egedi2021-06-102-3/+3
| | | | | | | | | | - Included the test for Quick Controls 2 in CMake. - Fixed warning about deprecated injection of parameters into signal handlers. Change-Id: I8f517e84cb6b0c67e3f12bc3d047f0b61096d5fe Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit c3108a1a7ab64a3fff2c2b7284ac22020571e2b7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace testsupport's QQuickWebEngineErrorPage with isErrorPageAllan Sandfeld Jensen2021-06-064-95/+30
| | | | | | | | | | | | | | | | Merge and unify handling of loading started/finished for quick and widgets by removing separate quick's type for monitoring error page load and replace it with an isErrorPage method in WebEngineLoadRequest to indicate, that load ended with an error page being displayed. Effectively this only slightly changes when loading finished gets emitted: now the signal is just postponed until error page is finished loading after initial failure. [ChangeLog][QWebEngineQuick][WebEngineLoadingInfo] New property 'isErrorPage' which indicates that the load resulted in an error page Change-Id: I3e59dc488429d776f7c8e083b6d0489fb30a65fc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add mock FilePicker UIDelegates for Quick Controls 2Balazs Egedi2021-06-063-13/+13
| | | | | | | | | FilePicker is added to Controls2Delegates. filePicker auto test now works with Quick Controls 2. Task-number: QTBUG-93666 Change-Id: I6b5aca6a479603f5258bf49df6caeb024fed17c4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* WebEngineView: rename navigationHistory to historyKirill Burtsev2021-06-041-5/+5
| | | | | | | | | | Match widgets API name for the same QWebEngineHistory class [ChangeLog][QWebEngineQuick][WebEngineView] 'navigationHistory' property is now just 'history' Change-Id: I78507929baa84c8be08f79050568d04868171b3f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace FaviconManager with Chromium's Favicon ComponentPeter Varga2021-06-044-224/+241
| | | | | | Task-number: QTBUG-51184 Change-Id: Ie050cb23f2c86841a66ec384bfbcdf0713cffa7c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add mock UIDelegates for Quick Controls 2Balazs Egedi2021-06-048-41/+36
| | | | | | | | | {Alert, Confirm, Prompt}Dialogs are added to Controls2Delegates. javaScriptDialogs auto test now works with Quick Controls 2. Task-number: QTBUG-93666 Change-Id: I193b6ec3617db8b44a9dfc5534d99bdf8b20a78e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move QQuickWebEngineNavigationRequest to CoreAllan Sandfeld Jensen2021-06-041-3/+3
| | | | | | | | | Adds navigationRequested() to QWebEnginePage and exposes more information about navigation requests than the old acceptNavigationRequest() method. Change-Id: Ibb8d750bacd1060c3086ffe2c85336abd216bab0 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Navigation history test: don't depend on controls 2 needlesslyKirill Burtsev2021-06-032-18/+27
| | | | | | | Enables testing without qquickcontrols2 component build Change-Id: I3fc20a75dc836f788a438f15bafeddf81269740b Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Move createWindow to a signalAllan Sandfeld Jensen2021-06-032-12/+10
| | | | | | | | | | | | | | Ports QQuickWebEngineNewViewRequest to QtWebEngineCore. [ChangeLog][QtWebEngineQuick][WebEngineView] WebEngineView::NewViewRequested is now handled with WebEngineView::acceptAsNewView() instead of with WebEngineNewViewRequest::openIn(). Task-number: QTBUG-74587 Change-Id: I9b27128948076e13f2c228458e1e7491df12153d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Remove certificate fatal error testMichal Klocek2021-05-221-17/+0
| | | | | | | | | This test did not work for a while and was always skipped. Moreover OCSP handling does not work anylonger with 88-based. Task-number: QTBUG-91467 Change-Id: Ifcc4bf34bfafe7811aa159506eaf34168f08807f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix not working certificates on mac > 10.14Michal Klocek2021-05-227-97/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From macOS 10.15 onwards there are new security requirements for TLS server certificates: https://support.apple.com/en-us/HT210176 Now all certificates without required fields are reported as NET::ERR_CERT_INVALID and there is no way to 'bypass' this error. Our test expects ERR_CERT_AUTHORITY_INVALID value, for which browsers have an visual option to bypass. 'Fix' certificate by adding new required fields: * Subject Alternative Name * Extended Key Usage Generate a new certificate chain with two certificates, where the server certificate has the extension config file in the form of: [SAN] subjectAltName=DNS:webengine.qt.io extendedKeyUsage=serverAuth Use 2048 bit for private key, otherwise tests fail on ubuntu. Task-number: QTBUG-91230 Pick-to: 5.15 Change-Id: I81d878cf3cae3e9fcc51bfbf250fba9185ca4b01 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add tests to the cmake buildMichal Klocek2021-05-225-6/+203
| | | | | | | | | | | | | | | | | | | | Use QT_TESTCASE_SOURCEDIR instead of TESTS_SOURCE_DIR. Introduce Test::HttpServer and Test::Util targets. Query shared data location from server. Clean up "shared" resources. Note QT_TESTCASE_SOURCEDIR must be turned into the canonical form since the user can call on windows: "cmake \path\to\foo" instead of "cmake c:\path\to\foo" which will break all file:// urls. Note this patch breaks qmake builds. Task-number: QTBUG-91760 Change-Id: Ibc1f904ac9acd375d1ff70ff80f0c533497e3f20 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-05-191-3/+18
|\ | | | | | | | | | | | | Conflicts: src/core/render_widget_host_view_qt.cpp Change-Id: I86113b13bb2d8419e9e9a485197f02b2c7399cd4
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-05-1224-40/+64
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webenginewidgets/printme/printhandler.cpp src/3rdparty src/core/api/qwebenginepage_p.h src/core/content_browser_client_qt.h src/core/web_contents_adapter_client.h src/core/web_contents_delegate_qt.cpp src/core/web_contents_delegate_qt.h src/webenginequick/api/qquickwebengineview_p_p.h tests/auto/quick/qmltests/data/tst_download.qml tests/auto/quick/qmltests/data/tst_viewSoure.qml tests/auto/widgets/loadsignals/tst_loadsignals.cpp tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I9c1819ec15e13d4f8e244defe860e26274b5d4be
| * Avoid unknownFunc messages in qmltestsAllan Sandfeld Jensen2021-05-0714-13/+23
| | | | | | | | | | | | | | | | | | It was caused by a nested unnamed TestCase, instead rely on the parent testCase being id'ed as testCase. Task-number: QTBUG-74447 Change-Id: I086155e230d0e71ce224a8aa4c669636fe0e0acd Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
| * Adapt to new Connections syntaxBalazs Egedi2021-05-061-5/+15
| | | | | | | | | | | | | | Change-Id: Ieae71f6b1bad3fd4c4aeeec84112e7528e1af5de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f5e1fce9998a3eb1790ddb7c1440b47ab508fdfb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix inconsistent number of load signals and their orderKirill Burtsev2021-05-062-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change tries to match how chromium treats one single load. Before the pair of loadStarted/loadFinished methods for api classes was called on delegate's DidStartNavigation/DidFinishNavigation, which might be many within one single logical load. This is true for multiple usecases (like multiple redirects on load, immediate form submit on DOM load, page's subresource load, or just an error page load on failure). Tracking these methods and deciding when to emit signals based on states are error-prone and complicates logic for no benefits. Also it somewhat lies about when real load is done, which is only started and finished on outer methods DidStartLoading/DidStopLoading, which are conveniently called only once for all mentioned usecases. So, this change uses these methods to issue signals for load start/finish, and only makes exception for error page, which is needed for quick's private test support. Fixes: QTBUG-65223 Fixes: QTBUG-76802 Fixes: QTBUG-87089 Fixes: QTBUG-90342 Fixes: QTBUG-91773 Fixes: QTBUG-92063 Change-Id: I9cc99b639030fedd8cf6a9dc04d0869d6be6357d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Blacklist NewViewRequest::test_loadNewViewRequest on macOSAllan Sandfeld Jensen2021-04-292-1/+2
| | | | | | | | | | | | | | Until we have time to investigate why it fails now. Change-Id: I3da35bc622e0691b4d1a1b5138c091ba490292c7 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* | Fix QWebEngineDownloadRequest signalsBalazs Egedi2021-05-072-34/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | downloadFileNameChanged and downloadDirectoryChanged signals were removed in 08375ee7 Rename QWebEngineDownloadItem -> QWebEngineDownloadRequest. Reintroduce these signals because they are still part of the API. Also test these in Widgets auto test. QQuickWebEngineDownloadItem::pathChanged were also removed in 75393077 Remove obsolete, deprecated api from qwebenginedownloaditem. Remove the pathChanged signal checks from the test because it was deprecated. The test tst_download.qml does not have quickcontrols1 dependency. Update it in the project file and re-enable the test. Change-Id: I702e04dfe2179beafc558a628bfa07f4090fede2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adapt to new Connections syntaxBalazs Egedi2021-05-061-5/+15
| | | | | | | | | | | | Pick-to: 5.15 Change-Id: Ieae71f6b1bad3fd4c4aeeec84112e7528e1af5de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-04-131-2/+46
|\| | | | | | | Change-Id: Ia01415e5a44b1df9ed8b3966ff3b39a414b1563c
| * Fix qmltests::WebEngineViewNavigationHistory auto testsBalazs Egedi2021-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | Delete loadProgress zero-check from the tests and clear the history instead. The zero-check was used to guarantee the empty history, but it will not pass if multiple tests are performed. Change-Id: I370a51b5631d8fab99209d6a81c8aedd12d5e4a4 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
| * Notify canGoBack/canGoForward changes based on web actionsJüri Valdmann2021-03-221-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, QQuickWebEngineView's canGoBack/canGoForward change signals are based on urlChanged. But the urlChanged signal may be emitted slightly before the value of canGoBack/canGoForwad actually changes, resulting in a missed change notification. After, they get their own signals, which are forwarded from the QQuickWebEngineAction::enabledChanged signal of the respective web actions. Fixes: QTBUG-91565 Change-Id: Id411eb146c776e2824fd2447660e8857974da32e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix 'WebEngine' ambiguity for Qt6Michal Klocek2021-04-132-4/+4
| | | | | | | | | | | | | | | | | | 'WebEngine' is a qml module, however name itself is ambiguous. Thefore now with Qt6 and with cmake port name the module as WebEngineQuick. Change-Id: I948672dd5d389a01c6a31ec871459164fd989c0f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | qmltests: don't use implicit 'loadRequest' arg in 'onLoadingChanged'Kirill Burtsev2021-03-037-27/+27
| | | | | | | | | | | | | | Prerequisite for WebEngineLoadRequest type rename Change-Id: Ia8f4f15317881ba522c778c443cf17e55f5c9d65 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add missing FullScreenRequest qml test into qmltests' listKirill Burtsev2021-02-121-0/+1
| | | | | | | | | | Change-Id: I11e01bf2ce0812664bec4a7c0885485ee692db01 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-01-251-0/+15
|\| | | | | | | | | | | Including update to 87-based Change-Id: I36b6054e00de97ab055d0bc800cff08d0408fac6
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-12-118-37/+166
|\| | | | | | | Change-Id: Id1a1f4ca84697ba18e2604090e3154295fe1858b
| * Stabilize load signals emittingTamas Zakor2020-12-033-33/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the WebContentsDelegateQt::EmitLoadStarted() and the WebContentsDelegateQt::EmitLoadFinished() independent from the WebContentsDelegateQt::LoadProgressChanged() by removing m_lastLoadProgress. Adapt the WebContentsDelegateQt::LoadProgressChanged() to send signal only if load is in progress. Add a new test based on the bugreport. Fix qmltests::WebEngineViewSource::test_viewSourceURL() flaky tests. Fixes: QTBUG-65223 Fixes: QTBUG-87089 Change-Id: I90af4d2e85105dba801beb8102991eb4ef14c6a3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix new view request handlingTamas Zakor2020-11-103-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore url loading if the request is not from a data url and the Q(Quick)WebEngineNewViewRequest.openIn() is not called on newViewRequested(). Set the missing Q(Quick)WebEngineNewViewRequest::requestedUrl property. Fixes: QTBUG-87378 Change-Id: Idddc9cf075db68dcf5825b3e746d16419d02cfa0 Reviewed-by: Tamas Zakor <ztamas@inf.u-szeged.hu> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-221-9/+29
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/core/certificate_error_controller.cpp src/core/compositor/display_gl_output_surface_qsg.cpp src/webengine/doc/src/webengine_certificate_error.qdoc tests/auto/quick/qmltests/data/tst_certificateError.qml Change-Id: I976958a0833030bfd7c3ed762585eb12031306b0
* | Introduce qml script collection and make webscript as basic typeMichal Klocek2020-09-221-39/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In widget apis webenginescripts are value types and are managed by webenginescriptcollection. Introduce same concept in qml and make qquickwebenginescript a value type and reuse core userscript as private implementation. Rewrite webenginscript list handling. This patch is half baked since it does not include docs and tests for new api, however aim is to move script classes to core and reuse those in qml land. Therefore, new class introduced here is going to be removed in follow up patches, so all the missing parts will be added later. A new way of managing scripts in qml is as follows: * using collection with javascript dictionaries var script = { name: "FOO" sourceUrl: Qt.resolvedUrl("foo.js"), injectionPoint: WebEngineScript.DocumentReady } webEngineView.userScripts.collection = [ script1, script2 ]; * using collection with webscript basic type var script = WebEngine.script() script.name = "FOO" webEngineView.userScripts.collection = [ script ]; * using fine grain user script collection api with basic type var script = WebEngine.script() script.name = "FOO" webEngineView.userScripts.insert(script) Of course new api can be extended and we can provide more convince overloads. Note the main motivation here is to enable reuse webenginescript object created in c++ land, which is now passed as value in follow up patches. This changes reuses private apis of qml and will most likely require further changes when QTBUG-82443 is completed. [ChangeLog] WebEngineScript is a basic value type in qml, it is no longer declarative way of creating it, instead use WebEngine.script() Change-Id: I6a0ac3607e4522ccaefcec0a7d2986577d7e7024 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix qmltest duplication messMichal Klocek2020-09-1749-36/+2347
| | | | | | | | | | | | | | | | | | | | | | | | | | We had split qmltest directory since we could not run qml tests without test support, however this duplicated quite a lot files. Moreover adding more fine-grained checks would mean creating even more copies. Generate test list on qmake call, so we can fine-grained which test should be run. Change-Id: I093bdd6deeca50a1936a72276d7d6af12a376c45 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-144-8/+105
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/certificate_error_controller.cpp src/core/certificate_error_controller.h src/core/compositor/compositor.cpp src/core/compositor/compositor.h src/core/compositor/display_gl_output_surface.cpp src/core/content_browser_client_qt.cpp src/core/core_chromium.pri src/core/delegated_frame_host_client_qt.cpp src/core/ozone/gl_share_context_qt.h src/core/ozone/surface_factory_qt.cpp src/core/permission_manager_qt.cpp src/core/render_widget_host_view_qt.cpp src/core/render_widget_host_view_qt.h src/core/web_engine_context.cpp src/core/web_engine_settings.cpp src/core/web_event_factory.cpp tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp Change-Id: Ice14c3c350b139e800c7c7011b7cef1fc7010669
| * Expand FullScreenRequest testingKirill Burtsev2020-08-311-0/+82
| | | | | | | | | | | | | | Add qml test and check for widgets context menu item Change-Id: I96ad15dd28f4b6bd9a7af1ed7f8ca1fda568ac81 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| * Don't send duplicate load progress valuesKirill Burtsev2020-08-313-8/+23
| | | | | | | | | | | | | | | | | | Suppress duplicated progress values coming from chromium. Verify this behavior reliably (and not only 0 and 100 value) by loading html with subresources with minor delay through test http server. Change-Id: Id034dda9012212d54d12fc95d5939ba301577c1c Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-074-147/+51
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/compositor/display_gl_output_surface_qsg.cpp src/core/web_engine_context.cpp tests/auto/quick/quick.pro Change-Id: Iaf03434696788c89f5d3b524969513a89cb0a235
| * Ignore QQuickWebEngineNewViewRequest if it is unhandledTamas Zakor2020-08-251-27/+51
| | | | | | | | | | | | | | | | | | | | | | | | This is the case when the WebEngineNewViewRequest.openIn() is not called on newViewRequested(). For example, when opening the view source from context menu in quick minimal example. Fixes: QTBUG-85494 Change-Id: I7c1ae53684361de459b2f268e471904e632821b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>