summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix not working certificates on mac > 10.14Michal Klocek2021-05-264-89/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From macOS 10.15 onwards there are new security requirements for TLS server certificates: https://support.apple.com/en-us/HT210176 Now all certificates without required fields are reported as NET::ERR_CERT_INVALID and there is no way to 'bypass' this error. Our test expects ERR_CERT_AUTHORITY_INVALID value, for which browsers have an visual option to bypass. 'Fix' certificate by adding new required fields: * Subject Alternative Name * Extended Key Usage Generate a new certificate chain with two certificates, where the server certificate has the extension config file in the form of: [SAN] subjectAltName=DNS:webengine.qt.io extendedKeyUsage=serverAuth Use 2048 bit for private key, otherwise tests fail on ubuntu. Task-number: QTBUG-91230 Change-Id: I81d878cf3cae3e9fcc51bfbf250fba9185ca4b01 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 035579f424e5b69cee212d23fda3467f5db8d19e)
* Blacklist handleError on macos until we merge the fixAllan Sandfeld Jensen2021-05-201-0/+2
| | | | | | Task-number: QTBUG-91232 Change-Id: I4de316a35b235566b56d5fc6520347b5be4a0b7f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Load signals test: use focusProxy for link clicking testKirill Burtsev2021-05-171-2/+2
| | | | | | Fixes: QTBUG-93644 Change-Id: I3c5362eaf970146b5d3088bf41c4520794be6eb6 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Set enumaration root directory for File.webkitRelativePath APIBalazs Egedi2021-05-131-0/+15
| | | | | | Fixes: QTBUG-93304 Change-Id: If2f30aab1c6a6eb81cfbad51318ec31adf5e96b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix FilePickerController's path validation for windows and corresponding testsPeter Varga2021-05-121-3/+3
| | | | | Change-Id: If2445171232864cb4ac51888ccc93bc00cb099a2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove ResourceTypeSubFrame check after website updateKirill Burtsev2021-05-111-12/+0
| | | | | | | | | | There are no more sub frame resources under test url, so nothing to check for firstPartyUrl and initiator. Change-Id: I12ddf33ec2909d9a427a9819725d941960575612 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit a282c7a36f8707e0777df201855ef0a8a1980de1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid unknownFunc messages in qmltestsAllan Sandfeld Jensen2021-05-0721-22/+36
| | | | | | | | | It was caused by a nested unnamed TestCase, instead rely on the parent testCase being id'ed as testCase. Task-number: QTBUG-74447 Change-Id: I086155e230d0e71ce224a8aa4c669636fe0e0acd Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Blacklist CertificateError::test_error for macOSAllan Sandfeld Jensen2021-05-071-0/+2
| | | | | | | | It has failed before but wasn't run by the CI. Task-number: QTBUG-91230 Change-Id: I1f22ddad3bb563cc5c1a02b5bf537dc048954ff2 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Adapt to new Connections syntaxBalazs Egedi2021-05-061-5/+15
| | | | | | | Change-Id: Ieae71f6b1bad3fd4c4aeeec84112e7528e1af5de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f5e1fce9998a3eb1790ddb7c1440b47ab508fdfb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove tracking of frame which load error pageKirill Burtsev2021-05-061-1/+3
| | | | | | | | | | | | | | It was added to suppress progress notification for error page load after failure, but since error page load is reported as a new navigation (which clears list of tracked frames), it was actually doing the opposite thing. The only situation where it suppresses progress is when navigation was not finished (due to invalid domain or network error), but in this case it was real progress change for whole load which should propagate further. Change-Id: Ifd1d681fb5c6495fb3afdc4247364afb4472c959 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix inconsistent number of load signals and their orderKirill Burtsev2021-05-067-87/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | This change tries to match how chromium treats one single load. Before the pair of loadStarted/loadFinished methods for api classes was called on delegate's DidStartNavigation/DidFinishNavigation, which might be many within one single logical load. This is true for multiple usecases (like multiple redirects on load, immediate form submit on DOM load, page's subresource load, or just an error page load on failure). Tracking these methods and deciding when to emit signals based on states are error-prone and complicates logic for no benefits. Also it somewhat lies about when real load is done, which is only started and finished on outer methods DidStartLoading/DidStopLoading, which are conveniently called only once for all mentioned usecases. So, this change uses these methods to issue signals for load start/finish, and only makes exception for error page, which is needed for quick's private test support. Fixes: QTBUG-65223 Fixes: QTBUG-76802 Fixes: QTBUG-87089 Fixes: QTBUG-90342 Fixes: QTBUG-91773 Fixes: QTBUG-92063 Change-Id: I9cc99b639030fedd8cf6a9dc04d0869d6be6357d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Unblacklist and fix load signals test for file downloadKirill Burtsev2021-05-062-18/+7
| | | | | | | | | | | | Since it's a expected and valid behavior, and it's how chromium sees it. First, after link click, load to different document is started, then navigation is initiated, and only later it's resolved to download and aborted (hence load result is false) with page's state staying the same. Fixes: QTBUG-75185 Change-Id: I8b81ba00609649d9d0318f085ff1749a02a6e3cf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add more tests to tst_loadsignalsJüri Valdmann2021-05-069-33/+268
| | | | | | | | | | | | | | Add new cases for non-same-page navigations, for navigations triggered from the DOMContentLoaded event handler, for navigations triggered by user action (clicks), and for navigation rejected by the acceptNavigationRequest API. Drop the 'no more signals' waiting time from 10 to 1 seconds. Task-number: QTBUG-65223 Change-Id: Ic074eaf5aa58f779e31927296ae84d9e4faeaaae Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Remove obsolete loadSignals test secondLoadForError_WhenErrorPageEnabledKirill Burtsev2021-05-062-40/+0
| | | | | | | | | | Was added as is in 89bc70bf13, and was already blacklisted. Mostly duplicates logic of 'loadFinishedAfterNotFoundError' (which was added much earlier in aa8b11d3a5), but with a different expectations for the number of signals emitted. And that was never realized. Change-Id: I97bb539b936361089733dc6f26985c09c7bbc3d1 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Allow leaving OCSP offAllan Sandfeld Jensen2021-05-032-0/+3
| | | | | | | | | | This form of OCSP is not good, so try to at least allow it to be disabled, until we remove it. Fixes: QTBUG-91467 Change-Id: Ied9e8c4960e6ea1503dea39ebbced2ad1af08d5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Blacklist NewViewRequest::test_loadNewViewRequest on macOSAllan Sandfeld Jensen2021-04-292-1/+2
| | | | | | | Until we have time to investigate why it fails now. Change-Id: I3da35bc622e0691b4d1a1b5138c091ba490292c7 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* 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>
* Report server directs in navigation typeAllan Sandfeld Jensen2021-04-193-0/+42
| | | | | | | | | | | A server redirect might not have been reflected in the navigation type at this point, so also check the is_redirect value. Pick-to: 5.15.4 Fixes: QTBUG-92819 Change-Id: I711ef041de69552bc3485c9cf3db68c9e6033d6a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Fix first party url for cookie filterTamas Zakor2021-04-153-15/+31
| | | | | | | | | | Stop using SiteForCookies::RepresentativeUrl() if it is used to provide first party url because it returns a truncated URL and our API is expected to return the full url of the first party. Fixes: QTBUG-90231 Change-Id: I628f7f31bfbeaf3de976ae9af1a8fa6408b661c5 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Remove qquickwebengineprofile testMichal Klocek2021-04-122-74/+0
| | | | | | | This test is unused and incomplete. Change-Id: I53a4a1238a61a6da3db584fc560b2d40eba3ec36 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix qmltests::WebEngineViewNavigationHistory auto testsBalazs Egedi2021-04-091-2/+2
| | | | | | | | | | Delete loadProgress zero-check from the tests and clear the history instead. The zero-check was used to guarantee the empty history, but it will not pass if multiple tests are performed. Change-Id: I370a51b5631d8fab99209d6a81c8aedd12d5e4a4 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* 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>
* Notify canGoBack/canGoForward changes based on web actionsJüri Valdmann2021-03-222-1/+47
| | | | | | | | | | | | | | | Before, QQuickWebEngineView's canGoBack/canGoForward change signals are based on urlChanged. But the urlChanged signal may be emitted slightly before the value of canGoBack/canGoForwad actually changes, resulting in a missed change notification. After, they get their own signals, which are forwarded from the QQuickWebEngineAction::enabledChanged signal of the respective web actions. Fixes: QTBUG-91565 Change-Id: Id411eb146c776e2824fd2447660e8857974da32e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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>
* Fix normalization of app localesAllan Sandfeld Jensen2021-03-121-0/+24
| | | | | | | | | Use the internal Chromium routine to get the app locale Chromium expects. Fixes: QTBUG-91715 Change-Id: I5042eb066cb6879ad69628959912f2841867b4e8 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Blacklist numberOfStartedAndFinishedSignalsIsSame on b2q CIsAllan Sandfeld Jensen2021-03-041-0/+3
| | | | | | | Seems to be failing regularly now. Change-Id: I1bbeb2f5cb2b04608c7c75317f68bb4e75a59eb3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Update tst_QWebEngineView::webUIURLs auto testPeter Varga2021-02-101-6/+11
| | | | | | | | Remove URLs of removed WebUIs. Some removed URLs are just not for WebUI. Also add new ones that are available with Chromium 87. Change-Id: I2a749b5ff20621f2fc4cb168a2a40b571d79bdd0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add tracing UI resourcesPeter Varga2021-02-101-1/+1
| | | | | | | | | | | Also add third party python dependencies of tracing to the snapshot. Pulls in the following changes: a7c1c17e0b9 [Revert] Do not bundle the tracing UI resources 1711a9c9bf4 Enable build of tracing UI Change-Id: I0a6abfeb04cb66ae33b26b6353edad2aecf39365 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Enable webrtc logging and the corresponding WebUIPeter Varga2021-02-091-1/+1
| | | | | | | | | | | | | | | | | | The corresponding WebUI is chrome://webrtc-logs It only makes sense with the hangout services extension. It seems to be only useable with meet.google.com. The behavior is same for Chrome. Uploading logs to Google is disabled in the Chromium patch. It is an extension API functionality. The WebUI only lists the previously generated logs. Pulls in the following changes: 1dda5314b02 Enable webrtcLoggingPrivate extension API for hangout extension 7d71aca116d FIXUP: Enable webrtcLoggingPrivate extension API for hangout extension Change-Id: I455fce7c8081e71967e55ab1f889df6ef91ed253 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Resolve installed interceptors right before interception pointKirill Burtsev2021-02-082-3/+130
| | | | | | | | | | | | Ammends a05bb73747. Since request processing is asynchronous, resolve interceptors right before actual interception point to accommodate cases where interceptor on profile or page was replaced or uninstalled before all instantiated InterceptedRequest's are processed. Effectively, this doesn't send url requests to uninstalled interceptors. Fixes: QTBUG-86286 Change-Id: Iaf55e5ef99d62b55f7304ee68a0c89a1469fd86f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove frame metadata observer (RenderWidgetHostViewQt) on destroyKirill Burtsev2021-02-063-0/+27
| | | | | Change-Id: I9eac9537b60ba35a53e85c6437bb67b59bf0e35d Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix loadFinished signal if page has content but server sends HTTP errorPeter Varga2021-02-052-47/+106
| | | | | | | | | | | | | | For triggering an error page 3 conditions should be fulfilled: - main frame navigation - the page's document is empty - the HTTP status code indicates an error This fix adds check for the empty document and sends loadFinished signal without expecting an error page if the document is not empty. Fixes: QTBUG-90517 Change-Id: I6463d75fb5e682932feca64b0f059f9aa475795c Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Remove remains of chrome://flashPeter Varga2021-02-041-1/+0
| | | | | | | | It was removed in Chromium 73: https://chromium-review.googlesource.com/c/chromium/src/+/1373841 Change-Id: I3755f50d865b22f757714ab50add1bccf463421f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Enable chrome://user-actions WebUIPeter Varga2021-02-041-1/+1
| | | | | | | | Also record some actions in WebContentsAdapter. The list is far from complete but these seemed obvious. Change-Id: I7dcddeef416efd6fb26618381a83d2b132b98d83 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Do not extract download file names from certain url schemesMichael Brüning2021-01-221-0/+47
| | | | | | | | | | | | Chromium uses the default download file name if the scheme of a file to download is either about or data, as the file name extraction methods do not seems to work for those. Mimic this behavior in Qt WebEngine as well. Fixes: QTBUG-90355 Change-Id: I14b8c4f64559500d3f231dd26533a5947bf94bc3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Revert "Blacklist page's dev tools tests for msvc-2019"Kirill Burtsev2021-01-152-14/+8
| | | | | | | | | | | | | | This reverts commit 7af8aa79d76b31f5d881d62f8c8661117274734c. Reason for revert: appears to always BPASS on CI after tests for msvc2019 were enabled and 79-based integrated and only fail with timeout error, which really takes more than one minute for renderer process to initialize devtools, so increase also timeout for load. Fixes: QTBUG-81263 Change-Id: Ia07a62f2e0a6822edb9bb1fb86df1c9fe0536072 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Touch input test: detect and check scrolling on each inputKirill Burtsev2021-01-151-0/+8
| | | | | | | | | | Scrolling is momentum based and with smooth scrolling handling may lead to multiple scroll position offset changes for series of touch event. Moreover, it's not certain that offset position fetched through js after input is final position, so check it on each scrolling step. Change-Id: I793b9c237b024b5f68cdd5662a91d72b21bb64c4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix WebEngineViewJavaScriptDialogs qml auto tests after Chromium 87Peter Varga2021-01-131-0/+15
| | | | | | | | | | | | onbeforeunload event is fired when navigating to another page since: d51e7703e747 Remove InterstitialPage https://chromium-review.googlesource.com/c/chromium/src/+/2146137 Navigate away from pages with onbeforeunload handler at the end of the tests. Change-Id: I79b306620e202e1466a8125c8f8f60a7218b2969 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for Chromium 86Allan Sandfeld Jensen2021-01-132-4/+10
| | | | | Change-Id: I7e0ebecdbb68cfff0b574c966f3fa80d28680e1c Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add test for LocalContentCanAccessRemoteUrls settingKirill Burtsev2021-01-082-0/+29
| | | | | Change-Id: Ia360553626c0277c7ef703504c8a7a76ca792801 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Blacklist horizontalScrollbarTest on macOSMichael Brüning2021-01-061-0/+3
| | | | | | | | | The test seems to have gotten flakyon macOS recently. Blacklist it until the cause has been identified and fixed. Task-number: QTBUG-89627 Change-Id: Ib711a6ee468f4d4416de9f96a32ff3cab51a24fc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Suppress error pages also for http errors if they are disabledKirill Burtsev2021-01-061-2/+34
| | | | | | | | | | | | | | | | | Load with client or server http error results in successful navigation, which leads to 'true' loadFinished result, and subsequent chromium's error page load and display with second set of loadStarted/loadFinished signals. This effectively ignores QWebEngineSettings::ErrorPageEnabled. Fixing it requires submodule change to ask embedder if error pages should also be suppressed for http errors. Also update chromium for required change, which pulls in the following changes: * e71010069b4 Fix embedded builds with printing enabled * f5a93d251cc Allow the embedder to suppress an error page for http errors Change-Id: I731678575439a6dad90dfb89e79b0083c63b49c2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Migrate user script IPC to mojoMichal Klocek2020-12-111-0/+2
| | | | | | | | | | | | | | | Use mojo instead of old IPC, keep current design and use two interfaces one global and one per frame for now, also use in both cases associated interface with ipc channel otherwise script can be added during the page load, which will radomly brake tests. This change moves UserDataScript to chromium since mojo binding generation did not work correctly. Use StructTraits when serializing the class. Change-Id: I7073fb831c96849e47864382188300db3c9137d9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix building against Qt 5.14Allan Sandfeld Jensen2020-12-112-6/+28
| | | | | | | QString::SkipEmptyParts was replaced and deprecated in 5.15 not 5.14. Change-Id: I9585250b4d1781f87567aff957f8b35fb6015647 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Fix building against 5.12 on most CIsAllan Sandfeld Jensen2020-12-084-0/+14
| | | | | Change-Id: I4c4bbc75b9f6346a446f8094f669d142f76c164a Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Stabilize load signals emittingTamas Zakor2020-12-039-35/+187
| | | | | | | | | | | | | | | | | | | Make the WebContentsDelegateQt::EmitLoadStarted() and the WebContentsDelegateQt::EmitLoadFinished() independent from the WebContentsDelegateQt::LoadProgressChanged() by removing m_lastLoadProgress. Adapt the WebContentsDelegateQt::LoadProgressChanged() to send signal only if load is in progress. Add a new test based on the bugreport. Fix qmltests::WebEngineViewSource::test_viewSourceURL() flaky tests. Fixes: QTBUG-65223 Fixes: QTBUG-87089 Change-Id: I90af4d2e85105dba801beb8102991eb4ef14c6a3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix handling of more than one finger for touch eventKirill Burtsev2020-12-021-7/+56
| | | | | | | | | | | | | | | | | | | This change addresses following wrong assumptions implemented earlier: * fix assert condition for custom MotionEventQt: pointer index is only reserved only for two distinct events POINTER_UP and POINTER_DOWN, which represent one single non first/last pointer up and down event. * MotionEvent API doesn't support delivering multiple touch point changes at once, hence code should send every touch point's up/down step by step to not confuse gesture detection classes in chromimum (ultimately fixing arising asserts which old code was triggering before). * MotionEvent shouldn't contain more touch points then were already forwarded or reported released, hence every step should contain only part of all touch points received in handleTouchEvent. Fixes: QTBUG-86389 Change-Id: I62275dc295494f88a6e44f36fe72f5f8227e37d4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Set custom headers from QWebEngineUrlRequestInfo before triggering redirectKirill Burtsev2020-12-013-31/+67
| | | | | | Fixes: QTBUG-88861 Change-Id: I7091aca70aaf87edf0b1e67ec3fa705a59c8192c Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.15.2' into 5.15Allan Sandfeld Jensen2020-11-241-0/+9
|\ | | | | | | Change-Id: I516761e18c03c6cfd4d44a6ee176a2add9a5b022
| * Fix tst_QWebEngineView flaky IME testsTamas Zakor2020-10-291-0/+9
| | | | | | | | | | | | | | | | Add QTest::qWaitForWindowExposed() to make sure that the window is visible before the input event is sent. Change-Id: I72b02abaaf5970a1533f1d6f6dae59e47e891548 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>