summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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
| | * Merge remote-tracking branch 'origin/5.14.2' into 5.14Allan Sandfeld Jensen2020-03-251-0/+38
| | |\ | | | | | | | | | | | | Change-Id: I5f7aab6031f1c1ca289d5ba408d408684849031c
| | | * Merge 5.14 into 5.14.2Kari Oikarinen2020-03-103-21/+18
| | | |\ | | | | | | | | | | | | | | | Change-Id: I50afabc6022fea5b3db2a7dcb8659b654573661f
| | | * | Fix applying background color on RenderViewPeter Varga2020-03-101-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RenderViewObserverQt_SetBackgroundColor message was sent with wrong Routing ID. This fix also cleans up RenderWidgetHostViewQt::UpdateBackgroundColor() method. Fixes: QTBUG-81781 Change-Id: Ida198fb061715d389859ace17e1f773db491c51d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| | * | | Revert "Blacklist several Qt WebEngine quick dialog tests on macOS 10.13"Kirill Burtsev2020-03-131-8/+0
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d4022e03ccaeb92e41075f276e4011bd49627165 and partially fb430b4e104dd6313a776980b4798f1333193149. Reason for revert: initial blacklisting was done because of wrong assumption for test being flaky. But this is not the case. There is a non-zero chance that invalid build for macOS will be generated due to some undiscovered issue in build configuration or CI. Produced binaries are invalid and can't be used. If this first testcase fails then the whole suite will fail for every test. Blacklisting only moves failure further: first time from contextMenuRequested to javaScriptDialogRequested and etc, and second time to next test in whole suite tst_InspectorServer::testPageList. This creates a lot of really invalid failure entries in grafana testresults aggregator. It also creates confusion for the reason behind these kind of test failures and invalid bug report for other test failures. Task-number: QTBUG-76549 Change-Id: I1dfe850f6a9cabec352c6e2bd5471e7c4f2e99ca Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | / | Fix changeUseForGlobalCertificateVerification test flakinessJüri Valdmann2020-03-261-1/+2
|/ / / | | | | | | | | | | | | Change-Id: I80c99deb95c06191c4e872e45c56dff0c6c26001 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | | Enum class QPdfPageRenderer::RenderModev5.15.0-beta2Allan Sandfeld Jensen2020-03-161-4/+4
| | | | | | | | | | | | | | | | | | | | | Avoid having the enum name in the enum values. Change-Id: Ida5b3405e6922eb1a2a37edc6fb650019254f4d4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Add support for qrc proxy pac fileMichal Klocek2020-03-135-12/+31
| | | | | | | | | | | | | | | Change-Id: Ic4b70d31c85a31a434644c311eb173cda6a82fbd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Update accessibility roles and test after 79-basedPeter Varga2020-03-081-124/+183
| | | | | | | | | | | | | | | Change-Id: I23bd548db07c6332170e9d304977e5974c7f049f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Allan Sandfeld Jensen2020-03-043-22/+18
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.14' into 5.15Allan Sandfeld Jensen2020-03-033-22/+18
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickwebengineview/BLACKLIST Change-Id: I365daa73d2eb422ac916c32b86c5ad0d3c32086d
| | * | Stabilize tst_QQuickWebEngineView::transparentWebEngineViewsJüri Valdmann2020-02-282-19/+14
| | | | | | | | | | | | | | | | | | | | Change-Id: I847a1750ce5c9533db43fb60f91b9739c544791a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | Stabilize tst_QWebEnginePage::localStorageVisibility()Kirill Burtsev2020-02-281-2/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | Toggling page's setting is actually first batched and then executed asynchronously by timer. So javascript code might not necessarily see this update immediately after change on UI thread. Change-Id: I1a1f373b5fd0b96c5b937a2dca1ce0ed99364c33 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | 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>