summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineview
Commit message (Collapse)AuthorAgeFilesLines
* Handle empty uri-list in dropped MIME dataMoss Heim2024-04-021-0/+23
| | | | | | | | | | | Previously WebContentsAdapter assumed that drag-n-drop MIME data with hasUrls() == true would also have a nonempty url list. This is not always the case. Instead, check directly if urls() is nonempty. Pick-to: 6.7 Fixes: QTBUG-123765 Change-Id: I9e2189e3f0223f98bdd8be273adb96cf063f4be3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix flaky horizontalScrollbarTestMartin Negyokru2024-03-071-0/+94
| | | | | | | | | | Mouse events will miss the hittesting if they are sent before the page is drawn. Introduce new test page that listens for first paint events. Pick-to: 6.7 6.6 Change-Id: I4846ec1bde3805f5dd0098d490cb85c72cb0884f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix cursor position during compositionAnu Aliyas2024-01-091-8/+57
| | | | | | | | | | | | | During input composition, the cursor is set to the starting position of the string being edited and refrain from updating it throughout the composition process. Once the string is committed, it is set to the last position of the committed string. The modified code is designed to exhibit the same behavior as the widget and quickwidget. Fixes: QTBUG-118746 Pick-to: 6.5 6.6 6.7 Change-Id: I9adb7a9bea9493457a1d9d4b32338cdba30920a1 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Do more WE processing before returning to the Qt event-loopAllan Sandfeld Jensen2023-09-291-7/+8
| | | | | | | | | Fix a race-condition in our tests that the change exposed Pick-to: 6.6 Task-number: QTBUG-116478 Change-Id: Id21c6b0bc9934fdcb69bd85350f5f263a9b96914 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Try stablizing testsAllan Sandfeld Jensen2023-09-241-16/+8
| | | | | | | | | | qmltests::WebEngineViewSingleFileUpload::test_acceptSingleFileSelection and tst_QWebEngineView::textSelectionOutOfInputField Pick-to: 6.6 Change-Id: Ica3e91f109ae2a43bff9cd25e0da7d363823a762 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add ImAbsolutePosition input method queryPeter Varga2023-09-181-0/+5
| | | | | | | | | | cocoa qpa uses it. Pick-to: 6.6.0 6.6 6.5 6.5.3 Fixes: QTBUG-115994 Change-Id: Ie9556169add96946b71299066b8db92bee23066e Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Mark the module as free of Q_FOREACH, except where it isn'tMarc Mutz2023-08-181-0/+3
| | | | | | | | | | | | | | | | | | | The density of Q_FOREACH uses is non-negligible here, too high for this author, still unfamiliar with this module, to tackle in a short amount of time. But they're concentrated in just a few TUs, so pick a different strategy: Mark the whole module with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). Created QTBUG-115805 to keep track of this. Task-number: QTBUG-115805 Change-Id: I7a80b1820972687ccced24d9edd7a8f5b826556f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix blacklisted qemu-arm64 testsMartin Negyokru2023-07-282-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - test_findTextInterruptedByLoad: Remove whitespaces from the text as it takes lot of time to render according to perf. It should fix the timeout errors. - loadStartedAfterInPageNavigation: Remove the viewport meta tag from test.html. The 2x scale is only applied in embedded builds, it puts some elements out of the view. - acceptNavigationRequestNavigationType: Refresh the reload.html page only once. On qemu it may reload multiple times messing up the list of navigation types. - horizontalScrollbarTest: Skip instead of blacklist. - tst_qtbug_110287: Use an url that loads faster. Pick-to: 6.6 Task-number: QTBUG-105342 Change-Id: Ifbd41885fee62b12f7022534f9b8bd5e20cbef01 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix crashes on sendEvent on 'invalid' key.textMichal Klocek2023-06-081-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | A user can create QKeyEvent which may have too long QKeyEvent::text and does not fit into null terminated blink WebKeyboardEvent::text. Till now the text was mem copied however without null-termination if it was too long (which is char16_t[WebKeyboardEvent::kTextLengthCap]) It seems that real keyboard events do not generate any 'key.text' for modifiers, however user can provide any text (for example in the form of 'shift' 'control'). Therefore 'alt' still worked as we had 16 bytes of space but 'shift' was already too long. In case we can not fit into blink web keyboard event text with null terminated string simply skip the text as it is not there in the first place in case of non-user generated key events. This way the text is always null-terminated. Pick-to: 6.6 6.5 5.15 Fixes: QTBUG-113704 Change-Id: Ib1560a44e7451ab7d886c72338b7433fc51318ed Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Blacklist tests blocking integrationsAllan Sandfeld Jensen2023-02-061-0/+2
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-110578 Change-Id: Ic063d08246351709d02642abc0747b5fbe9e2ef7 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for 108-basedAllan Sandfeld Jensen2023-01-061-1/+1
| | | | | | | Pick-to: 6.5 Fixes: QTBUG-105147 Change-Id: I0022964903f3443cc97843c62468ab9be8ae2ed8 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix GCC compiler warnings in auto testsPeter Varga2022-10-131-1/+2
| | | | | | 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-111-119/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-261-1/+1
| | | | | | 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-261-0/+3
| | | | | | | | | 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>
* Increase timeoutsAllan Sandfeld Jensen2022-08-171-3/+3
| | | | | | | | | | 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>
* 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>
* 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: I118bd63694cfe2c9a413af4a38828a31727f8e86 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Support HTML5 <datalist> elementPeter Varga2022-06-191-0/+152
| | | | | | | | | | | | | | | | | 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>
* 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-101-3/+3
| | | | | | | | | | | 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-091-1/+19
| | | | | | | | | | 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>
* unblacklist passing tests 2022Anna Wojciechowska2022-06-051-12/+0
| | | | | Change-Id: I3eec851a59e49c700945268c1421d18f4868d3c5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add NavigateOnDrop settingsAllan Sandfeld Jensen2022-05-132-4/+35
| | | | | | | | | | Some applications want this to avoid users navigating away from their app content. [ChangeLog][Settings] NavigateOnDropEnabled added, enabled by default. Change-Id: I2cc370f60ef42c708042cbc2503207f8254cf932 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Add convenience constructors to QWebEngineViewAllan Sandfeld Jensen2022-05-091-11/+7
| | | | | | | | Make it easier to use alternative profiles without having to use QWebEnginePage directly. Change-Id: I8406c9ee3b453f7ff45e64bb05d0f5ad57e389c4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix navigation to non-local URLsAllan Sandfeld Jensen2022-04-262-2/+10
| | | | | | | | | They are passed in another part of the DropItem object. Task-number: QTBUG-102192 Pick-to: 6.3 6.2 5.15 Change-Id: If52a88ce2688c25ea0edcc0d1e8f962f2cdd29dd Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Fix granted file access after local/remote access cleanupAllan Sandfeld Jensen2022-04-142-0/+33
| | | | | | | | | | | We forgot to check for files specifically granted access to. This blocked a number of features including dropping local files. Pick-to: 6.3 6.2 Task-number: QTBUG-102192 Change-Id: I5d34d9ba5351ec179df5896e64cc95c5481c7dc2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Avoid crash due to QWindow being changed under usAllan Sandfeld Jensen2022-04-051-4/+8
| | | | | | | | | | QTest::keyClick sends two events to the same QWindow with a wait in between. The QWindow can become invalid during that wait, so avoid using this method. Task-number: QTBUG-102253 Change-Id: I67d27d2bba8dd73d5918e8205e7250443799b2be Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Adaptations for Chrome 98Allan Sandfeld Jensen2022-03-291-1/+0
| | | | | Change-Id: I607604f85a111a69da77ca949dddf3399b9721b3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Avoid crashing on context free web actionsAllan Sandfeld Jensen2022-03-241-0/+32
| | | | | | | | | | If a web action that depends on a context is called, do nothing instead of crashing. Pick-to: 6.3 6.2 Fixes: QTBUG-101724 Change-Id: I7a0040a58e9dc7fa14f0cae71cf1bcd086b61c54 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Fix icon linkAllan Sandfeld Jensen2022-02-111-1/+1
| | | | | | | | Was looking in resources/resources. Pick-to: 6.3 Change-Id: Id393da93cecf0510cb284957ff87cdb33ac5855c Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Cleanup code and clang build warningsKirill Burtsev2022-01-021-3/+3
| | | | | | | | | Fix build noise as reported by clang for issues like api deprecation, unused variables, sign/unsigned mismatch and other non critical issues. Pick-to: 6.2 Change-Id: I4fba25406eea8170e3283c42e908ae86bd512e3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove our handling of IME hidden text supportAllan Sandfeld Jensen2021-09-221-5/+8
| | | | | | | | | | QtBase should be disabling it now, if not supported. Pick-to: 6.2 Change-Id: I79bae11764d3cbaba1ae1e0987bf0a472eee3325 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Nuke all qmake files from testsMichal Klocek2021-08-312-13/+0
| | | | | | Pick-to: 6.2 Change-Id: Ibad2e50d840a2eb0ccb9ac65158e512249a2bc79 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QWebEnginePage::view() replacementAllan Sandfeld Jensen2021-08-091-0/+5
| | | | | | | | | Make it a static getter in QWebEngineView Pick-to: 6.2 Fixes: QTBUG-95331 Change-Id: I552f0047343abd909c5cd521a7a7a01d62896b00 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Blacklist one page and one view test for armMichal Klocek2021-07-162-1/+4
| | | | | | | | | | | There is currently no way to get coin vm in reasonable time to investigate the issue. Adjust timings to see if this would be enough. Pick-to: 6.2 Change-Id: I59bf80da7d283c87e2d0ae95d2330bc0626a351f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Skip grab window and changeLocale() test on QEMUMichal Klocek2021-07-162-0/+5
| | | | | | | Task-number: QTBUG-94911 Change-Id: Ia381d2914740d0b0172df1af707b6ca1bdfd3d8e (cherry picked from commit 034e8e38e3d59ce294e3e6e3306623116a1f6d69) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove outdated QT_VERSION_CHECKsAllan Sandfeld Jensen2021-07-091-16/+0
| | | | | | Pick-to: 6.2 Change-Id: I4c4b78af0bd7da5912b5e0136f9cfdb3c4268a7e Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Add basic USB device loggingPeter Varga2021-06-151-1/+1
| | | | | | | | | | The log is available on the chrome://device-log WebUI. The logging depends on the WebUSB feature and it is disabled by default. Use --enable-features=WebUSB to enable it. Change-Id: Idcbdfa42db3b5a5851abbd3e8d877d69c2d9796a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix some compiler warningsPeter Varga2021-06-101-13/+4
| | | | | | | | | | | | | - Remove deprecated Qt::AA_EnableHighDpiScaling and Qt::AA_UseHighDpiPixmaps from examples. High-DPI scaling is always enabled. - Reorder initialization of members of QWebEngineDownloadRequestPrivate. Also remove m_ prefix from public members' name. - Remove unused parameters from methods of DummyDelegate. - Add missing overrides in auto tests. Pick-to: 6.2 Change-Id: I18d6973b8bee574b37b73fbaaa8d57002ac8ba2d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace calls to obsolete cmake functions with modern alternativeFabian Kosmale2021-06-071-1/+1
| | | | | Change-Id: I5674d887a73a6a693d1babc416470c9873491eb3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Replace FaviconManager with Chromium's Favicon ComponentPeter Varga2021-06-041-2/+4
| | | | | | Task-number: QTBUG-51184 Change-Id: Ie050cb23f2c86841a66ec384bfbcdf0713cffa7c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix generating webrtc logging resources with cmakePeter Varga2021-05-271-1/+3
| | | | | | | Also disable webrtc logging test if extensions are disabled. Change-Id: I49c8d4fb6049c9aed174f62f731b0f56dae490ba Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add tests to the cmake buildMichal Klocek2021-05-223-7/+41
| | | | | | | | | | | | | | | | | | | | Use QT_TESTCASE_SOURCEDIR instead of TESTS_SOURCE_DIR. Introduce Test::HttpServer and Test::Util targets. Query shared data location from server. Clean up "shared" resources. Note QT_TESTCASE_SOURCEDIR must be turned into the canonical form since the user can call on windows: "cmake \path\to\foo" instead of "cmake c:\path\to\foo" which will break all file:// urls. Note this patch breaks qmake builds. Task-number: QTBUG-91760 Change-Id: Ibc1f904ac9acd375d1ff70ff80f0c533497e3f20 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-05-122-14/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webenginewidgets/printme/printhandler.cpp src/3rdparty src/core/api/qwebenginepage_p.h src/core/content_browser_client_qt.h src/core/web_contents_adapter_client.h src/core/web_contents_delegate_qt.cpp src/core/web_contents_delegate_qt.h src/webenginequick/api/qquickwebengineview_p_p.h tests/auto/quick/qmltests/data/tst_download.qml tests/auto/quick/qmltests/data/tst_viewSoure.qml tests/auto/widgets/loadsignals/tst_loadsignals.cpp tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I9c1819ec15e13d4f8e244defe860e26274b5d4be
| * Fix application locales againSzabolcs David2021-04-212-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Different countries (with the same language) can have different number formatting and navigator.language should report not only the language, but also the country. Locale normalization often falls back by cutting the country off, because we have common .pak files for countries with the same language. This patch: - Uses the locale resolvation only for concatenating .pak file paths and reports the full locale everywhere else. - Properly sets default ICU locale for JS number formats and prevents l10n_util::GetApplicationLocale() to set it sneakily to some resolved one. - Fixes the crashing --lang command line argument and always prefers its value over QLocale. Task-number: QTBUG-91225 Change-Id: I1c09798abdb523b80f0b7a3d69fa8d7a08c7c09a Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-04-131-1/+23
|\| | | | | | | Change-Id: Ia01415e5a44b1df9ed8b3966ff3b39a414b1563c
| * View: test signal for deletion of external page set to viewKirill Burtsev2021-03-231-0/+22
| | | | | | | | | | | | | | | | | | Verify that view still gets notification about external page deletion through basic QObject::destroyed Task-number: QTBUG-90509 Change-Id: I5ae19f4184d6bbbfd94efe28a3f00fbb8f6d8a01 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| * Add web-ui chrome://net-internalsAllan Sandfeld Jensen2021-03-221-1/+1
| | | | | | | | | | | | | | Fixes: QTBUG-91695 Change-Id: Ie00b9bb92b62b97c500d427defbf2a4632ddbeda Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>