summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Use OTR profile in tst_loadsignalsJüri Valdmann2020-09-301-4/+7
| | | | | | Task-number: QTBUG-65223 Change-Id: Ia8183759e23d93c5561fceb8d562b74add474b21 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Use less pointers in tst_loadsignalsJüri Valdmann2020-09-303-98/+74
| | | | | | | | | Make QWebEngineView a member of tst_LoadSignals. Also stop recreating it for every test. Task-number: QTBUG-65223 Change-Id: I2ed7c12559e56e23302813eb6f33c1e26a9d8748 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Fix downloadable.tar.gz issue in tst_loadsignalsJüri Valdmann2020-09-301-2/+2
| | | | | | | | No more downloadable.tar.gz in the downloads directory for every run... Task-number: QTBUG-65223 Change-Id: I010bfc7785afca537734298a1618cd7ce05d50cf Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Avoid to reject a certificate error twice in QuickPeter Varga2020-09-162-9/+46
| | | | | | | | Widget API already ignores these cases. This would cause a crash for fatal certificate errors after 83-based. Change-Id: I3e80bb12f023f22e330218a5b20f3e267bb237dc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Chromium 81-based adaptationsAllan Sandfeld Jensen2020-09-093-37/+65
| | | | | Change-Id: Ie422b327025da084bc8038c7a0aadee2db801f29 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Merge remote-tracking branch 'origin/5.15.1' into 5.15Allan Sandfeld Jensen2020-09-071-10/+27
|\ | | | | | | Change-Id: Ieb546ccd35db06e8ad6358b11e3139a839c9b4cf
| * Do not call deprecated profile interceptor on ui threadKirill Burtsev2020-09-011-10/+27
| | | | | | | | | | | | | | | | | | | | Otherwise unchanged intercepted request leads to second call in the same interceptor but on ui thread after io thread. Ammends a05bb73747. Fixes: QTBUG-86267 Change-Id: I4e7c662d24a58be5445f5c8b6d0bf3751f40cc05 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Expand FullScreenRequest testingKirill Burtsev2020-08-312-0/+90
| | | | | | | | | | | | | | Add qml test and check for widgets context menu item Change-Id: I96ad15dd28f4b6bd9a7af1ed7f8ca1fda568ac81 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Don't send duplicate load progress valuesKirill Burtsev2020-08-3112-18/+72
| | | | | | | | | | | | | | | | | | Suppress duplicated progress values coming from chromium. Verify this behavior reliably (and not only 0 and 100 value) by loading html with subresources with minor delay through test http server. Change-Id: Id034dda9012212d54d12fc95d5939ba301577c1c Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Make HttpServer to server resource from dirs for unhandled requestsKirill Burtsev2020-08-314-32/+31
| | | | | | | | | | Change-Id: I2e15dff77c8f18af60a565cb74558f57c3527db8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Simplify testing with HttpServerKirill Burtsev2020-08-318-61/+31
| | | | | | | | | | | | | | | | Since reply with 404 for unknown resources is a common pattern in tests, reply with it automatically for unhandled requests Change-Id: Ifd184cf474f1ec311c8654dfbacdd735e33d7c97 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Wait for favicon in tst_QWebEngineCookieStore::basicFilterOverHTTPJüri Valdmann2020-08-311-0/+3
| | | | | | | | | | | | | | | | Wait for favicon request, otherwise, since the profile is shared between tests, the request might happen during the next test. Change-Id: I065e54ff6af4985e493a8cea10084e67293a5f0e Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Ignore QQuickWebEngineNewViewRequest if it is unhandledTamas Zakor2020-08-251-27/+51
|/ | | | | | | | | | | | This is the case when the WebEngineNewViewRequest.openIn() is not called on newViewRequested(). For example, when opening the view source from context menu in quick minimal example. Fixes: QTBUG-85494 Change-Id: I7c1ae53684361de459b2f268e471904e632821b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Check for ssl when compling qml testsMichal Klocek2020-08-187-6/+294
| | | | | | | | | | Do not include certificate error qml test if no ssl. This change does some copy-paste but this will be handled in qt6. Change-Id: I8cc6d37074d78ca9f55333f479fb410ef927385d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add binary compatibility files for 5.15 for QtWebEngineMilla Pohjanheimo2020-08-173-0/+48232
| | | | | | | Binary compatibility files added. Change-Id: I71c208cf9cb5a79e410416ae769ec48c23a219cc Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Load page to inspect before testing inspectionAllan Sandfeld Jensen2020-08-132-6/+10
| | | | | | | | | Makes it more stable. Change-Id: I2b479330e66e9d87355b09ebb0f4c4064ef96963 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tamas Zakor <ztamas@inf.u-szeged.hu> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix incorrect doc for acceptNavigationRequest and add testJüri Valdmann2020-07-221-0/+29
| | | | | | | | | | | | | The function is called for all navigation requests. The original bug report was most likely due to the use relative links on a page without a base url, which indeed results in no call to acceptNavigationRequest being made. But this has nothing to do with local vs remote URLs, it's rather that relative links, which are relative to nothing, are not valid links and there thus cannot be any navigation request either. Task-number: QTBUG-48435 Change-Id: I08bd0c86d67bf1dd1d7662468321777254a7db0b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add the cookie filter to URL requestsAllan Sandfeld Jensen2020-07-153-1/+74
| | | | | | | | | | Submodule src/3rdparty c91f4d20..809e16e4: > Add cookie filter to URL requests cookie headers > Use audio-manager app-name for MPRIS Fixes: QTBUG-85526 Change-Id: Icab26cad3cea8e2ee021a3e589f41bf0543d64fa Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Replace qgetenv with qEnvironmentVariableAllan Sandfeld Jensen2020-06-301-1/+1
| | | | | | | | | This preserves unicode characters in the environment variable on Windows. Fixes: QTBUG-85054 Change-Id: I3352cc3db4ce8d7b9b352c1634e3239954780618 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Return valid path in Profile::GetPath() for incognito profilesAllan Sandfeld Jensen2020-06-291-2/+3
| | | | | | | | | | | | | Parts of Chromium depends on it for temporary directories it creates. This also changes the logic of depending on it being empty as indicating an in memory profile, so it required a bit of cleaning up. Note this does subtly change the return value of off-the-record profiles. Task-number: QTBUG-62957 Change-Id: Iec6e24556128c515fce27803171a766b8a9d92e3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add auto test for safe redirectTamas Zakor2020-06-101-0/+32
| | | | | | Task-number: QTBUG-84011 Change-Id: Ie1eef3bc850e99437bb02bea01e06a49029e0dc4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Extend tst_QWebEngineScript::matchQrcUrl with negative matchJüri Valdmann2020-05-294-11/+26
| | | | | Change-Id: Idee9e3742ea3cb949f786d0e55a2e2f8530c7b1e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix 'qmake -r' runMichal Klocek2020-05-291-7/+18
| | | | | | | Use current configure instead of qtHaveModule(). Change-Id: Ifc4500ff5eee4b997a0c02fb387d8918f88d06d1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix resource paths in faviconbrowser manual testPeter Varga2020-05-271-8/+8
| | | | | | | | It is necessary after e8284237 Enable most qmltests without testsupport Change-Id: Ib6668b852588b0a2afa911144a550b722db7f918 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Test: port qwebenginedownloaditem auto test to QRegularExpressionPeter Varga2020-05-271-2/+4
| | | | | | | | | Leftover from cffba828 Test: port tests to QRegularExpression Task-number: QTBUG-72596 Change-Id: I4009bc00f24b773539a674ad5f2ba0aad1cef04b Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* QML test case for certificate error handlingKirill Burtsev2020-05-265-2/+128
| | | | | Change-Id: I5609440666d41ea273f3be44fd860195750af4dd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add test for first party urls of service workerTamas Zakor2020-05-264-0/+109
| | | | | Change-Id: Ic26d982ef9695705a9f7c757b7d983824b31a070 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove leftover of tst_QWebEnginePage::inputFieldFocus auto testPeter Varga2020-05-251-14/+0
| | | | | | | | | | The test has been removed by: cfef4615 Delete QtWebKit tests from tst_qwebenginepage.cpp Pick-to: 5.15 Change-Id: I677772f00c99ae3b6e33a2d61c7135d4306d3674 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 0891ac9c05b96471a0858011ef4f84b353337d16)
* Fix crash on WebContentsDelegateQt::CloseContents()Peter Varga2020-05-251-0/+22
| | | | | | | | | | | | | | | | CloseContents() triggers a windowCloseRequested() signal. The handler of the signal might close the QWebEngineView and it would result the destruction of the WebContentsDelegateQt. Thus, any operation on WebContentsDelegateQt is not safe after a WebContentsAdapterClient::close() call. For example, calling QWebEngineView::close() on QWebEnginePage::windowCloseRequested() would result crash because it sets life cycle state to discarded which destructs web contents. Fixes: QTBUG-84355 Change-Id: I5da404bc9b1923cc19085ee899b550da49d1416b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix path validation in FilePickerController::accepted()Tamas Zakor2020-05-201-12/+28
| | | | | | | | | | | | | In some cases QUrl::toLocalFile() does wrong path conversion on Windows. Therefore we have to convert the file URL to absolute path in another way and use FilePath::IsAbsolute() for validating that. Also stabilize WebEngineViewSingleFileUpload tests. They didn't wait for html title change when the expected value was the same as the default title. Change-Id: Ica7798a299f9b28657afeeccccfba3fdecc515e2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Allow to set feature permission before first ever navigationKirill Burtsev2020-05-141-24/+42
| | | | | | | | | | | | | | | | Since PermissionManagerQt functions independent of webcontents initialization, permission installment may be done earlier (right after page base constructor). Practically, this allows to grant/deny permission before first ever navigation to avoid permission feature request from well-behaving web application. Unfortunately, this only applies to Web Notifications: there is a way to check without request: Notification.permission javascript static object. Other supported features lack similar mechanism: they operate through success/failure callbacks, which unconditionally invoke permission requests, and Page/View API doesn't automatically answer with remembered permissions. Task-number: QTBUG-83476 Change-Id: I63a3cbca25498d5026975073e125f2ab4f9ab2ad Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix setting WebEngineView.audioMuted before initializationJüri Valdmann2020-05-052-0/+64
| | | | | | Fixes: QTBUG-83732 Change-Id: Ie07a1ecf87b214436ab7cea07003ddd5aeaedda3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Document early feature reply for NotificationAllan Sandfeld Jensen2020-05-051-0/+13
| | | | | | | | | Make it easier to get right by normalizing the origin and test it. Task-number: QTBUG-83476 Change-Id: Ie4562e937cbcca5a1cf24e00d340a3ac2e9e2210 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Add cookie testcase to proxy testMichal Klocek2020-05-043-5/+55
| | | | | | Task-number: QTBUG-58121 Change-Id: I9953eaec9d4dd971a7f7fb3ed9a156bccffa05d5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15.0' into 5.15Allan Sandfeld Jensen2020-04-302-5/+163
|\ | | | | | | Change-Id: I916838caf8c981d5dac876631a6e510ed2ffbe0e
| * Restore behavior of OpenURLFromTab if createWindow returns thisJüri Valdmann2020-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using QSharedPointer's reference count to communicate adoption/non-adoption, change adoptNewWindow to return a adapter pointer, with null meaning non-adoption. Then change QWebEnginePage's implementation to reuse already existing adapters if possible, restoring previous behavior of OpenURLFromTab when createWindow returns this. Task-number: QTBUG-80596 Change-Id: I8ee7c31e4294aabd3207c504cba67d6171c66cb0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix crash if createWindow returns this for AddNewContentsJüri Valdmann2020-04-261-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a QWebEnginePage subclass where createWindow returns the this-pointer, we get a crash in WebContentsDelegateQt::AddNewContents because AddNewContents expects the adapter to be adopted already, but QWebEnginePage delays adoption. Revert 3855015600 by getting rid of the delayed adoption code path. It's not needed anymore with the delayed initialization of the WebContentsAdapter. Revert 8a4091c210 by forcing adoption of the adapter even when it doesn't have contents. This no longer results in a crash since OpenURLFromTab ensures that the adapter is initialized before use. However, it does result in a behavior change since return-this now consistently overrides the adapter, so, e.g. navigation history is now always cleared whereas previously it was only cleared by the AddNewContents code path. Fixed with new approach in next patch. Fixes: QTBUG-80596 Change-Id: I4d2230c1bffcf2d77fa59ded9be51da49a820474 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
| * Fix flaky profile tests due to HTTP disconnectsJüri Valdmann2020-04-261-5/+5
| | | | | | | | | | | | | | | | | | Resetting the network context can cause some (expected) disconnects, so return value of HttpServer::stop should be ignored. Fixes: QTBUG-83670 Change-Id: Ieb17b38c422f0cdaea5423d082fd04c22715cebe Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix missing QWebEnginePage::audioMutedChanged signalJüri Valdmann2020-04-293-12/+32
|/ | | | | Change-Id: Ie02da939a37575dd2b0a43440978748fd79874e4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move request interceptor to ui threadMichal Klocek2020-04-201-27/+96
| | | | | | | | | | | | | We use now network service avoid io-ui-io-ui hops, pipe proxying url loader factory directly to ui thread. This solves thread safty issues. Add deprecated request interceptor test cases. Task-number: QTBUG-83082 Task-number: QTBUG-82999 Change-Id: I38778cf1a70789c5e92e04c93d1c93e2cc4c765a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Stabilize widget auto tests which use evaluateJavaScriptSync()Peter Varga2020-04-091-3/+6
| | | | | | | | | | | | | | | | Interrupt the waiting on the event loop in CallbackSpy::waitForResult() to not block calls on the UI thread. It is necessary because RenderProcessHost creates channel for mojo communication on the UI thread. QWebEnginePage::runJavaScript() needs this channel because the JavaScript is executed in the render process. If evaluateJavaScriptSync() is called before the mentioned channel is created, the JavaScriptExecuteRequest mojo message might not be sent because the wait would block the thread. Change-Id: Ic5bb5a6fde02717cec49dcf9e458f2eaac09eacf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Test qquickwebengineview: remove unneeded blacklistingKirill Burtsev2020-04-091-3/+0
| | | | | | | | As the dependency 6420ad91d3 in declarative for the only present focusChild is integrated and test doesn't fail according to grafana. Change-Id: I0d8fbb966548687d3fb92ec123726f110f18d8d5 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Use SetBaseBackgroundColorOverride for setting background colorJüri Valdmann2020-04-091-0/+6
| | | | | | | | | | | | | The normal WebViewImpl::SetBaseBackgroundColor expects to be called only during certain lifecycle states, otherwise a DCHECK will be triggered. Whereas the *Override version forces a lifecycle update. Needs 3rdparty change to stop RenderWidgetHostViewBase::SetBaseBackgroundColor from clearing the override color when switching between opaque and transparent colors though. Change-Id: If4c1e22886d7ebc7d87ca880dd9c6a659855a931 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Enable most qmltests without testsupportAllan Sandfeld Jensen2020-04-0757-67/+313
| | | | | | | | | Move the qmltests that require testsupport to qmltests2, this enables us to run most of the tests on CI configurations that isn't developer- builds. Change-Id: Ie0ba060632b36cbd738d6ede512a6a5f35880ae3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 80Allan Sandfeld Jensen2020-04-072-10/+12
| | | | | Change-Id: Icaf68648cbc2c13a61fc3b208ff1e64ca36c90b6 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Fix flaky tst_QWebEngineProfile::clearDataFromCacheJüri Valdmann2020-04-031-0/+3
| | | | | | Fixes: QTBUG-82953 Change-Id: I7dfa916ea0ada00ce84a1e9e49de9eea1800a108 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Speculative fix for titleUpdate test caseMichal Klocek2020-04-022-1/+2
| | | | | | | | | | | | | | | | | | | | | | After tedious investigation the issue boils down to error prone synchronization of web engine settings. WebEngineSettings are synchronized between the browser process and the render process. Moreover in the browser process the sync message is send to the render with QTimer::singleShot, which can cause race conditions if for example QWebPage::setUrl was used meanwhile. This makes current settings not being picked up by the render process and results in 'titleUpdate' test case flaky. This happens due to the fact that ShouldDisplayErrorPageForFailedLoad in the render process frame view could have invalid value. Try to sync web engine settings on every adapter load, setContent or reload. Mark some flaky settings in tests. Fixes: QTBUG-83078 Change-Id: I5289472f146e104d5cb6c3b9b20b26d3dc42f4b1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge "Merge branch '5.14' into 5.15"v5.15.0-beta3Allan Sandfeld Jensen2020-03-312-8/+38
|\
| * Merge branch '5.14' into 5.15Allan Sandfeld Jensen2020-03-262-8/+38
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Idbc9d3b06c0052a721c974fbcbfa3164faaead14