summaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
Commit message (Collapse)AuthorAgeFilesLines
* Normalize signal/slot signatures 2025Marc Mutz2025-06-261-2/+2
| | | | | | | | | | | 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: I42c969bfbc39e39ea6617ae7f6b585f35265bdd4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make tests based on runtime plugin settingMichal Klocek2025-06-262-28/+26
| | | | | | | | | | | | | Do not rely on compile time flags, as we can run the test with backend selected during runtime. Introduce WebViewFactory to hide the fact that webview tests uses quick apis. This should be all clean up when c++ api are introduced. Pick-to: 6.10 Change-Id: Ib630e828e6277061b84c1fe528c2d497ba4d0b4e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix webview2 async api call issuesMorteza Jamshidi2025-06-262-9/+8
| | | | | | | | | | | | | | | | | Qt webview tests expect the api calls to be synchronous, but some of webview2 api calls are async. This changes their behavior to be synchronous. other fixes: fixed stopEnabledAfterLoadStarted test to rely on webview being async. fixed some null pointer issues changed m_initData to class member Pick-to: 6.10 Task-number: QTBUG-75747 Change-Id: I979f1635cf049a90be3c8b134f61f5d6f594d971 Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* macOS: Flip the switch and make the native back-end the defaultChristian Strømme2024-12-051-1/+1
| | | | | | | | | | | | | | | In practice this have been the case for anyone not installing QtWebEngine and the platform issue that we had, and that required special initialization set-up, hasn't been an issue and that code has been removed from 6.5 and newer (see: 5f15afaaf07586006b1731cadcb061fa23c71aef). With this change we'll use the native back-end by default on macOS. [ChangeLog][macOS] macOS will now use the native WebView backend by default, meaning QtWebEngine is no longer required on macOS. Change-Id: Iebcefddf93432c5184d495d286bdead679e423de Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix all tests on android instead of blacklisting themMichal Klocek2024-11-072-18/+7
| | | | | | | | | | | | | | | | | | | | | | | | Fix handling of loadingChanged as this should come from WebViewClient observer. This fixes flaky tests, as they assumed 2 signals coming, but in reality 3 were emitted. In case 3rd did not come in time test would pass. Adjust the title test to match how it works on android. Fix load result logic, as error assumes no load success signal emitted and has to be one of * LoadStartedStatus, * LoadStoppedStatus, * LoadSucceededStatus, * LoadFailedStatus Fixes: QTBUG-102712 Fixes: QTBUG-108752 Pick-to: 6.8 Change-Id: Ie3c729fa854ad1e6270a8276c1f2428af6c2614e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Clean up license and copyrightLucie Gérard2024-10-173-54/+6
| | | | | | Pick-to: 6.8 Change-Id: Id2d7a03c979f8506791ed673c498d21b0485a96f Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Fix failing test due to async title update in WKWebViewChristian Strømme2024-07-051-1/+1
| | | | | | | | The title isn't changed immediately, so do QTRY_COMPARE Pick-to: 6.8 6.7 6.5 Change-Id: I565ed9fadabdc491599b1d390c4ded6232857420 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Enable locale file access in the auto testsChristian Strømme2023-06-141-0/+2
| | | | | | | Task-number: QTBUG-114495 Pick-to: 6.6 6.5 6.5.2 Change-Id: Ic32814a8e2672dd3835083dc2e8c0abebb9f168b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Skip test when running with QEMUChristian Strømme2022-12-021-0/+8
| | | | | | Task-number: QTBUG-109083 Change-Id: I9b596120f61e561755df23a51b406eeb6132a6b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Android: blacklist tst_QQuickWebView::settings_JSRami Potinkara2022-11-231-0/+3
| | | | | | | | | | Test mentioned in the title failed on Android 12 CI Reason likely in qrc handling, root cause to be found Task-number: QTBUG-108752 Change-Id: I74bc3810fbb8cd6e02e03445f023648523a91148 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Add settings API for QtWebViewChristian Strømme2022-10-273-0/+48
| | | | | | | | | | | | | Adds API and implementation for changing the settings of the WebView. [ChangeLog][General] Added settings API to make it possible to modify some of the WebView's built-in functionality. Task-number: QTBUG-97487 Task-number: QTBUG-98549 Change-Id: Ia121175ec08c96f56fd2148b02dccbc963fff244 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Port from container::count() and length() to size() - V4Marc Mutz2022-10-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: I1f5e98760b107ca15264cbdf03ff5a48b21d99cc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I824b873d98c922af8a4a290dcd797a2135d1147f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-071-0/+3
| | | | | | | | | | | | | 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: Iff8b50e402d070ba5fa2562fef50b7d7d3743cb4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix crash due to missing native functions for the cookie APIsChristian Strømme2022-05-092-14/+57
| | | | | | | | | | | The cookie API that was added in 317e13cb2d97 missed the registration and implementation for the native java functions needed for notifying when a cookie got added/removed. Fixes: QTBUG-102801 Pick-to: 6.3 Change-Id: I7594f75abba17b6ff1843d5349af085f90aae9b1 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: ignore some webview test casesAssam Boudjelthia2022-04-252-0/+14
| | | | | | | | | | | Skip a crashing test and ignore some failures to allow enalbing other tests in CI. Task-number: QTBUG-102712 Task-number: QTBUG-102801 Pick-to: 6.2 6.3 Change-Id: Ic5946ada21589e4b92b8da909fd099033553bbb8 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revert "Blacklist: test cases blacklisted in tst_QQuickWebView:"Pasi Petäjäjärvi2022-04-041-46/+0
| | | | | | | | | | This reverts commit 034a3f23a2b2f670287bd4daec3b2fe5df4a3006. Reason for revert: Fixed 90f6047638ceab8944b4fefab1196f38ac579b67 Task-number: QTBUG-101520 Change-Id: Ibb0e27c04dba4ec56a8abd77cc70d800b25c91c0 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Blacklist: test cases blacklisted in tst_QQuickWebView:CI Insignificant Platforms Monitor Bot2022-03-071-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | - multipleWebViewWindows on qnx - reload on qnx - loadNonexistentFileUrl on qnx - titleUpdate on qnx - changeUserAgent on qnx - loadProgress on qnx - stop on qnx - backAndForward on qnx - removeFromCanvas on qnx - loadEmptyPageViewVisible on qnx - stopEnabledAfterLoadStarted on qnx - multipleWebViews on qnx - loadEmptyPageViewHidden on qnx - setAndDeleteCookies on qnx - showWebView on qnx Pick-to: 6.2 Pick-to: 6.3 Task-number: QTBUG-101520 Change-Id: Icc95ce78e5bf57d988704ce84711a2e1be75e97b Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
* Add support functions to manage cookiesAgnieszka Jaworska2021-12-143-0/+55
| | | | | | | | | Setting and deleting cookies, changes for android, darwin and webengine plugins Pick-to: 6.3 Task-number: QTBUG-96204 Change-Id: I4f79d34384e490b70a1e9f89196dd113733d5fe1 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Use new qml cmake apis and new qml registrationMichal Klocek2021-07-193-7/+5
| | | | | | | | | | | Move quick sources to sepatrate qml module so new qml registration system can be used. This drops dependency of QWebView module on Quick. Pick-to: 6.2 Change-Id: I10adb5e898ae2ffe4a46f37d759983047ea89483 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove qmake filesMichal Klocek2021-06-174-43/+0
| | | | | | Pick-to: 6.2 Change-Id: I04c6f3f6bdfadcddac6d79440d6e292241bc50cd Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Fix two falling tests with webkit/darwin pluginMichal Klocek2021-06-022-1/+11
| | | | | | | | | | | | | | | | | | | | In case of mac arm64 and universal builds, where there is currently no webengine, unit tests run with darwin plugin, which has following issues: * tst_QWebView::loadRequest() it seems that after failure load, progress stops at 100 when darwin plugin is used * tst_QQuickWebView::titleUpdate, titleChanged signal does not get emitted when there is no title for darwin plugin, webengine seems to still emit signal for that(QTBUG-94151) Add compile time workarounds. Task-number: QTBUG-88620 Task-number: QTBUG-94151 Change-Id: Ie76977de59ec55d23ddd6d472337acf90cbd4ccf Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Add cmake buildMichal Klocek2021-06-0212-63/+46
| | | | | | | | | Update dependencies to latest shas. Fix compilation issues. Task-number: QTBUG-88620 Change-Id: I0c82431e6ffd142302cce12e6ee74d2139e1e42f Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix running tests with webengine pluginMichal Klocek2021-06-021-26/+26
| | | | | | | | | | | | | | | | | Adopt test to run also with webengine plugin, so webview can be tested also on dektop. * use QUrl::fromLocalFile for file urls * QWebEngineWebView expects QQuickWebView as parent in case of webenigne plugin, adjust tests and QWebView accessor to qquickwebview * disable error page for webenigne plugin, so tests have same results as for other plugins This patch is a part of cmake port effort. Change-Id: I502bfdc5b6bce8950176d3b20ac35b1e10269393 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Set the httpUserAgent after the component has been completedAndy Shaw2020-03-201-1/+17
| | | | | | | | | | Since httpUserAgent can be set as a property then it should account for the fact that init() has not yet been called. So ensure that the httpUserAgent is set on the profile created when init() is called. Fixes: QTBUG-82778 Change-Id: I072676e719eedcb0fbc8024f3e902fd1b7073a3e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Remove WebView and UIWebView backendsJake Petroules2017-01-111-1/+1
| | | | | | | | Our minimum deployment target is now macOS 10.10 and iOS 8.0 in Qt 5.9, so the WKWebView backend will always be used instead. Change-Id: Ifd24948954cc273fee458c212b1801dc4a5aca45 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add a proper backend for WebEngineChristian Strømme2016-03-041-0/+2
| | | | | | | | | | | | | This removes the need for the awkward type re-registering and renaming that was done in the Qml plugin, to support QtWebEngine. Among other issues, the main motivation for this change is to unify the implementations, and make it possible to run the auto tests that interfaces directly with the QQuickWebView class. Having an actual backend for Qt WebEngine means we can get rid of the, non-functional, default implementation as well. Change-Id: Ia93611ed2755c92207ca86ba3890ac4c2c4d72e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix wrong header inclusions in the auto tests.Christian Strømme2015-08-282-3/+3
| | | | | | | The headers were renamed and marked as private. Change-Id: I4c9904542acdfe0770c034e6baa863ee0801acd6 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Fixed bugs in license headerJani Heikkinen2015-08-251-15/+10
| | | | | | | | | Two files were using old LGPL license headers and that's why license header tests were failed. Changed those files to use LGPLv3 header template Change-Id: I95bd010087b83c6aa174d53e7c2378bdd9e57c70 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Import qml tests from WebEngineChristian Strømme2015-06-2215-0/+744
Tests are taken from QtWebEngine and adjusted to test QtWebView. Change-Id: I0a8ed5b844beeec44043ff54145d45267321a7cf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>