summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Assert that the primary screen is available before using itMichael Brüning2023-05-171-0/+2
| | | | | | | | Does not fix the underlying issue, but may give us more meaningful information about the seemingly random crashes we have seen on the CI. Change-Id: I239fd05bf6a7add38e17830aad59f961036871d9 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Test WebWindowType parameter in CreateWindow()Anu Aliyas2023-05-051-0/+74
| | | | | | | | | - Added testcase to test WebWindowType parameter in CreateWindow. Fixes: QTBUG-112645 Pick-to: 6.5 Change-Id: I4f6bf452afcceeaa67ff07b879a2acd836bd8fac Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Increase load timeout for tst_qwebengineglobalsettingsMichal Klocek2023-05-031-11/+10
| | | | | | | | | | | | | Increase the timeout for load function as it tries to use network. Do not allocate HTTPS server on heap as in case of failure it is never deallocated and next test also fails. Fixes: QTBUG-113350 Change-Id: Ifab6045afeb694a2b457604fa4d9e9c002483659 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Yigit Akcay <yigit.akcay@qt.io>
* Add qWebEngineGetDomainAndRegistry()Benjamin Terrier2023-05-023-0/+40
| | | | | | | | [ChangeLog][WebEngineCore] Add qWebEngineGetDomainAndRegistry() Fixes: QTBUG-105294 Change-Id: Ica40453f807b00c8548f974a495ddf84bbe8e194 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix user script management when subframes are presentAllan Sandfeld Jensen2023-04-301-0/+33
| | | | | | | | | | Only the main frames should administer scripts associated with it. Pick-to: 6.5 Fixes: QTBUG-113109 Change-Id: Ibda66f55ef99da632134a9de1425797262faba9b Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Martin Negyokru <negyokru@inf.u-szeged.hu>
* Allow configuration of DNS-over-HTTPSYigit Akcay2023-04-288-2/+219
| | | | | | | | | | | | Implement QWebEngineGlobalSettings, a singleton class that contains global web engine settings (currently only for DoH). Allow the user to configure the stub host resolver to enable DNS-over-HTTPS. Fixes: QTBUG-98284 Change-Id: I1b06737c84e1b8d613aa257f4a891f82cac21013 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add QWebEngineSettings::DisableReadingFromCanvasAnu Aliyas2023-04-243-0/+82
| | | | | | | | - disables reading from canvas. Fixes: QTBUG-84486 Change-Id: I3e181bfa6e351dea8dfa61f8010bafb94ea8a77d Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* QPdfNavigator: emit forward/backAvailableChanged when jumping pagesJoni Poikelin2023-04-204-1/+87
| | | | | | | | | | | | | | QPdfPageNavigator did not emit the page history signals when pages were jumped. This patch ensures correct signal emission in all cases. It adds a new auto test class for QPdfPageNavigator. Fixes: QTBUG-112614 Pick-to: 6.5 6.2 Change-Id: I67af5a4d22a8e76b9c12c72c168fa5b3b4390f2c Reviewed-by: Yigit Akcay <yigit.akcay@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add WebEngineView::save() convenience APIAnu Aliyas2023-04-204-1/+207
| | | | | | | | | | Add the convenience method QQuickWebEngineView::save for saving pages without the need to explicitly handle download requests. Task-number: QTBUG-56093 Change-Id: I67909fdca6472d1ea9b32e0f89c1ab90219bca3b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Better handling of interrupted PDF printingSzabolcs David2023-04-051-0/+14
| | | | | | | | | | | | | | | | | | | | | - Document the fact Stop WebAction can interrupt the in-progress PDF generation. - Update PrintViewManagerQt::PrintPreviewDone(): Normally IsPrintRenderFrameConnected() implies IsRenderFrameLive(), but we have to check both to avoid crash when render process exits. (Like Chrome does.) - Update PrintViewManagerQt::RequestPrintPreview(): Handle that case when print preview params were sent between processes at the beginning, but it was interrupted before RequestPrintPreview() could start PDF generation. - Add a simple auto test to catch crashes Pick-to: 6.5 Task-number: QTBUG-108154 Change-Id: I8a4f9cc97ddcf9a165d66a5981d93a023858fbc1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace WebEngineAction example with a snippetMichael Brüning2023-03-317-0/+220
| | | | | | | | | Also moves the example to the manual tests directory. Task-number: QTBUG-108751 Change-Id: Ie3fa492cfcaf61ee26ed65fa22954bb6a6532d6e Reviewed-by: Michael Brüning <michael.bruning@qt.io> (cherry picked from commit 23d1131577e1780de0552211a84357bcb1f63de5)
* Minor. Small clean up of qmake leftoversMichal Klocek2023-03-283-18/+0
| | | | | | Pick-to: 6.5 Change-Id: I0ef7f97b3d76c43e815daeb7d6782215c08e4f7d Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix name colision for cmake targetMichal Klocek2023-03-283-5/+5
| | | | | | | | | | After c89fcec the build with manual tests fails as executables have same targets. Fix too compilation issue. Change-Id: I9fd2831b4f0d766e138ae2289e91aa43280568bd Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Minor. Fix namespace issues of inputmethods manul testMichal Klocek2023-03-253-1/+8
| | | | | | Pick-to: 6.5 Change-Id: Ic0f318aa63cab901b979d76a34e329b2ab8359cf Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Move custom touch handles example to manual testsMichal Klocek2023-03-226-0/+167
| | | | | | | | | | | | Move and add missing parts as snippet. Task-number: QTBUG-108751 Change-Id: I25849941700337626ca46e399fdb52264bc4659a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Yigit Akcay <yigit.akcay@qt.io> (cherry picked from commit 55f9fc348278b2aa8985ec9c1e7e092f88f68f83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move custom dialogs example to manual testsMichal Klocek2023-03-2230-0/+1557
| | | | | | | | | | | | | This example shows how to use dialogs, however documentation already provides snippets for that added in 3cbe59e29a. The only missing one was tooltip, therefore add missing snippet and move example to manual tests. Task-number: QTBUG-108751 Change-Id: I84eda805455fb0276046ed1089389d605a8af672 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 6bf30525ee49d270dae6a6440bc607513f21237c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move quick minimal example to manual testsMichal Klocek2023-03-227-0/+89
| | | | | | | | Task-number: QTBUG-108751 Change-Id: I0998c46f051908855e0406e5fc7c0a422dc3eef0 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit ed76eef004dbac15f4740d33d06d2b271bf770d4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move widgets minimal example to manual testsMichal Klocek2023-03-226-0/+63
| | | | | | | | | Task-number: QTBUG-108751 Change-Id: I6e237b04d1f6a19f64516cd45aabe4d28099abd5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 34ebe8be93ab10766d034e5a3943a12c8de3a58e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Increase timeout in proxy pac testMichal Klocek2023-03-201-1/+1
| | | | | | | | | | According to ci this test would succeed in 13000ms on qemu. Fixes: QTBUG-111939 Change-Id: I21911920961a885eee38dcd3261e46b497a1c251 Reviewed-by: Michael Brüning <michael.bruning@qt.io> (cherry picked from commit f576588c85f4f635d38f56a1db087a50c19add42) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QWebEngineUrlResponseInterceptor: Implement new URL response interceptorYigit Akcay2023-03-103-0/+153
| | | | | | | | | | | | | | | | | | | | | This patch adds the QWebEngineUrlResponseInterceptor abstract class, which, when implemented, allows a user to intercept response headers and modify them in any way they like. A response interceptor can be set via QWebEngineProfile::setUrlResponseInterceptor(), QQuickWebEngineProfile::setUrlResponseInterceptor() or QWebEnginePage::setUrlResponseInterceptor(). Also, the QWebEngineUrlResponseInfo class is implemented, which contains the request and response data to be used with the response interceptor. If a response interceptor is set in the profile and page, the one in the profile takes precedence. Fixes: QTBUG-61071 Change-Id: I484d14373ff597b1d531541c066f0102bae28c72 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix not working password test for QPdfQuickMichal Klocek2023-03-021-5/+0
| | | | | | | | | | | | | In qml url can have different schemas like 'qrc' 'file' 'assets'. Make correct conversion so file can be loaded. Note check isLocalFile() is not true for qrc scheme. Fixes: QTBUG-106072 Pick-to: 6.5.0 6.5 6.4 Change-Id: I4dcc969e4c6d9b3f58ea5d81d20d8e81b55edfde Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix initialization of QWebEngineDownloadRequest::totalBytes for WidgetsPeter Varga2023-03-011-2/+2
| | | | | | | | | | | | QQuickWebEngineProfile already initializes totalBytes. Also clean up QWebEngineDownloadRequestPrivate and fix typo in documentation. Pick-to: 5.15 6.4 6.5 Fixes: QTBUG-104869 Change-Id: I8c4b79c076ddc63180960e22a9488b45ff6c4402 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add qml filesystem api testsMichal Klocek2023-02-274-0/+200
| | | | | | | | | | | | | | | | | | | There are three functions we use within file systems API, which trigger dialogs: * window.showSaveFilePicker * window.showOpenFilePicker * window.showDirectoryPicker Only first one was tested with widgets, therefore add tests which cover use of api, and also test cover the found issues in previous commits. Note we have separate test to cover file system dialogs coming from <input> html tags in tst_filePicker Pick-to: 6.5 6.4 Change-Id: I4616efa84688ed471fb8c4566e49262bce945638 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add TESTDATA to qtpdf tests and fix data urlMichal Klocek2023-02-235-4/+15
| | | | | | | | | | Make cmake aware of test data, this will make data deployable on android. Task-number: QTBUG-83459 Change-Id: Id4271f54f8351e955a6ee57c3a36656d69a2a682 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Blacklist mulipageview tests on androidMichal Klocek2023-02-211-0/+9
| | | | | | | | | | | | | | | | | Password test does not pass on emulator, the same issue exists already on windows. Navigation uses hardcoded values for event which ends with "Mouse event at 465, 65 occurs outside target window (320x616)" due to smaller screen of android emulator. Blacklist tests for now. Task-number: QTBUG-83459 Task-number: QTBUG-106072 Task-number: QTBUG-111306 Change-Id: Iacc4c7711d58b0ffb6cdda3474b4d59b628ca5f7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Support LTR and RTL text directions in input fieldsSzabolcs David2023-02-154-1/+49
| | | | | | | | | | Implement WebActions to temporarily change text direction directly from context menu - like Chrome does. They only work for the selected input field. Omit the "default" option since it is always grayed out in Chrome. Task-number: QTWB-67 Change-Id: I4bacbd82c6bd7261ac465eec9da3776613f98074 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix clang compiler warningsPeter Varga2023-02-141-0/+4
| | | | | Change-Id: I6ebd403a3affae8bfbc5afee9d528664fb08122c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Attempt to fix flaky fetchAPI testAllan Sandfeld Jensen2023-02-131-1/+1
| | | | | | Change-Id: I0aa38930767c2caf37c9f641f5f65967e6c73356 Reviewed-by: Yigit Akcay <yigit.akcay@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Increase timeout to fix flaky testAllan Sandfeld Jensen2023-02-131-2/+2
| | | | | | Change-Id: Ieb9fa54ab05649da555f586c5f9c8f318bdaa774 Reviewed-by: Martin Negyokru <negyokru@inf.u-szeged.hu> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* QWebEngineLoadingInfo: Add response headersYigit Akcay2023-02-134-1/+105
| | | | | | | | | | | | | | | | | | | | This change adds a member variable that contains the response headers to QWebEngineLoadingInfo. It is filled when a QWebEngineLoadingInfo instance is constructed inside WebContentsDelegateQt::emitLoadFinished(bool). The response headers are extracted from the navigation handle when WebContentsDelegateQt::DidFinishNavigation(content::NavigationHandle *) is called. The response headers are non-empty when QWebEngineLoadingInfo::status() is equal to QWebEngineLoadingInfo::LoadSucceededStatus or QWebEngineLoadingInfo::LoadFailedStatus. Fixes: QTBUG-106862 Change-Id: I4d196e3cc71725ddad9a5832af72d1b4e50924c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Custom URL Schemes usable with HTML5 Fetch ApiYigit Akcay2023-02-093-1/+143
| | | | | | | | | | | | | This change adds the QWebEngineUrlScheme::FetchApiAllowed flag and test cases to test its effect. When FetchApiAllowed flag is set a custom url scheme can be used by the HTML5 fetch api. Fixes: QTBUG-88830 Change-Id: I953dd0504bf508fd8082fae5db08b7b9fc47ea1f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add test for libc interceptionMartin Negyokru2023-02-093-0/+53
| | | | | | | | | Test intercepted getaddrinfo(). Building with 'as-needed' option is a must to reproduce QTBUG-110287. Task-number: QTBUG-110287 Change-Id: I5ec2554c3b73efc9b1f1fdd7da0b6c7cbb360f25 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Retire the qt_parse_all_argumentsAmir Masoud Abdol2023-02-081-2/+2
| | | | | | | | | | | To do so, we need to deal with the macros a bit differently, so here, I replaced the macros with available utility functions, and added one for the QTWEBENGINEPROCESS_NAME. Fixes: QTBUG-110873 Task-number: QTBUG-99238 Change-Id: I29b41ffb8059511d2d93bfc01d40308aedaa8ad4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Blacklist tests blocking integrationsAllan Sandfeld Jensen2023-02-062-0/+5
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-110578 Change-Id: Ic063d08246351709d02642abc0747b5fbe9e2ef7 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Remove quicktestbrowserPeter Varga2023-02-0212-1069/+0
| | | | | | | | | | | | | It is not maintained for a while and most probably also not used because it is not working since Qt6. QuickNanoBrowser example should be used instead, because it implements most of the quicktestbrowser features. Pick-to: 6.5 Change-Id: I330e1c6e0f4bf81c0bce0e6d70d47a513f63d8c7 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace uses of deprecated _qs with _sPeter Varga2023-02-021-7/+9
| | | | | | | Pick-to: 6.4 6.5 Task-number: QTBUG-101408 Change-Id: Ie8a7944c3ded5662953bed00f022905f5805275e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* tst_QWebEngineUrlRequestJob: remove unused includesYigit Akcay2023-01-271-2/+0
| | | | | | | | This change removes unused header includes from tst_QWebEngineUrlRequestJob. Change-Id: I8827fd907e4d9f839e94733639bb731e33a86ab4 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* QWebEngineUrlRequestJob: Add function to set additional reponse headersYigit Akcay2023-01-264-0/+153
| | | | | | | | | | | | | | | Add additional response headers field to URLRequestCustomJobDelegate. Those fields can be set via QWebEngineUrlRequestJob::setAdditionalResponseHeaders( const QMap<QByteArray, QByteArray> & ). They are added to URLRequestCustomJobProxy::m_client when URLRequestCustomJobProxy::reply(std::string, QIODevice) is called, and added to the response headers within CustomURLLoaderFactory::notifyHeadersComplete(). Fixes: QTBUG-106578 Change-Id: Ie0f0af07a5381c6f24ec0a1ee1b5bcb0e8c4fa5f Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add InputEventObserver to child framesMartin Negyokru2023-01-171-0/+108
| | | | | | | | | | | | | | | | | | | | RenderWidgetHostViewChildFrame does not Ack mouse wheel events. RenderWidgetHostViewQt::handleWheelEvent expects Ack on every event. Origin-Agent-Cluster is a HTTP response header that instructs the browser to prevent synchronous scripting between same-site cross-origin pages. Chromium also uses this header as a hint that an origin should get its own separate resources, such as a dedicated process. That's where child frames are created. This feature is implemented in chromium 88. Add observer to child frames that responds to wheel events. Add test for wheel/scroll events on child frames. Pick-to: 6.5 Fixes: QTBUG-109348 Change-Id: I20439a9068c5c2f8416a350891a6cf8830e1a5d6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Skip favicon database QML tests on High DPI screensPeter Varga2023-01-161-0/+6
| | | | | | | | | | | | | The tests use the middle pixel's value of an image to check if a certain icon is loaded. The images are scaled on High DPI screens and the pixel values are changed due to interpolation. It cannot be expected to have the same pixel values for different device-pixel-ratio settings, thus rather skip the test than maintaining a list of pixel values for different scales. Pick-to: 6.5 Change-Id: I8d142de0106167a5d16c540fa468003b36c95317 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Quick: Fix file selection modes in the default UI delegateSzabolcs David2023-01-153-1/+20
| | | | | | | | | | Our implementation of QML file picker was outdated. Now directory picker is a separate type of dialog and other file selection modes are set in FileDialog.fileMode property. Pick-to: 6.4 6.5 Change-Id: Icc62369539c56666e596e5ee6f1b3068a43acd81 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix contentsSize and scrollPosition on High DPI screensPeter Varga2023-01-132-7/+7
| | | | | | | | Provide the same values what are available from JavaScript. Pick-to: 6.5 Change-Id: I9e047d749279934d0c8ccd45710571e8c7745859 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix build with -no-accessibilityPeter Varga2023-01-091-1/+9
| | | | | | Pick-to: 6.5 Change-Id: I7128608467e4d0ce1b04efa9b82a98f78942d4db Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for 108-basedAllan Sandfeld Jensen2023-01-062-2/+2
| | | | | | | Pick-to: 6.5 Fixes: QTBUG-105147 Change-Id: I0022964903f3443cc97843c62468ab9be8ae2ed8 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix creation of nssdb for certificate store unit testMichal Klocek2023-01-022-7/+13
| | | | | | | | | | | | | In case there is no nssdb in system create empty database. This got unnoticed as running webengine creates one, however when doing test configuration on fresh system without one pk12utils fails. Move 'nickname' to certificate otherwise clean job does not work. Task-number: QTBUG-109179 Pick-to: 6.5 6.4 Change-Id: I401ffab62dd13d7aa1459672b1170afcde3cde83 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Remove setPushServiceEndpoint from APIMichal Klocek2022-12-221-2/+2
| | | | | | | | | | Use setPushServiceEnabled instead. Update also getter and documentation. Task-number: QTBUG-107442 Pick-to: 6.5 Change-Id: I299ce88b06edef0f1a0088fb10f4a142056039be Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Recreate response head objects on multiple redirectMichael Brüning2022-12-133-0/+55
| | | | | | | | | | The previous response head gets moved when redirecting, which lead to dereferencing a null pointer on the next redirect. Pick-to: 6.4 5.15 Fixes: QTBUG-109357 Change-Id: Iaad1c46b8d4ca9720f1749980a9e06337ca0f3d8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Implement touchbrowser for widgetsMartin Negyokru2022-12-1319-143/+289
| | | | | | | | | | Simplify touchMockingApplication. Let QApplication synthesize touch events. Unify quick and widgets touchbrowser. Fixes: QTBUG-100417 Change-Id: If43432996ca18c67f3ae13ab0767d267b27dc9a2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Route Qt::TimeSpec usage via QTimeZoneEdward Welbourne2022-12-121-2/+6
| | | | | | | | QTimeZone now packages Qt::TimeSpec details, unifying QDateTime APIs. Task-number: QTBUG-108199 Change-Id: I62d9837fac01b5d95e9fd0cff034cb450854c9e7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Disable V8 sandbox for QEMU arm64 CIPeter Varga2022-12-091-3/+0
| | | | | | | | | | | | | | | | | After the 106-based adaptations V8 sandbox is enabled by default. It cannot be disabled runtime anymore. The initialization of the sandbox has significant overhead in a qemu-aarch64 environment, at least 5sec. This makes most of our auto tests timeout. The sandbox is not supported on 32bit platforms. The detection of the QEMU target relies on the environment variable TARGET_OSVERSION_COIN=qemu on the CI. Fixes: QTBUG-108993 Change-Id: I45961bc2e8a0af505113777f2b26f10b93b7477f Reviewed-by: Michal Klocek <michal.klocek@qt.io>