summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Expand QWebEnginePermission autotestsKaloyan Chehlarski3 days10-591/+812
| | | | | | | | | | | | | | Adds a new test tst_QWebEnginePermission. Relevant test cases are moved from other tests. New tests cases make sure to check all permission types, under all persistence policies. The exception is the MouseLock permission, which is currently untestable due to Qt Quick limitations on when mouse lock can be granted. Pick-to: 6.10 6.9 Change-Id: Ibc3d7cdec241ddad4937fe5c1978db11bfa6c515 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* More patient testsAllan Sandfeld Jensen4 days3-21/+21
| | | | | | | | Increasing timeouts to pass more tests on the ignore arm64 platforms. Pick-to: 6.10 Change-Id: I17ce98a90a2aa2bccb67fe5576af0ddbc9cb127f Reviewed-by: Moss Heim <[email protected]>
* Atempt at stabilizing our most flaky testsAllan Sandfeld Jensen5 days4-8/+10
| | | | | | | Pick-to: 6.10 Change-Id: If192a5b8e6251dbe76c6a0363212bd64292c6d89 Reviewed-by: Michael Brüning <[email protected]> Reviewed-by: Moss Heim <[email protected]>
* Stabilize scrollPosition auto test on fractional zoom level devicesSzabolcs David6 days1-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This test fails for example when the system has a 125% global zoom level set. Inside Chromium: The requested pixel positions will be scaled up by the device pixel ratio (1.25). The resulting fractional number will be floored down and used for scrolling. In RenderWidgetHostViewQt: We are informed about the scroll event and the non-fractional integer is provided for us. We try to scale this value down by dividing with the DPR to get back the requested pixel position - but the result will never be accurate becase of the lost fractional part in Chromium. In this example, the difference between the requested and the actual scroll position is outside of the tolerance level of qFuzzyCompare. The good news is Chrome behaves the same way, it provides the same inaccurate fractional scroll position in JavaScript as WebEngine (both in the API and in JavaScript). So the best we can do is relaxing the test by implementing a less strict comparison function for floats. Pick-to: 6.10 6.9 Change-Id: I2e924fac4344126727c347098b7f17da700181e0 Reviewed-by: Allan Sandfeld Jensen <[email protected]> Reviewed-by: Peter Varga <[email protected]>
* Attempt to stabilize tst_QWebEngineUrlRequestJob::requestBodyAllan Sandfeld Jensen7 days1-1/+1
| | | | | | | | Close buffer open for writting before sending it Pick-to: 6.10 Change-Id: I58f4d7cb31fe4f38a445c1bf7dd65a220ace36b4 Reviewed-by: Moss Heim <[email protected]>
* Attempt to stabilize tst_QWebEnginePage::mouseMovementPropertiesAllan Sandfeld Jensen7 days1-0/+1
| | | | | | | | Ensure exposure before requesting activation Pick-to: 6.10 Change-Id: I488e01098b06c4cdc7ead2841548c19e944bab8d Reviewed-by: Moss Heim <[email protected]>
* Make tst_QWebEngineView more patientAllan Sandfeld Jensen10 days1-3/+3
| | | | | | | | | Trying to fix flaky tests by using feedback from ignored arm64 failures. Pick-to: 6.10 Task-number: QTBUG-136613 Change-Id: I3673cf2e12eba555d086cca7066786eb7903a60b Reviewed-by: Moss Heim <[email protected]>
* Stabilize IME tests in tst_QQuickWebEngineViewKaloyan Chehlarski10 days1-4/+4
| | | | | | | | | On rare occasions, qApp->focusObject() may return nullptr even though JavaScript reports that the object should be in focus already. This change wraps those calls in QTRY_VERIFY. Change-Id: I8d36f49e3587e2ea3de1f43c48ee65a82ddf2b38 Reviewed-by: Moss Heim <[email protected]>
* Add PersistentCookiesPolicy::OnlyPersistentCookiesMoss Heim12 days2-0/+7
| | | | | | | | | | | This new policy prevents session cookies from being saved to disk even for crash recovery purposes. Persistent cookies are still stored. As a drive-by add a missing data row in a QWebEngineProfileBuilder test Task-number: QTBUG-135799 Change-Id: I55364aa96c07ce83d3f30d812450421354310d72 Reviewed-by: Michal Klocek <[email protected]>
* Fix async request calls in test httpserverMichal Klocek2025-08-052-1/+2
| | | | | | | | | | | | | | | | When we create in tests request handler and process responses, the httpserver checked response isClosed() to bail out from further processing. However, disconnecting from the client is an async process, therefore proper check should be isClosing(). Leave also isClosed() in case handler does some re-entry into qt message loop. Note this change can have side affects if given test case relied on further processing. Pick-to: 6.10 Change-Id: I056c0da74000e1801ca756225db03b0f0209f360 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Add setting to trim accessibility identifiersKaloyan Chehlarski2025-08-013-0/+30
| | | | | | | | | | | | | | | | | | | By default, Qt's accessibility code will provide an object's full accessible hierarchy inside the Identifier string that's passed to a screen reader or automation software. This may be undesirable for users who use WebEngine for automated testing. This change adds a new QWebEngineSetting that disables this behavior, and instead makes sure that the HTML 'id' attribute is passed cleanly to accessibility software. When there is no 'id' attribute, the default Qt behavior still applies, and the Identifier string is still the full object hierarchy. Fixes: QTBUG-134762 Change-Id: Ica0b626c05b5cdca0bad83280ba15183ff9480f6 Reviewed-by: Michael Brüning <[email protected]>
* Add test mock delegate pluginMichal Klocek2025-08-0120-30/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previews patch changed the way ui delegates are loaded. Even though all delegates were tested on device it failed on ci. The reason was that test mock delegate still relayed on old 'way' of loading delegates. As we now load plugins, change test ui delegates to be a plugin. Add new qml module which contains both TestMockDelegates and TestParams components and does not depend on Qt Quick Controls. Missing delegates are taken from WebEngine.ControlsDelegates as it was before. Note we do not use plugin in this case and we link with backend library statically as CI compiles test with qt-cmake-standalone-tests, but does not install anything, meaning plugin would not be deployed on testing node. The alternative would require moving mock delegate 'plugin' to src directory, which looks messy. Set proper QTWEBENGINE_UI_DELEGATE_MODULE for qml_tests. Fix import for tst_uidelegates. Pick-to: 6.10 Change-Id: I01b6d58f10028378933272446c2afc3b98dcfed9 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Fix manual tests compilationMichal Klocek2025-07-311-1/+1
| | | | | | | | | This amends dfd0544c69de9d4e028c34a2539340944bb37848. Pick-to: 6.10 Change-Id: Ifca8513f252749a3dabbea967851392b01c31c03 Reviewed-by: Peter Varga <[email protected]> Reviewed-by: Martin Negyokru <[email protected]>
* Fix race condition in basicFilterOverHTTPMichal Klocek2025-07-313-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fav icon service is not bound to overall navigation status meaning, page can be loaded, but fav service can be still fetching icons. Moreover if new fav icon request comes to favicon service and the previous failed request did not manage to set WasUnableToDownloadFavicon the new request is fired. This means that tests which are handcrafted and count http request can suffer from race condition as there is currently no way to check it fav icon service has completed all the processing. To workaround the issue simply add fav.png to basicFilterOverHTTP test case and wait for iconUrlChanged signal, this way we can be sure the fav icon http fetches are done. Note, the change however requires updating of number of fired calls in spies, as before the change fav icon was considered not downloadable (unless it was run on windows due to mentioned race condition), now we have fav icon so any reload will trigger new fetch. This should not have effect on overall logic if the test. Pick-to: 6.10 Fixes: QTBUG-138736 Change-Id: Icdd4652becd39ba52dd392901907399817b9ae18 Reviewed-by: Kaloyan Chehlarski <[email protected]> Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* QWebEngineExtensionManager: make signal names simplerMartin Negyokru2025-07-303-16/+16
| | | | | | | | | | Update tests accordingly. Found in API-review. Pick-to: 6.10 Change-Id: Ife361cf95db6953413fe34392caf6fce3296c42a Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* QWebEngineExtensionManager: rename installDir to installPathMartin Negyokru2025-07-303-5/+5
| | | | | | | | | | | Rename installDirectory() to be consistent with QWebEngineProfile. Update tests accordingly. Found in API-review. Pick-to: 6.10 Change-Id: I8e9c9760950c0bf65a75292a22a1abc1f7deba91 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Tests: fortify window activation testsMoss Heim2025-07-167-19/+95
| | | | | | | | | | | | | | | Some tests require window activation so they can interact and query objects with active focus. For those, merely exposing the window is not enough because Ubuntu's default WM settings do not guarantee activation for new windows. We request that explicitly and wait on activation. We also need to disable those tests on platforms that don't support QWindow::requestActivate(), add a new header with a macro based on qtdeclarative tests to support that. Pick-to: 6.10 6.9 6.8 Change-Id: I7d80310e2318f9001b2dd5c581209e75b0c599fe Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Adaptations for Chromium 134Allan Sandfeld Jensen2025-07-145-107/+2
| | | | | | Pick-to: 6.10 Change-Id: I9615f0a095843fdf295e454a93476cf349f7fc76 Reviewed-by: Michal Klocek <[email protected]>
* tests: fix failing uidelegates testsMoss Heim2025-06-111-6/+18
| | | | | | | | | | | | | | | | | On Ubuntu it seems the application is not guaranteed to have focus just from showing the window. Take a solution from qtdeclarative tests (e.g. tst_qquicktext, tst_qquickmenu) where we also call requestActivate() and qWaitForWindowActive() rather than waiting on a focusObject to exist. Note that this will not change anything on Wayland where window activation is not supported by default/design. We should probably skip there; this is also consistent with qtdeclarative tests. Pick-to: 6.10 6.9 Fixes: QTBUG-137447 Change-Id: Ie19f6dcc0c2b9d1d45805cba8e63e5007f87c115 Reviewed-by: Anu Aliyas <[email protected]> Reviewed-by: Michael Brüning <[email protected]>
* Fix accessibility for <p> tags with Windows NarratorKaloyan Chehlarski2025-06-051-3/+3
| | | | | | | | | | | | | | | | QAccessible::Paragraph maps to a Text control on Windows, which causes Narrator to completely ignore its child nodes. Since even a simple <p>Content</p> generates two nodes, a nameless parent kParagraph and a named child kStaticText, the result is that Narrator will see a Text node with no name, and simply read "text". This change maps the kParagraph role to QAccessible::Grouping, which allows Narrator to see its child nodes and read their contents aloud. Fixes: QTBUG-134055 Pick-to: 6.10 6.9 6.8 Change-Id: I96d4262bd4149f1dec50d47491263d0b022d4b83 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Fix accessibility for tablesKaloyan Chehlarski2025-06-051-2/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | This change modifies a few of the table-related methods inside BrowserAccessibilityInterface to use corresponding specialty methods from Chromium's a11y implementation, instead of relying on manually extracted attributes. This fixes table contents always being reported as 'blank' to screen readers. The kRowHeader and kColumnHeader roles are now exposed as Cell to Qt (and thus, to the system), which is consistent with what Chromium does; exposing them to Qt as QAccessible::Row/ColumnHeader causes some issues when navigating with VoiceOver on macOS. The caption() method is now implemented as well. macOS-only implementations of certain platform methods related to tables have been copied over as well. This fixes some crashes when iterating through children. As a drive-by, this also fixes a rare a11y-related crash when in the middle of deleting a page. Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-136622 Change-Id: I157bece10d3c2261722d7f70e2b879c1d462b137 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Fix QWebEngineLoadingInfo::errorString()Szabolcs David2025-06-051-0/+49
| | | | | | | | | | | | | | When we try to deduce error messages from HTTP error codes, the result of error_page::LocalizedError::GetErrorDetails() can contain empty HTML placeholders for the host name or the full URL. Replace these with proper URL information to get grammatically correct error description. Moreover, prevent filling errorString with misleading error message when the load was actually successful. Pick-to: 6.10 Change-Id: I6ef589e6d31336a4916eb28b17ca14fac56c61a1 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Restore default locale at end of tests that set itEdward Welbourne2025-06-052-2/+9
| | | | | | | | | | | | | Leaking the change to later tests would potentially conceal locale-dpendencies in them, or cause failures that might appear flaky due to vanishing on the first rerun (unless the test that set the locale also happened to be rerun). Do this using a scope guard, rather than by setting at the end of the function, since the latter gets missed when the test fails or skips. Change-Id: Ib756afefaa4e73f47ca78543767da4ffda965286 Reviewed-by: Matthias Rauter <[email protected]>
* Normalize signal/slot signatures 2025Marc Mutz2025-06-045-19/+19
| | | | | | | | | | | This is the result of running util/normalize on the code base. The following manual edits were needed: (none) Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ia59174aaf154559f7445e13d059723a282f75aae Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* cmake: PdfWidgets/Quick - fix dependenciesTim Blechmann2025-06-041-0/+1
| | | | | | | | | | | PdfWidgets and QdfQuick should publicly depend on Qt::Pdf/Quick and only privately on PdfPrivate / QuickPrivate Amends 209778ed9a167c156b448689191d2a6a381a6880 Fixes: QTBUG-135974 Pick-to: 6.9 6.10 Change-Id: I9cdcc6d6fd6cd0a11691025580f2fd4a41325282 Reviewed-by: Alexandru Croitor <[email protected]>
* Support extension service workersMartin Negyokru2025-06-044-0/+46
| | | | | | | | | | | | | | | | | | | | | Extension service workers are core part of the ManfestV3, replacing background scripts from ManifestV2. Extension APIs (eg. chrome.tabs) are only available in these script contexts. This change implements the required methods to setup worker contexts. * Forward the service worker events from the renderer to the extension binding system. The binding system responsible for adding the `chrome` object and other API objects to the context. * Register the ServiceWorkerHost interface binder to enable ipc between the browser process and service workers. Pick-to: 6.10 Task-number: QTBUG-61676 Change-Id: I68c539f5ce28b7a7293c325705248bb9eb53ddc0 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Add auto tests for the extension manager APIMartin Negyokru2025-06-0212-0/+433
| | | | | | | | | Test QWebEngineExtension and QWebEngineExtenisonManager APIs. Pick-to: 6.10 Task-number: QTBUG-61676 Change-Id: Ib697bdca2ec1d7f9e86ab9ea88e210dfeb2e1780 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Fix test on qemu-arm64Allan Sandfeld Jensen2025-06-011-1/+1
| | | | | | Pick-to: 6.9 Change-Id: I3d86bd8caa745e36fefe4b44534b39cf900a8dbf Reviewed-by: Michal Klocek <[email protected]>
* Add support for extension WebUIAnu Aliyas2025-05-301-1/+1
| | | | | | | | | The WebUI can be accessed using the URL chrome://extensions This will list all the enabled and disable extensions and also provides a means to load extensions. Change-Id: Iddd61a858d100f292f7214e53a1ea753228af0b5 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Add API for extension managementMartin Negyokru2025-05-294-0/+348
| | | | | | | | | | | | | | | Introduce QWebEngineExtensionManager and QWebEngineExtensionInfo. The manager has methods to load and install Chrome extensions from the filesystem. QWebEngineExtensionInfo provides information about a loaded extension. The current state of our js extension API support is very limited meaning most of the extensions downloaded from Chrome extension store won't work. Adding support for these APIs will be done in followup patches. Fixes: QTBUG-118452 Task-number: QTBUG-61676 Change-Id: I017ad5e8d2ba963afbd2f31ac36fee9451a951bd Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Add API for providing additional CA certificatesKai Uwe Broulik2025-05-276-0/+189
| | | | | | | | | | This allows to provide additional certificates that are considered when verifying a certificate. This is done by the cert verifier downstream of the platform-specific cert store. Fixes: QTBUG-50586 Change-Id: Ie90547f1013f22f994aaff536fadf906a44a88ef Reviewed-by: Moss Heim <[email protected]>
* Client Hints: Improve version listsSzabolcs David2025-05-221-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several issues affecting Sec-CH-UA and -Full-Version-List, because the general algorithm which extends and shuffles these lists was not used in WebEngine. At the current version of Chromium we can't use the corresponding user agent utils functions, because they only allow one extra brand/version pair besides the two generated (Chromium and Not-A-Brand) ones. This change implements a simplified method to extend and shuffle the version lists to follow the behavior of Chromium and support more than three elements. QTBUG-133799: The order of brands and versions are still not customizable by the API user, but it is permutated in each major version of Chromium to comply with the standards. To allow customization of the order seems to be impossible without changing our public API. QTBUG-133708: The missing values of Sec-CH-UA are generated from the full version list, not customizable individually. This way it keeps the same values and the same algorithmically generated order as the full version list. Task-number: QTBUG-133711 Task-number: QTBUG-133708 Task-number: QTBUG-133777 Task-number: QTBUG-133799 Change-Id: I96f214ce54190666a34779130a04b56f600abef7 Reviewed-by: Peter Varga <[email protected]> Reviewed-by: Moss Heim <[email protected]>
* Turn webEngineCertificateError into a well-behaved value typeUlf Hermann2025-04-101-0/+1
| | | | | | | | | | | | | Allow a nullptr as the controller and add an "Ok" value to the enum to signify "no error". This is in line with the "OK" value in Chromium's net_errors.h. Furthermore, add a public default ctor to allow QMetaType to create it. Task-number: QTBUG-108649 Fixes: QTBUG-135032 Pick-to: 6.9 6.8 Change-Id: Id06db78f273805ba117eefaa0ada3eac2f538962 Reviewed-by: Michal Klocek <[email protected]>
* Fix flaky tst_qwebengineview::inputContextQueryInputPeter Varga2025-03-311-0/+1
| | | | | | | | | | TestInputContext relies on focus object. Wait for the focus object to be set before trying to record input. Pick-to: 6.8 6.9 Fixes: QTBUG-128440 Change-Id: Idc4a985d0f7305d13a4cb18f69da542c5e0469bd Reviewed-by: Michal Klocek <[email protected]>
* QtWebEngine auto-tests: use a function provided by QTestAnu Aliyas2025-03-274-18/+6
| | | | | | | | | Instead of having code-duplicates use the function provided by QTest. Task-number: QTBUG-132645 Change-Id: Ica3d4653ab76127f0a7f55014594a83f1c8ee87f Reviewed-by: Allan Sandfeld Jensen <[email protected]> Reviewed-by: Moss Heim <[email protected]>
* Avoid clipping of the popup window in webengine quickAnu Aliyas2025-03-271-1/+9
| | | | | | | | | | | Currently webenginequick uses a window as popup, and the contents are getting clipped with respect to the parent's boundary. To avoid this, set the transient parent instead of the parent. This is based on the documentation. Fixes: QTBUG-132794 Change-Id: I527ae55d130bc122c903a39738ffea5cec29eb90 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Moss Heim <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Michal Klocek <[email protected]>
* 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 <[email protected]> Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Peter Varga <[email protected]>
* 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 <[email protected]>