summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Add auto tests for fragment navigation on custom URL schemesSzabolcs David2022-11-282-1/+188
| | | | | | | | | | | Since the corresponding third party fix involves making difference depending on the URL syntax, and the issue mentions different behavior in case of relative and absolute URLs, test all four syntax with all four types of URL with both relative and absolute links. Task-number: QTBUG-102058 Change-Id: Idfcc899e33241f42c588b9aae04c5b42b0e07ccd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Skip tests on qemu arm64Allan Sandfeld Jensen2022-11-281-0/+3
| | | | | | | | Just too slow Task-number: QTBUG-108993 Change-Id: I907118e2d72ae6e2c1b6953ff692d7b922cef74f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for 106-basedAllan Sandfeld Jensen2022-11-287-13/+15
| | | | | | Change-Id: I2fe91c06ce91dfaace7825a0589b56ee375479b6 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Return both application and system certificatesAllan Sandfeld Jensen2022-11-225-8/+143
| | | | | | | | | | | | | | | | | | | | | | | | | For the certificate choice return both application and system certificates. Add unit test to cover the case on Linux. Unfortunately it requires adding the user certificate to the nss data store, which is not not nice, however porting the certificate manger from Chromium is a bigger task. Test runs only if the machine has pk12utils installed. During the test the user certificate is imported into the nss database with the nickname 'qwebengineclientcertificatestore'. This can be removed later with: ninja remove-user-personal-certificate and verified with: certutil -d sql:$HOME/.pki/nssdb -L Pick-to: 6.4 Change-Id: I475fddc68ea56304980f6c835ed4cfed4b093ad4 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add client SSL authentication testMichal Klocek2022-11-2210-6/+200
| | | | | | | | | | | | | | | | Our qwebenginecertificatestore unit test so far only tested adding/removing custom certificates into the memory. However, it never actually initialized certificate store and did not test if ssl certificate client authentication really works. Cover that case and client authentication test. Note ca and client certificates in the test are self signed to be able to run test without network connection, however we ignore the errors. Pick-to: 6.4 Change-Id: I4df4fdfabed5abd8f8bde7d4c0c79b5fd7f6f3a9 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Use QSslServer in certificate testMichal Klocek2022-11-173-37/+31
| | | | | | | | | | | | | | | | | We had our own implementation for the HTTPS server. However, the way it worked involved adding for every incoming connection a socket to the list of pending connections, which resulted in unnecessary logging noise due to socket connect/disconnected signals during the SSL handshake negotiations. It also resulted in memory leaks. Since 6.4 we have now QSslServer which adds socket to the pending connection list only after encryption got established. Pick-to: 6.4 Change-Id: I3c8a2a0684e3f0760a56d4b4aaf7b777700e334b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Monthly re-run of clang-tidy qt-* checks (11/2022)Marc Mutz2022-11-111-21/+21
| | | | | Change-Id: Ife7ebf1bf0b1db867e0ea195d9a8a3b4abd9a1b7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Blacklist certificate test and unblock integrationsMichal Klocek2022-10-311-0/+2
| | | | | | | | Certificate for revoked.badssl.com expired on 10/28/2022. Pick-to: 6.4 Change-Id: I06022bea1404bf5134f815067dcd2713790e5a23 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix GCC compiler warnings in auto testsPeter Varga2022-10-133-9/+13
| | | | | | Pick-to: 6.4 Change-Id: I9daae92749e7dbe0580c17e8f0325e2199b2ed17 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Port from container::count() and length() to size() - V4Marc Mutz2022-10-1128-741/+741
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); a.k.a qt-port-to-std-compatible-api V4 with config Scope: 'Container'. Change-Id: I3e6fef8eca212da0c4f0b464545ba96183b4476f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-073-4/+4
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I4b5f85df579532c2af938fe70db945ba273782fb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add missing header to tst_qwebenginepageMichal Klocek2022-10-062-2/+3
| | | | | | | Fixes: QTBUG-107113 Change-Id: I53a540d05bcafefad282ee00091eb421d07992c6 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Stop using deprecated QMouseEvent constructorShawn Rutledge2022-10-061-2/+5
| | | | | | | | | Followup to qtbase 6b2c9b81afdb3d1d9b7a2e87819e9545b14810f3 Pick-to: 6.4 Change-Id: Ib879ee176c4fd1fc4bdbac7161ea20cf5c59a247 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix locally falling tst_qpdfdocument on qemuMichal Klocek2022-09-151-1/+1
| | | | | | | | | | Use name for temporary file otherwise is can not be opened on qemu. Task-number: QTBUG-105342 Pick-to: 6.4 6.3 Change-Id: I7f9ed244c32b866ead6832ed942e2293be24811b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix using QNetworkReply with custom url schemesAllan Sandfeld Jensen2022-09-121-7/+52
| | | | | | | | | | | | | Sequential QIODevices are allowed to report atEnd() when they have no data to read, but add more data later. To avoid a regression with our own tests, treat a read error from a sequential device at end, as end-of-data. Pick-to: 6.4 6.4.0 6.3 Fixes: QTBUG-106461 Change-Id: Iac1233e6daa978c827c37a7fd3131e2fce764111 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* CMake: use LIBRARIES rather than PUBLIC_LIBRARIESEdward Welbourne2022-09-121-1/+1
| | | | | | | The longer name is now deprecated in favor of the shorter. Change-Id: I3b5ddd4c221ebdddced3a624234e40d8c00b3d8e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Enable Push MessagingSzabolcs David2022-09-121-0/+2
| | | | | | | | | | | | | | | | | | Use Chrome's implementation of PushMessagingService. This feature relies on notification permissions, so it is not different from Web Notification from end-users perspective. We don't persist push subscriptions, because it seems these have to be consistent with persisting notification permissions. Make address of push service configurable by a profile setting. It is empty by default - which means the feature is disabled until the user sets the address of a push service. Task-number: QTBUG-98904 Task-number: QTBUG-53457 Change-Id: If44f459fecf2da482c28fee5562f62fe40de103e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Improve tests for qemu-armv7Allan Sandfeld Jensen2022-09-022-3/+2
| | | | | | | | | | | test_runJavaScript() was badly written with a hardcoded wait of 100ms this should make it both faster on normal machines and more reliable on slower ones. Fixes: QTBUG-106210 Pick-to: 6.4 Change-Id: I539e59dce6e3719661202e1a213277794a660bd3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add tst_MultiPageView::navigation() testShawn Rutledge2022-09-013-0/+138
| | | | | | | | | | | | The navigation() test is a high-level one to verify that the navigation stack works and that the TableView jumps to the expected locations inside the document when we go to pages, click links and use the forward() and back() methods. It's similar to the internalLink() test, but more programmable. Pick-to: 6.4 Change-Id: I337e2ae283213238288a172d1bab3df07a1395e0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Blacklist tst_MultiPageView::password on WindowsShawn Rutledge2022-08-311-0/+3
| | | | | | Task-number: QTBUG-106072 Change-Id: Iecc763f0f8cd5f1b83588a31f1de4fd4f8c0055e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Begin adding Qt Quick Pdf testsShawn Rutledge2022-08-319-0/+762
| | | | | | | | | | | | | | | | | ...starting with tests for the PdfMultiPageView component. The file bookmarksAndLinks.pdf is fx/other/bookmarkgetcolor.pdf from https://pdfium.googlesource.com/pdfium_tests pdf-sample.protected.pdf is from 55b863f2dd2773290c63259c3835b19dcb277098 The shared/util implementation is adapted from the Qt Quick 3D module, with showView() adapted from qtdeclarative's viewtestutils.cpp. Pick-to: 6.4 Change-Id: I1458968846d33f262465a368fdaec771d4979b67 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix crashes of combobox popup testsMichal Klocek2022-08-261-9/+22
| | | | | | | | | | | | | | | | Offscreenwindow from quickwidget is a top level window, which was from time to time used as "popup" window in the test instead of widgetwindow of webengineview. Check if window is offscreenwindow and do not consider it as valid window in the test. Moreover popup should be closed in the end of test, however checking for offscreen window would result in bogus outcome as offscreen window is destroyed before quickwidgetwindow. Pick-to: 6.4 6.3 Task-number: QTBUG-105342 Change-Id: Ibfeab0cad0bc43690c2458cb97738b4b5ea132f4 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2648-48/+48
| | | | | | Task-number: QTBUG-105718 Change-Id: I2ad190e5536cdbdc8d2656e61892545d66911a02 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Reestablish default config for embedded buildsAllan Sandfeld Jensen2022-08-262-0/+6
| | | | | | | | | Was missing from the CMake switch-over Pick-to: 6.4 Change-Id: I0171d395f9e66c072e368b7019539fc29ff865b8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix initial widget focusPeter Varga2022-08-241-13/+43
| | | | | | | | | | | | Avoid WebEngineQuickWidget::rootObject() to steal focus from the content item (RenderWidgetHostViewQtDelegateItem). The root object is supposed to keep the content item alive and not handling input events. Fixes: QTBUG-105072 Pick-to: 6.4 Change-Id: I18e8ff39bfe338b742416bc56f6937edcfd2bc21 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QWebEngineUrlRequestInfo::httpHeaders()Benjamin Terrier2022-08-231-0/+38
| | | | | | Fixes: QTBUG-105399 Change-Id: I6bc64d7f0b5e80b8645d7dbccb224262ff17c1a4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Increase timeoutsAllan Sandfeld Jensen2022-08-1712-17/+17
| | | | | | | | | | Trying to pass on qemu-arm64 Pick-to: 6.4 Task-number: QTBUG-105342 Change-Id: I5eca4ef2235d26b88207decd66b06c30b9f9972f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Only skip arm64 qemu testsAllan Sandfeld Jensen2022-08-121-1/+1
| | | | | | | | | It seems we can pass the arm32 tests. Pick-to: 6.4 Task-number: QTBUG-105342 Change-Id: Ic5492e43cd327119305c3731701186710f9d59c6 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix single process crash when proxy pac is usedMichal Klocek2022-08-053-8/+30
| | | | | | | | | | | | | | | | | | Using proxy v8 resolver ends up in race condition when render thread tries to evaluate extension handle and v8 proxy resolver evaluates proxy pac script. Disable v8 proxy resolver for single process mode. Issue tracked upstream http://crbug.com/474654 Modify the unit test to catch the crash case, the test loads now network resource but it does not matter as we do not check for failure or success. Fixes: QTBUG-104436 Pick-to: 6.4 6.3 Change-Id: Id3221d1b8b3896f0ced3d0cd7cb9d9eceeb929cc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Disable tests on qemu temporallyMichal Klocek2022-08-041-1/+3
| | | | | | Task-number: QTBUG-105342 Change-Id: Ic644c193329ff6c21dfffe43f52ea6f0c5a8fc3f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for Chromium 102Allan Sandfeld Jensen2022-08-041-5/+10
| | | | | | Pick-to: 6.4 Change-Id: I7ef0ad616f2ea0fae482253335e95998aa2d360e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 100Allan Sandfeld Jensen2022-08-043-11/+11
| | | | | | Pick-to: 6.4 Change-Id: I217c87657f544a2e868de7291353ff1143e20902 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-285-6/+5
| | | | | Change-Id: I31bd3dd7d7be0f32b999b3874cc996815758c146 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Use SPDX license identifiersLucie Gérard2022-07-081-27/+2
| | | | | | | | | | | Ammend 9b9d789fcb8f63a8998f1eefe44f2a1c8156c362 : some files were still missing SPDX headers Pick-to: 6.4 Task-number: QTBUG-67283 Task-number: QTBUG-104589 Change-Id: Ia4d2aae636bbdb1a99c422e3b8d3f097c3af34d6 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-0748-0/+144
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I118bd63694cfe2c9a413af4a38828a31727f8e86 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Skip uidelegates test on macosAllan Sandfeld Jensen2022-07-051-1/+4
| | | | | | | | | | | | We have two bugs here, one failing most tests, and one crashing. Skip the entire test on macos until fixed. Pick-to: 6.4 6.3 Task-number: QTBUG-101744 Task-number: QTBUG-103354 Change-Id: Ib56921b8d075ab5874f68fe8c0815c6c0155b5de Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Various clean-upsPeter Varga2022-06-241-0/+2
| | | | | | Pick-to: 6.4 Change-Id: I53e04a247a25149d9f29135484c0528c706de7d8 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-22101-2803/+202
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I869ffda1080e283f231eb0dc4477b260f2054d99 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Support HTML5 <datalist> elementPeter Varga2022-06-195-14/+373
| | | | | | | | | | | | | | | | | The datalist uses Chromium's autofill component to fetch and filter predefined options in the list and autocomplete the field with the selected option. Autofill component is added to build and bound to WebEngine. All the unnecessary autofill features for datalist are supposed to be disabled: payment/credit card support, password manager, save profile data, store suggestions in database etc. Custom popups for the dropdown are implemented for Widget and Quick. Scrolling in dropdown is not implemented in this change. Fixes: QTBUG-54433 Pick-to: 6.4 Change-Id: I155d02d6dbc9d88fbca4bc5f55b76c19d0ba7a9d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Test local, secure and file redirectsAllan Sandfeld Jensen2022-06-183-30/+178
| | | | | | | Pick-to: 6.4 Task-number: QTBUG-99207 Change-Id: I28a3d06f97c0973ccc0f23bd90de58e89b19eb7a Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Update ChromiumAllan Sandfeld Jensen2022-06-131-1/+1
| | | | | | | | | | | | Submodule src/3rdparty 6559e00a3..88398c89a7b: > Fix broken bundled zlib for cross compilation > FIXUP: Fix url_utils for QtWebEngine > Make sure we do not compile minizip from 3rdparty > Trim down some dependencies of push messaging Pick-to: 6.4 Change-Id: I3062f536fd144d00f72ea783ddcc56931a46a98f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Avoid extra window after change of pageAllan Sandfeld Jensen2022-06-111-0/+1
| | | | | | | | | A widget created for an item in a viewless page, still needs to be tracked as a widget. Pick-to: 6.4 Change-Id: I9d571916b28b1cb2b8bd184d008255b9af105c33 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Switch from QT_NO macros to feature checksAllan Sandfeld Jensen2022-06-103-5/+7
| | | | | | | | | | | This is safer by ensuring we are checking for a feature that is defined. For some reason, the openssl feature is a private feature, so we need to include the private header to access it. Pick-to: 6.4 Change-Id: Idf7f3baba33e5188f206f5be1b8a0bfd75e79d03 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Create a RWHV delegate in coreAllan Sandfeld Jensen2022-06-094-4/+28
| | | | | | | | | | This is adapting the Quick code for shared use with widgets, and allows us to use it from QWebEnginePage. Pick-to: 6.4 Fixes: QTBUG-96377 Change-Id: I3f09c1a949eff86d80fbe6c513dc66e3f9f2f611 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Revert "Skip tst_UIDelegates::contextMenu on macOS"Shawn Rutledge2022-06-081-3/+0
| | | | | | | | | | This reverts commit af4f03f51fc647c48968e149799cd35ab161dc55. Reason for revert: crashes anyway, somehow Task-number: QTBUG-103354 Change-Id: I6f3119f855ce485668d9541c323dee947df93b60 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Do not reset favicon for same document navigationsPeter Varga2022-06-072-0/+69
| | | | | | | Fixes: QTBUG-103735 Pick-to: 6.3 6.4 Change-Id: Iee0c09cde16a825097b7c1c014655476989922c0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Prove that the service worker works with otr profileMichal Klocek2022-06-073-10/+56
| | | | | | | | | Check registration installation and activation of service worker and add basic message ping pong test. Pick-to: 6.3 6.4 Change-Id: Ia446553ccbc62b45a5d6313cbbdf15108adcdd36 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* unblacklist passing tests 2022Anna Wojciechowska2022-06-051-12/+0
| | | | | Change-Id: I3eec851a59e49c700945268c1421d18f4868d3c5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QPdfDocument::pageLabel(int) and pageModel propertyShawn Rutledge2022-06-042-0/+11
| | | | | | | | | | | This API is available for both C++ and QML. The pageModel makes it easier to populate item-views with per-page information, such as thumbnails labeled with page labels. Fixes: QTBUG-102271 Change-Id: I70df481b378efed0327e7bb89a63c7669daecc70 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Skip tst_UIDelegates::contextMenu on macOSShawn Rutledge2022-06-041-0/+3
| | | | | | | Task-number: QTBUG-103354 Task-number: QTBUG-101744 Change-Id: I6faf1d9cc2110d527050804e15ecb16ff12f528b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>