summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix RenderWidgetHostViewQtDelegateItem::viewGeometryAlbert Astals Cid2025-03-251-0/+69
| | | | | | | | | We need to map the item not the scene Task-number: QTBUG-135040 Pick-to: 6.9 6.8 Change-Id: I1fa2087f822d3fb7fcb431592c222c2e7ddb5e34 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* tst_MultiPageView::pinchDragPinch: avoid pinching on a PDF linkShawn Rutledge2025-03-211-2/+2
| | | | | | | | | | | | | This test is from c0524da14d92a957b4607fb5867dba5d23eea6d9 Let's assume it was not intentional to have one of the touchpoints for the pinch gesture actually landing on a PdfLinkDelegate, which makes the viewer jump to a different page when it's tapped. qtdeclarative/4a5958f822565bbcb641965ba0f2542f81a42be1 has the effect that the TapHandler is acting as if it was tapped in this case. So we work around it for now by pinching in a different location. Task-number: QTBUG-134938 Change-Id: Ia0cf79a1156eea3a56ce0e524a7d063d8e206e24 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add support for Sec-CH-UA-Form-FactorsAnu Aliyas2025-03-112-4/+14
| | | | | | | | | | Added new APIs in QWebEngineClientHints to add support for Sec-CH-UA-Form-Factors. Fixes: QTBUG-133709 Change-Id: I525bdebcdd490413457e93e6ebef6c6be125c9b6 Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Moss Heim <moss.heim@qt.io>
* Fix QWebEngineDownloadRequest::pause()Szabolcs David2025-02-241-0/+50
| | | | | | | | | | | | | | Calling pause() (or any method which causes state update) in a directly connected signal handler of a download request causes an assertion fail in DownloadItemImpl::UpdateObservers() because it is protected from nested updates. Use QTimer::singleShot() to detach download requests and updates from the direct code path. Add auto test to check if pausing and resuming a download work. Pick-to: 6.8 6.9 Change-Id: Ia8c977a626fd0d39ca51df42984381a75cca2101 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Optimize removing quality values from Accept-Language stringPeter Varga2025-02-211-0/+8
| | | | | | | | | | Also add auto test for QWebEngineProfile::setHttpAcceptLanguage() to validate if argument with quality values is parsed properly. Pick-to: 6.8 6.9 Change-Id: Ide3acfe93bfe2d4c6afd76bd7239f471942ea467 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix flaky tst_QWebEngineView::deferredDeletePeter Varga2025-02-191-2/+8
| | | | | | | | | | | | | | | | | | | | A replacement widget for the obsolete QDesktopWidget might be created while hovering a widget in an earlier test during destruction. The extra widget is destructed together with QApplication so it is listed by QApplication::allWidgets() in the subsequent tests. For reproducing this issue run ./tst_qwebengine doNotSendMouseKeyboardEventsWhenDisabled deferredDelete and keep the mouse cursor above the window while running tst_QWebEngineView::doNotSendMouseKeybooardEventsWhenDisabled(). As a workaround take the extra widget into account when testing the size of QApplication::allWidgets(). Pick-to: 6.8 6.9 Change-Id: I84cfb75fcee944e8a22b7c12a725f131e96b3719 Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Port away from foreachPeter Varga2025-02-193-25/+19
| | | | | | | | | | | All containers are non-const local variables, and the loop bodies clearly do not modify the container, so can use ranged for loops with std::as_const() to avoid the detach (attempt). Pick-to: 6.8 6.9 Fixes: QTBUG-115805 Change-Id: Ie3eec615112a32c44ef81e4c2e5879997e5dc619 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix flaky tst_QWebEnginePage::discardAbortsPendingLoadAndPreservesCommittedLoadPeter Varga2025-02-141-1/+1
| | | | | | | | | | | | | | | | | | The test fail was reproducible on arm64 macOS but it could happen on any platform if it is fast enough. The about:blank page load is interrupted by Discarded lifecycle state in the test. Loading about:blank can be so fast that the navigation is committed before we could send the QWebEnginePage::loadStarted signal. Interrupting the load at this point won't restore the previous commit and breaks the test. As a fix, load a page from the disk which load time is potentially longer than the about:blank page's load time. Pick-to: 6.8 6.9 Change-Id: Id885f8a67b5566c5ad9024e40ce36153ff03f832 Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Fix source file path reported in "js" logging categoryPeter Varga2025-02-149-1/+196
| | | | | | | | | Also add auto tests for validating javaScriptConsoleMessage() arguments. Pick-to: 6.8 6.9 Change-Id: Ife6a2db66898a15071b6f8d082195794f2f45e27 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix tst_QWebEngineView::pageWithPaintListeners on macOSPeter Varga2025-02-131-8/+8
| | | | | | | | | | | macOS hides scrollbars by default, skip the scrollbar test. Also replace QTRY_VERIFY with QTRY_COMPARE to get meaningful messages on test failure. Pick-to: 6.8 6.9 Change-Id: I22b9cb55cd952ad0424271cb86ac68c7793281c2 Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Fix flaky tst_QWebEngineDownloadRequest auto testsPeter Varga2025-02-131-2/+40
| | | | | | | | | | | | | | | | Some of the test cases rely on context menu triggered by simulated user action. Input events are suppressed by blink if the page is not painted yet because the cc compositor deferred a commit. See SuppressingInputEventsBits::kDeferCommits and WidgetInputHandlerManager::DispatchEvent(). Wait for the HTML <body> element to be painted to make sure the simulated mouse events will trigger the context menu. Pick-to: 6.8 6.9 Change-Id: Ic41c03fbceb4a12ff90fc601560d48a50db6488c Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix flaky tst_QWebEngineView::keyboardFocusAfterPopup on macOSPeter Varga2025-02-112-3/+1
| | | | | | | | | | | | | | | | On macOS, Qt closes all popups when NSWindowDidResignKeyNotification event is triggered by the OS, see QTBUG-105474. This event somehow is triggered after we call show() on a widget. The event might be triggered while the QCompleter's popup is already open and it breaks the test. Wait for the OS events to be processed with qWaitForWindowExposed(). Pick-to: 6.8 6.9 Fixes: QTBUG-133590 Change-Id: I51b05df375046fcfb28ae213173a517d60216ae2 Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Add setting to enable back/forward cacheSzabolcs David2025-02-102-0/+48
| | | | | | | | | | Implement an option to speed up back/forward navigation with bfcache feature. (Disabled by default.) Fixes: QTBUG-131324 Change-Id: I5ddb45b6a23ef587e868162b26368f5bc4933742 Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* macOS: Fix code signing for manual testsPeter Varga2025-02-092-2/+12
| | | | | | | | | - Fix path for -debug-and-release build - Fix ".app: is already signed" error during build Pick-to: 6.8 6.9 Change-Id: I63c8a34be9e531fa07e2ac2f39ad4f6a67b4be65 Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Blacklist keyboardFocusAfterPopup on macos for nowAllan Sandfeld Jensen2025-02-091-0/+3
| | | | | | | | Is blocking integration Pick-to: 6.9 Change-Id: Ia0c6d704ca0ba0169e5480fe40bce5558974080e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Update accessibility roles and corresponding testsPeter Varga2025-02-021-32/+117
| | | | | | | Pick-to: 6.9 Change-Id: Idda473a5364647366c6fb94d4ed162f9239f390f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Moss Heim <moss.heim@qt.io>
* Fix discarded QFile::open() resultsPeter Varga2025-02-029-21/+29
| | | | | | | | | | Also validate return value of QIODevice::open() and QBuffer::open() calls. Pick-to: 6.8 6.9 Change-Id: I71ea58f62cab5aafdd2b4eca217394dddf0033cd Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Moss Heim <moss.heim@qt.io>
* Fix flaky WebEngineViewLoadUrl::test_stopStatusPeter Varga2025-01-311-1/+0
| | | | | | | | | | | | | | | | | | The test fail was reproducible on arm64 macOS but it could happen on any platform if it is fast enough. The value of WebEngineView.url property is just not reliable when a page's load status is changed to LoadStoppedStatus. If the navigation events are processed fast enough the navigation request can be committed right before we call stop() on the view. If the request is committed it has already updated the url of the current page. As a fix just ignore the current page url after calling stop in the test. Pick-to: 6.8 6.9 Change-Id: I9605696dfb1a0e15343afc384fcc2097cfa2994a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix flaky tst_QWebEngineProfile::clearDataFromCache on WindowsPeter Varga2025-01-311-0/+6
| | | | | | | | Wait for dereferencing http cache entries. Pick-to: 6.8 6.9 Change-Id: Iab3e9a56fa4008f60552f737b16b9716d69c376e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QuickWebenginView: Fix crash when assessing m_profileCarl Schwan2025-01-311-0/+17
| | | | | | | | | | | | | | | | | | | | | Ensure the profile is initialized before calling m_profile, otherwise this will crash. This happens with the following code: WebEngineView { userScripts { collection: [ { injectionPoint: WebEngineScript.DocumentReady, sourceCode: scriptContent, worldId: WebEngineScript.UserWorld } ] } } Pick-to: 6.9 Change-Id: I9d2d626ea51fb619b32147d8883701b40eab6c6e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix the flaky tst_Printing::printFromPdfViewer testAnu Aliyas2025-01-291-3/+3
| | | | | | | | | | It seems like on macOS it takes more time to print the PDF and search for the string. Increased the timeout to resolve the issue. Change-Id: I4e64b58c7dff8e36c30cbbbf71785798bdcf8355 Pick-to: 6.9 6.8 Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix failing testAllan Sandfeld Jensen2025-01-201-12/+13
| | | | | | | | | Wait for the last interceptor to intercept Pick-to: 6.9 Change-Id: I830f2c71e75ab99bb037562445081eb23412e61f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Moss Heim <moss.heim@qt.io>
* Rename JSTouchEventsEnabled to TouchEventsApiEnabledAllan Sandfeld Jensen2025-01-152-3/+3
| | | | | | | | | Api-review Pick-to: 6.9 Change-Id: I06c5400c50f30c7473bee8e82f9f63fad2875930 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Adaptations for Chromium 130Allan Sandfeld Jensen2025-01-152-3/+8
| | | | | | Pick-to: 6.9 Change-Id: Iad9c5c12c2bb69803627df73760daf6b7d4841bd Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* qwebengine_convert_dict: fix word length limitMoss Heim2025-01-091-0/+1
| | | | | | | | | | | The conversion tool had an implicit limit of 128 bytes, which was too short for the entries in the supplied Bengali dic file. Instead we read into a dynamically sized std::string. Fixes: QTBUG-132564 Pick-to: 6.8 6.9 Change-Id: I250904ef809ccbd9a110e87cd6b940c401f71f78 Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Add QWebEngineUrlRequestInfo::isDownload()Benjamin Terrier2024-12-071-0/+28
| | | | | | | | [ChangeLog][QtWebEngineCore][QWebEngineUrlRequestInfo] Added isDownload() getter Fixes: QTBUG-131316 Change-Id: I89d1f3d5633f3b9084dcf00764f205e670b68b20 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Ensure unique data path for the profileAnu Aliyas2024-12-062-0/+45
| | | | | | | | | | | Added data path verification to restrict profile creation. This change ensures that no two profiles can use the same data path. Any request to create a profile with the duplicate data path will now return nullptr. Change-Id: Ifb25861756775fb484b02a23c802bffb791c88bb Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add WebEngineProfilePrototype for profile creation from qmlAnu Aliyas2024-12-063-0/+291
| | | | | | | This is a wrapper designed to handle profile construction from qml. Change-Id: I6f3c9e06052c08e81422e148c75c599cc361be95 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Remove test stuff from QWebEngineUrlRequestInfoSzabolcs David2024-12-053-21/+16
| | | | | | | Update auto test to replace this functionality with realistic use cases. Change-Id: Ibf138f1e5c302289fc13d5399438882ecf939224 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix flaky test_findTextInterruptedByLoad testAnu Aliyas2024-12-041-2/+2
| | | | | | | | | | | It just takes a very long time to process that long text we are inserting. As the data list grew, runJavaScript did not return within the specified timeout. Increased the timeout to fix the issue. Change-Id: Id923858b1811c275404fc7eb553104d4bef0ec19 Fixes: QTBUG-131794 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add QWebEngineProfileBuilder classAnu Aliyas2024-12-043-0/+290
| | | | | | | | | | | | | | | | | | | | This is a wrapper designed to handle profile construction. The QWebEngineProfile class allows the modification of profile storage properties, which is against chromium profile design. Changing storage properties requires the recreation of storage and network context leading to hacks, which in turn leads to bugs. The QWebEngineProfileBuilder aims to prevent modification of storage properties and set them at the profile creation time. The current change introduces new APIs without deprecating the storage setters in the QWebEngineProfile class. The final goal is to deprecate the storage setters and constructor from QWebEngineProfile and use the QWebEngineProfileBuilder to create profiles. Task-number: QTBUG-66068 Change-Id: I3c2562c9e1445708f0dbdeae5783a8c7d38313af Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix script execution when a render frame swaps hostsAllan Sandfeld Jensen2024-12-041-0/+76
| | | | | | | | | | | | | | | This change fixes an issue where navigating between pages in a way that triggers a RenderFrameHost swap would stop script execution for the DocumentReady and Deferred injection points. Fixed by adding scripts on RenderFrameHost changes after we have removed scripts from the old host. This restores an old behavior of double addition which the already handle later. Pick-to: 6.8 Fixes: QTBUG-131156 Change-Id: I8b7bb2d456224dce7ccc405bf2f68f103d3d0332 Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu>
* Lazy initialization for offTheRecord settingAnu Aliyas2024-11-201-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | As per the current design when switching from profile from OTR to non-OTR requires valid storage name. If it is not there, then QtWebEngine display a warning message and and don't switch to disk based behavior for qml. This impose the restriction on qml initialization order, for non-OTR profile, the initialization should be of the order given below WebEngineProfile { offTheRecord: false storgaeName: 'Test' } Otherwise it won't switch to non-OTR profile. For example a setting like WebEngineProfile { StorageName: 'Test' offTheRecord: false } won’t create a non-OTR profile. Though from an end user perspective these two initialization are identical, the order of initialization is different and due to which these two settings yield different profiles. Added a single shot signal handler on the offTheRecord setter to handle such cases, and it will switch the profile to non-OTR mode only when the storage name is set. Amends 5f42c1b7877b0c74d939af0f04d09a23482bc74a Fixes: QTBUG-131397 Pick-to: 6.8 Change-Id: I1c1c21808cb49dfa3ba4340b000242a0f54e59e5 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 3477d952575a8ad8a8ca70c04a7cd3aa5d7d5f81) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Reduce verboseness of WebEngineNotification qml auto testPeter Varga2024-11-171-3/+0
| | | | | | | | It seems like leftover. Pick-to: 6.8 Change-Id: I996cc201afe721b3ef584e8b7671cdefcf16720c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* tst_certificateerror: skip the handleError testTimur Pocheptsov2024-11-071-0/+13
| | | | | | | | | in case we build with macOS SDK below 15 and running on macOS 15. Task-number: QTBUG-130500 Pick-to: 6.8 Change-Id: I8e3fe7b28565aa754609f1477a8e1c15c89860d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove nonexistent manifest file from tst_geopermission CMakeListsKaloyan Chehlarski2024-11-061-7/+0
| | | | | | | | | This causes configure-time errors on Windows. The manifest file is also unnecessary. Pick-to: 6.7 6.8 Change-Id: Ic713f0309abdd8edb170980a15ab26eb1725748d Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Correct behavior of JavscriptCanAccessClipboardMoss Heim2024-11-042-10/+14
| | | | | | | | | | | | | | | | Previously, sanitized clipboard writes were only enabled with JavascriptCanPaste AND JavascriptCanAccessClipboard enabled. This broke backward compatibility with code that expected it to only be enabled by JavascriptCanAccessClipboard. This compatibility is now restored. In the permission manager, all writes and reads are still controlled by ClipboardReadWrite. Pick-to: 6.8 Fixes: QTBUG-130599 Change-Id: I03dc2ea739782e475faacc0900804708c37763cc Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Do not add magic header web_engine_logging.hMichal Klocek2024-10-319-17/+13
| | | | | | | | | | | | | | | | | | | | | | | Importing headers with relative paths going out of source component is evil. Remove web_engine_logging.h header as it is referred from the code base, but build system has no clue about it as it is specified as include with relative path. Moreover, it introduces weird implicit dependency of components like qtpdf on qtwebenginecore. Add required macro to private globals. Note for qtpdf it is unnecessary as we do not support compiling qtpdf against latest lts, however our release infra requires it. This commit amends d11709f18d692f4a3431999e90dddf0d7cdf15df. Task-number: QTBUG-127975 Change-Id: I89163a29db4e601cfb607928f796343ba522037b Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add REUSE.toml files and missing licensesLucie Gérard2024-10-311-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | REUSE.toml files are read by reuse to complement or override the copyright and licensing information found in file. The use of REUSE.toml files was introduced in REUSE version 3.1.0a1. This reuse version is compatible with reuse specification version 3.2 [1]. With this commit's files, * The SPDX document generated by reuse spdx conforms to SPDX 2.3, * The reuse lint command reports that the Qt project is reuse compliant. In order to be reuse compliant all the licenses referenced in file or within a REUSE.toml file must be present in the LICENSES directory at the base of the module. The missing licenses are added. [1]: https://reuse.software/spec-3.2/ Task-number: QTBUG-124453 Task-number: QTBUG-125211 Pick-to: 6.8 Change-Id: Ic8c34b884bae1151f5d912f375bf87378e6e9a3d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add setting for JS touch events APIMartin Negyokru2024-10-293-0/+46
| | | | | | | | | | | | | | | | | | Currently we enable the touch events API by default if a touch screen is detected by the system. Some websites use this api to decide if they are on a mobile device or desktop and base their design on it. This can cause unwanted results on touch screen laptops or other setups that emulate a fake touch device. Add option to explicitly set the touch events API. Keep old behavior if the option is not used. [ChangeLog][Settings] Added JSTouchEventsEnabled setting Task-number: QTBUG-115764 Change-Id: Ica860f54557ee21f00c63a3d30f9074a0278bc8c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* clientAuthentication: do not block in keychain accessTimur Pocheptsov2024-10-281-0/+13
| | | | | | | | | | if testing with SecureTransport backend build with SDK < 15 on a system >= macOS 15. Fixes: QTBUG-130500 Pick-to: 6.8 Change-Id: Ica758b45c8d8c0c30ea31a85e5dc18268207c005 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make download API asynchronousSzabolcs David2024-10-241-12/+75
| | | | | | | | | | | | | | | | | | | | | | | | Modify the already existing downloadRequest() API. Now the requests not necessarily have to be answered in a directly connected signal handler and the API users can postpone their user's decision. The only exceptions are automatically accepted save page requests. There is no better place to call their callback than directly after the signal emission. Adapt auto tests to the new lifecycle of download items. Modify the quicknanobrowser example to use a simple async method to wait for the user's decision. Keep simplebrowser to use its old synchronous method to illustrate that it's still possible. Correct documentation at some places. [ChangeLog] QWebEngineProfile::downloadRequested() is not limited to synchronous usage anymore. QWebEngineDownloadRequest can be accepted or rejected later without blocking the browsing session. Fixes: QTBUG-118584 Change-Id: Ic1be6508126574dc77aa686f85bf35feafdb080d Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Blacklist ClientCertificateStore::clientAuthentication on macOS 15Tor Arne Vestbø2024-10-241-0/+2
| | | | | | Task-number: QTBUG-130500 Change-Id: I7af83b1927fc9a01b95f745bf1c8f4e20e79ba97 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Stabilize flaky getUserMedia auto testsPeter Varga2024-10-222-62/+79
| | | | | | | | | | | | | | | | | | | | | Reduce the number of runJavaScript() calls. runJavaScript() is expensive and calling it multiple times in a single QTRY_VERIFY or tryVerify check may lead to a timeout. Moreover, reading a JS variable by runJavaScript() while setting the variable from a promise callback may cause deadlock. As a workaround, intercept promise results by using the javaScriptConsoleMessage API instead of calling runJavaScript(). Pick-to: 6.8 Task-number: QTBUG-127726 Fixes: QTBUG-129884 Fixes: QTBUG-130034 Fixes: QTBUG-130035 Change-Id: I130fc98675d54dba4b8f5bbcd8c1d43e56601bc6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Moss Heim <moss.heim@qt.io>
* Add PreferCSSMarginsForPrinting to QWebEngineSettingsSzabolcs David2024-10-212-0/+6
| | | | | | | | | | | | Add an option to choose between margins of the specified QPageLayout and the margins of the @media rules of CSS. [ChangeLog] New API added to QWebEngineSettings to optionally prefer CSS margin rules over QPageLayout for printing results. Task-number: QTBUG-58669 Change-Id: Idfec2deca0d326ea9339f67bce937e24ae5128f2 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add PrintHeaderAndFooter to WebEngineSettingsSzabolcs David2024-10-173-1/+55
| | | | | | | | | | Allow users to generate basic header and footer when printing. Pages will contain the URL, title, date and the page number. Add corresponding WebEngineSettings flags to the Core and Quick APIs. Task-number: QTBUG-70125 Change-Id: Icadd15c16267a204c900aa6895db73b2172e47bc Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Handle missing webrtc in getUserMedia testsMoss Heim2024-10-174-2/+22
| | | | | | | | | | | | | When the webengine_webrtc feature is disabled, desktop media requests will be delivered as non-desktop media requests instead, which means we cannot rely on those signals in tests. This shouldn't affect the previous change to protect against a null desktop media capturer, because that requires webengine_webrtc=on and webengine_webrtc_pipewire=off. Pick-to: 6.8 Change-Id: Id49e41596efd8e0574607a4eb2e0e7b66f5951c9 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Remove some unused and unneeded codeSzabolcs David2024-10-121-137/+0
| | | | | Change-Id: I327fd2edd427bab0237a01ca5d30799e94313e60 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix history service reinitalizationMartin Negyokru2024-10-071-0/+50
| | | | | | | | | | | | | | | setStorageName and setPersistenStoragePath did not update the storage path of the history service if the service was already initialized. It is not supported to change the service's path manually, so reset the service instead. The favicon service also needs to be reseted for similar reasons. This change fixes the flaky test_iconDatabaseMultiView test. Change-Id: I53fb49832615ea334df30e16167bd32fdaa59038 Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Build webrtc example as application bundle for macOSAnu Aliyas2024-10-041-0/+5
| | | | | | | | Added missing attributes to ensure screen capture permission works fine when launching the application from Finder. Change-Id: I279697c4f85bacf5f8028831c3c757708f453eba Reviewed-by: Michael Brüning <michael.bruning@qt.io>