summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix building with latest qtbaseAllan Sandfeld Jensen2020-03-031-1/+1
| | | | | | | The replacement of error with networkError was reverted. Change-Id: Iae618b1e74ac7f67b6c02a809b3177b2183b5783 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Enable tst_QWebEngineProfile::changeUseForGlobalCertificateVerificationJüri Valdmann2020-03-031-2/+0
| | | | | Change-Id: I3469b38146fae425d1282e47b405a6d2710191bf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix accessibility test for table elementsAllan Sandfeld Jensen2020-03-031-121/+119
| | | | | | | | They need the general structure around, and a hint that the table is not just for layout. Change-Id: I12f0512a940da4aabb8ce1513da139d8f023f1e2 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-031-4/+4
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I0a37800da400a1f4213d8522de0c818356a7c481 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Adaptations for Chromium 79Allan Sandfeld Jensen2020-02-284-14/+7
| | | | | | | | Fixes: QTBUG-80737 Fixes: QTBUG-81556 Fixes: QTBUG-81614 Change-Id: Ie6a69cdbf46d0508bff226f1b8fed28a618e1949 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Allan Sandfeld Jensen2020-02-277-106/+290
|\ | | | | | | | | | | | | | | Conflicts: src/core/renderer_host/web_channel_ipc_transport_host.cpp tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp Change-Id: I47f2b893bc9f27cd9df641f76badc9e53b482ad4
| * Clear previous page text selection on new navigation unconditionallyKirill Burtsev2020-02-261-18/+28
| | | | | | | | | | | | | | | | | | | | Remove code duplication on triggering new url load, and use direct code to clear SelectedText instead of CollapseSelection as it assumes focused frame and might be ignored. Fixes: QTBUG-81574 Change-Id: I01cf02967e118f407c8a3997e176d5b258478a5a Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Fix event.key for Ctrl key combinations on WindowsPeter Varga2020-02-251-11/+29
| | | | | | | | | | | | Fixes: QTBUG-81783 Change-Id: I107a4009630dc261013498a05987c0e8e29651eb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Add more tests for profile settingsJüri Valdmann2020-02-185-79/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests for changing httpUserAgent, httpAcceptLanguage, and persistentCookiesPolicy. Use local HttpServer instead of network in existing tests. Stabilize disableCache test and unblacklist. Stop actually downloading the test binary in downloadItem test. Register 'myscheme' to avoid warning from QWebEngineUrlScheme. Task-number: QTBUG-81558 Change-Id: I3178edd1eb241257e211855168ec4ca428a90d29 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix not working proxy_pac test with network serviceMichal Klocek2020-02-212-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Due to sandboxing we can no longer pass pac file. Pass it as data url instead by reading the pac file and encoding into base64. Fix failing proxypac url on windows. Fixes: QTBUG-81557 Change-Id: I3dc3da4fbd3cce4e903c75022b8e9fe5faf71604 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix CustomURLLoader not supporting responses over 64k bytesJüri Valdmann2020-02-211-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Mojo data pipes are non-blocking, meaning we have to wait until there's room in a buffer before we can transfer data from the QIODevice to the pipe. Use mojo::SimpleWatcher to monitor the pipe for readiness and use the two-phase BeginWriteData/EndWriteData API to let the QIODevice write directly into the pipe's internal buffer, avoiding a copy. Fixes: QTBUG-82244 Change-Id: I65e69ce72d0e99bc047c57b5a22531c0891c553a Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | View's contexMenu test: fix assumption for input eventsKirill Burtsev2020-02-191-9/+28
| | | | | | | | | | | | | | | | | | | | Mouse clicks are set to be ignored in chromium 79 as no useful actions are available before first real navigation. Add simple blank load for that and also enforce checks for different kind of policy. Task-number: QTBUG-80743 Change-Id: Icb0056895c5b194e85bb711b8449e179257f8d5d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Allan Sandfeld Jensen2020-02-191-1/+1
|\| | | | | | | | | | | | | | | | | Blacklisted one test requiring an update of qt5.git. Conflicts: .qmake.conf Change-Id: I75e55a1c5f8840cde55ddb60d632287b2affadeb
| * Fix backActionUpdate flaky failureKirill Burtsev2020-02-041-1/+1
| | | | | | | | | | | | | | | | BackAction might not be immediatelly enabled after frame's content check through javascript. Amends d7d40469b5. Change-Id: I2b6242da190c39b8d72d17d563c6c86238e56887 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix accessibility anchor testAllan Sandfeld Jensen2020-02-121-1/+1
| | | | | | | | | | | | | | Needs an id to a valid anchor. Change-Id: I39d586e94ca68c0d502302aa27d228f3c5caf160 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Jüri Valdmann2020-02-042-0/+81
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Jüri Valdmann2020-02-032-0/+81
| |\| | | | | | | | | | Change-Id: I349a4ecbbd9d3d121ca6564db77e417872246554
| | * Fix widget accessibility on macOSPeter Varga2020-01-241-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macOS Accessibility queries the window for the focused accessibility element. The window forwards the query to the widget with active focus. This widget is the RWHVQtDelegateWidget if a web element is focused in QWebEngineView. Therefore, a QAccessibleWidget interface has been implemented for the RWHVQtDelegateWidget to forward the request to the QWebEngineView. The focused accessibility element expected to be returned by the QAccessibleInterface::focusChild() method. In case of the macOS accessibility backend, it is called by the accessibilityFocusedUIElement() NSAccessibility API function. It expects the focused web accessibility element otherwise VoiceOver won't focus properly. The focused web accessiblity element is looked up by the new BrowserAccessibilityQt::focusChild() method. RenderWidgetHostviewQtDelegateWidget::focusChild() and QWebengineViewAccessible::focusChild() methods have been also implemented to forward it. This patch depends on a focusChild() fix in qtbase: a132e02540 Fix QAccessibleWidget::focusChild() to return focused descendant Microsoft Narrator also uses focusChild() to query the current focused element when it starts but it is still functional without this fix. Task-number: QTBUG-78284 Task-number: QTBUG-81539 Change-Id: I3c4861e58622ccbb5046c60c4efcc19842400a88 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| | * Blacklist tst_QWebEnginePage::mouseMovementProperties on macOSTor Arne Vestbø2020-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | It relies on moving the cursor. Task-number: QTBUG-76312 Change-Id: I6bdd53b8c0eb41300a538137fb7ec52881c38f33 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Blacklist page's dev tools tests for msvc-2019Kirill Burtsev2020-02-042-4/+10
|/ / | | | | | | | | | | | | | | | | Also speculatively increase timeouts for load operations Task-number: QTBUG-81263 Task-number: QTBUG-79852 Change-Id: Id7fc0849d671535e35c939edbe4ef365b229dce4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add getter/signal to get the render process PIDFlorian Bruhin2020-02-011-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | This can useful for e.g. implementing something like the "Task manager" in Chromium or otherwise interacting with the render process (e.g. to kill it for some reason while debugging). [ChangeLog] Add a renderProcessPid() getter to (Q)WebEnginePage which allows getting the process ID of the underlying render process. Change-Id: Id5d59be9b6bd46ffc3a6aa480cb5ff7bd3b8aa31 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Switch network-service to default onAllan Sandfeld Jensen2020-01-304-11/+27
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79890 Task-number: QTBUG-81556 Task-number: QTBUG-81557 Task-number: QTBUG-81614 Change-Id: I4c81ca1b1fb9c9595c1f670706948fcbe65bcd33 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge branch '5.14' into 5.15Allan Sandfeld Jensen2020-01-233-28/+85
|\| | | | | | | Change-Id: I1230ec3a854c0798fa4f7960642e988b917f431e
| * Update navigation actions when load finishes in a subframePeter Varga2020-01-221-7/+26
| | | | | | | | | | | | | | Fixes: QTBUG-81521 Change-Id: I8ca82224cd834b667471d1e96a44430164d3669e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * FIXUP: Un-blacklist tst_qwebenginepage::fullScreenRequested() on WindowsTamas Zakor2020-01-221-20/+40
| | | | | | | | | | Change-Id: I3fc41f664bf79ff6379c943411f7d38d0b4fa962 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
| * Merge remote-tracking branch 'origin/5.14.1' into 5.14Allan Sandfeld Jensen2020-01-201-7/+8
| |\ | | | | | | | | | Change-Id: Ic2b5f2a3e6f5af56d92652e57c05a631481201b3
| * | Fix overriding shortcuts in password input fields on WindowsPeter Varga2020-01-151-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows IME does not support hidden text therefore IME input is disabled on password fields. The shortcuts are supposed to be overridden in input fields. Checking the keyboard focus on an input field is done by verifying if the IME is enabled. This won't work with password fields on platforms where hidden text is not supported, so also check if the Qt::ImhHiddenText IME hint is set. Fixes: QTBUG-81206 Change-Id: I81870beb556a9dda67295496dad8b672fbc5eba2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Fix conversion of tabpanel aria rolePeter Varga2020-01-151-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-78284 Change-Id: Ie3bf247752308fb104ab0f244736bd3a8d070762 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Fix deprecation warningsKirill Burtsev2020-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested changes: * endl -> Qt::endl * {} for default QFlags * QString -> QStringLiteral for QStringList::join * QNetworkReply::error -> networkError Change-Id: I03919ab0675a9beb64bd176e6c681a338b08b51e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.14.1' into 5.15"Michael Brüning2020-01-174-159/+218
|\ \ \
| * \ \ Merge remote-tracking branch 'origin/5.14.1' into 5.15Michael Brüning2020-01-174-159/+218
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I2f035e56cc23bdb600f93d601f0c1163ba32a1d5
| | * | Add qtry prefix to webenginepage testMichal Klocek2020-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We got one failure at previous integration. Change-Id: Ic229a66bde151ea6a6a1805e38eb8e2f6f337107 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | Merge 5.14 into 5.14.1Kari Oikarinen2020-01-151-0/+172
| | |\| | | | | | | | | | | | | Change-Id: Ibc671c7a5ac4b070f3406c41598d071fd978e420
| | | * Fix crash when handling QEvent::TouchCancelRomain Pokrzywka2020-01-091-0/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TouchCancel events have an empty touchPoints() list, which first trips when accessing touchPoints[0], and later on crashes Chromium if we pass the empty list to m_touchSelectionController. Rework handleTouchEvent() to route TouchCancel events like other touch events, and make sure we pass a non-empty touchpoints list to Chromium. Task-number: QTBUG-80893 Change-Id: Ie8396a1191f72b5bbb2b047f131794b37cfded48 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| | * | Rework url changed logicMichal Klocek2020-01-141-5/+6
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due security changes to prevent url spoofing, our implementation is getting extra invalidate url requests. Unfortunately, this breaks our url handling, which now gets lots of new back and fort url changed signals and make several unit test failures. After tedious investigation of Chromium omnibox handing and trying out different approaches, it seems that only sensible solution is to follow Chromium logic and make NavigationStateChanged to update 'ui' in asynchronous matter. This change tries not break any tests and simplify url handling. The only side effect of this change is that WebEnginePage::setContent will get extra 'url' signal of initial 'urlData' and later 'baseUrl' change is emitted. Fix one of qml tests which did not expect to have url on LoadStartedStatus. Task-number: QTBUG-63388 Task-number: QTBUG-48995 Change-Id: Id347f4325c036e16bfae7bf2f694905e0f21f8d7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Un-blacklist tst_qwebenginepage::fullScreenRequested() on WindowsTamas Zakor2019-12-182-151/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JavaScriptCallbackWatcher::wait() blocks the callback and it gets called after the wait() only. Replace JavaScriptCallbackWatcher() with QTRY_COMPARE() and QTRY_VERIFY(). These functions don't block the callback call. Remove JavaScriptCallback class from test. Also reimplement tst_qwebenginepage::runJavaScript auto test. Fixes: QTBUG-78015 Change-Id: I11e6f709c00a9121066c2554508c8312c1e33c12 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Fix Q(Quick)WebEngineDownloadItem::setDownloadDirectory()Tamas Zakor2019-12-181-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep the custom file name if the calling order of setDownloadDirectory() and setDownloadFileName() changes. Also do not emit patchChanged signal twice if setDownloadDirectory() changes the uniquifier of the file name. Add TempDir for qml auto tests what uses QTemporaryDir() to create temporary directory for downloads. See https://cgit.kde.org/messagelib.git/commit/?id=2c113dcb155b11bf2c0af3c85544962485784b26 for details. Fixes: QTBUG-80566 Change-Id: Ia76f263558eaf55cb297700407948523788c6229 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Fix QFlags warningsAllan Sandfeld Jensen2020-01-174-58/+58
|/ / | | | | | | | | Change-Id: I2938d5a44df01c7d9c70e18ecc293fc91079e5bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Make tst_origins quieterAllan Sandfeld Jensen2020-01-151-0/+22
| | | | | | | | | | | | | | | | Match many of the logged error messages to suppress them and test that they are emitted. Change-Id: Ia6e476f973fefdc4d044790000e550a782c55f9d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Allan Sandfeld Jensen2019-12-063-10/+59
|\| | | | | | | | | Fixes: QTBUG-80555 Change-Id: I4c7f69f697c09526f5f927948e6a6bf1c43fac17
| * Fix 'setDownloadDirectory' for download item on 'SavePage' actionKirill Burtsev2019-11-291-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium's DownloadManager doesn't create its download items before path for saving page is confirmed. So assert inside updateDownloadPath was not correct. Moreover, the name is confusing because it's not really updating anything. Remove it and use ProfileAdapterClient::DownloadInfo timestamp to determine updated filename after directory change. Ammends recent new api for changing download directory 0884fab3b1. Fixes: QTBUG-80372 Change-Id: If9efb52979deb3cf21fc4e12989173c85e04e090 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * Favicon touchIconWithSameURL test: fix waiting on wrong spyKirill Burtsev2019-11-281-2/+2
| | | | | | | | | | | | | | Amends fc0dbde734 timeouts adjust for slower CI Change-Id: I77bacfb973cfe8e2c259a31d58f439ffcae7b87f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| * Update find request id when a new search interrupts an ongoing searchPeter Varga2019-11-281-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the new test became flaky it might happen because the first text search finished before the second findText() call. This is very unlikely, but in this case the test should be modified to not to check if the first find failed. The point is to check we get the correct amount of signals and the second search doesn't assert. If the callbacks will be removed in Qt6, it should be re-considered to remove the "unfinished find" workaround and trigger the first successful findTextFinished() signal even if it happens in the middle of another search. Fixes: QTBUG-80086 Change-Id: I9c1ce20fc43fd81e8af784385a00ac2e7f7603b7 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
| * Fix renderProcessTerminated signalJüri Valdmann2019-11-281-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the adaptations for Chromium 76, RenderWidgetHostViewQt was changed to become a RenderProcessHostObserver with the renderProcessTerminated signal being emitted from the override of RenderProcessHostObserver::RenderProcessExited. The problem with this can be seen by setting a breakpoint on the RenderProcessGone override in RenderWidgetHostViewQt. We then get the trace: QtWebEngineCore::RenderWidgetHostViewQt::RenderProcessGone content::RenderWidgetHostImpl::RendererExited() content::RenderViewHostImpl::RenderProcessExited content::RenderProcessHostImpl::ProcessDied ProcessDied iterates over all the observers and calls RenderProcessExited. Both the RenderViewHostImpl and our RWHVQt are observers, but the RVHImpl comes first. The RVHImpl then calls RendererExited, which calls our RenderProcessGone, which does a 'delete this'. Now our RenderProcessExited override can never be called because we have already deleted our observer. Fix by moving the RenderProcessGone code to WebContentsDelegateQt and getting the exit code from WebContents::GetCrashedErrorCode. Also add test. Task-number: QTBUG-80085 Change-Id: I434744286df97a37b64722d7c15a1d4ee11c8af6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Switch navigationRequested to using NavigationThrottleAllan Sandfeld Jensen2019-11-281-33/+43
|/ | | | | | | | NavigationThrottle will work both with and with-out network-service, and simplifies our interception logic. Change-Id: Ie75ca739eab9b8751a7e8e65bb472cc8fc5f0598 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Store favicon URL when serializing QWebEngineHistoryDmitriy Kuminov2019-11-082-0/+9
| | | | | | | | | | | | | | This is to make QWebEngineHistoryItem::iconUrl of the deserialized QWebEngineHistory object return the same URL it had when serializing. Otherwise it's impossible to have favicons for URLs from the navigation history of a restored browser session until these URLs are visited again (so that Chromium refetches their favicons). These icons are usually needed much earlier - e.g. when showing a popup with the navigation history and having an icon URL allows to load it from a disk cache before visiting the page. Fixes: QTBUG-78998 Change-Id: Ief2d089d52f301826e5c131d401cafd08952a8b5 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add tst_QWebEnginePage::setHtmlWithModuleImportJüri Valdmann2019-11-081-0/+36
| | | | | | | | Try importing JS modules from a setHtml page. Fixes: QTBUG-77282 Change-Id: I925bd3239688117c380ed3ae404dcb9547d99cac Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Handle MSVC CI slowness in tst_originsAllan Sandfeld Jensen2019-11-071-1/+1
| | | | | | | | | | | | The test now reports it would succeed with a longer timeout on loading. This should be investigated later as the timeout is really out of line, or what should be acceptable. Task-number: QTBUG-79852 Fixes: QTBUG-79719 Change-Id: I60c1e6e0f7026b5ad61db2e22512dd45e1162e1c Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* More speculative fixes for MSVC 2019 CIv5.14.0-beta3Allan Sandfeld Jensen2019-11-063-23/+23
| | | | | | | | | Expand many more timeouts as loading basic test cases can now take many seconds. Task-number: QTBUG-79290 Change-Id: I749fe50525919b24a4a3fcba905745b6d6648121 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Deprecate QWebEngineDownloadItem path API properlyTamas Zakor2019-11-051-0/+4
| | | | | | | | Implements suggestion from 5.14 API review: - Replace QT_DEPRECATED with QT_DEPRECATED_SINCE and QT_DEPRECATED_VERSION_X Change-Id: I4d0bf8a2b535c44b5749cbd3bbab7e305bd137c6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>