summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Update dependenciesMichal Klocek2020-09-161-2/+2
| | | | | Change-Id: I02d43e9894466844f53bee36246773c1c218ba78 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-1413-143/+111
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/certificate_error_controller.cpp src/core/certificate_error_controller.h src/core/compositor/compositor.cpp src/core/compositor/compositor.h src/core/compositor/display_gl_output_surface.cpp src/core/content_browser_client_qt.cpp src/core/core_chromium.pri src/core/delegated_frame_host_client_qt.cpp src/core/ozone/gl_share_context_qt.h src/core/ozone/surface_factory_qt.cpp src/core/permission_manager_qt.cpp src/core/render_widget_host_view_qt.cpp src/core/render_widget_host_view_qt.h src/core/web_engine_context.cpp src/core/web_engine_settings.cpp src/core/web_event_factory.cpp tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp Change-Id: Ice14c3c350b139e800c7c7011b7cef1fc7010669
| * Chromium 81-based adaptationsAllan Sandfeld Jensen2020-09-092-36/+64
| | | | | | | | | | Change-Id: Ie422b327025da084bc8038c7a0aadee2db801f29 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * Expand FullScreenRequest testingKirill Burtsev2020-08-311-0/+8
| | | | | | | | | | | | | | 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-318-60/+19
| | | | | | | | | | | | | | | | | | 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>
| * Simplify testing with HttpServerKirill Burtsev2020-08-313-49/+21
| | | | | | | | | | | | | | | | 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>
* | Move qwebenginesettings to coreMichal Klocek2020-09-022-2/+3
| | | | | | | | | | | | | | | | | | Just moves qwebenginesettings to core. [ChangeLog] QWebEngineSettings is moved to QtWebEngieCore Change-Id: I7f623bce98213669a4b844f3377aa13e7f3dbd96 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Remove default qwebenginesettings getterMichal Klocek2020-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | Remove defaultSettings() from qwebenginesettings and drop dependency on qwebenigineprofile in qwebenginesettings, let's see if we can also get rid of default profile later. Remove deprecated method globalSettings(). Change-Id: Ibccca50af237ed6a3dd32137d34f8e7e0e7357f3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Blacklist javascriptClipboard test on ubuntu 20.04Michal Klocek2020-08-281-0/+2
| | | | | | | | | | | | | | This does not pass after ci upgrade. Change-Id: I84f1da1b954ce151491f4cd022f731995c160206 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Improve QWebEngineCertificateError apiMichal Klocek2020-08-281-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove const ref from QWebEngineCertificateError Q_GADGET is a value type, QWebEngineCertificateError is pass as const reference from api. This is not so useful since, in qml this will be anyway copied and for c++ this is not useful since reject, ignore, defer methods are all const. Therefore simply pass it by value. * make consistent naming defer(), acceptCertificate(), rejectCertificate() * remove properties 'differed', 'answered' which are use internally, user knows if he calls functions. * error.errorDescription -> error.description() * error.error() -> error.type() [ChangeLog] In QWebEngineCertificateError use acceptCertificate() instead of ignoreCertificiateError() Change-Id: I9ffa500a0a455d98445b066252dd283872740731 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Rename QWebEngineDownloadItem -> QWebEngineDownloadRequestMichal Klocek2020-08-186-113/+113
| | | | | | | | | | | | | | | | | | | | This fits better with other QWebEngine*Requests. [ChangeLog] QWebEngineDownloadItem is now QWebEngineDownloadRequest, also in qml. Change-Id: I506e9fac746b4f23ac0936c2fbe1c7472f4fda36 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Remove obsolete, deprecated api from qwebenginedownloaditemMichal Klocek2020-08-182-153/+3
| | | | | | | | | | | | | | | | | | | | This patch removes: * path() * type() * DownloadType enum Change-Id: I3e29f9e8ce9e39b015c57cb7005e0290d1496291 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Move QWebEngineDownloadItem to QtWebEngineCoreMichal Klocek2020-08-173-14/+14
| | | | | | | | | | | | | | | | Use QWebEngineDownloadItem class in qml instead of QQuickWebEngineDonloadItem. Change-Id: I0fc9595f8675c9b082be873adead6de3df1e669d Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Unify certificate error handlingMichal Klocek2020-08-141-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | Before we move the certificate error to core, unify error handling between qml and widgets. [ChangeLog] WebPage::certificateError does not return bool it is enough to call defer, ignoreCertificateError() or rejectCertificate(). Change-Id: I14be40f1ab6b4cbded550260d66152f51cf47de2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge all webenginecontextmenudata wrappers into one classMichal Klocek2020-08-121-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new class qwebenginecontextmenurequest in core which merges: * qquickwebenginecontextmenurequest * qwebenginecontextmenudata * implictly shared webenginecontextdata Unfortunately new class has to be QObject, since we want to reuse it qml. Q_GADGET can be used only as a value type, however we need to know if request is accepted or not in qml, therefore it must be passed as pointer. Since we use QObject now, class is no longer implicitly shared, however we only allocate request once and reuse the object for every new request (it is still copied in qml just to keep it aligned with other request handlers) [ChangleLog] QWebEngineContextMenuRequest is replacement for QWebEngineContextMenuData Change-Id: Ib387ec2065361a4bacc20675ca7352ab75a0e436 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Move QMenu handling from page to viewMichal Klocek2020-08-121-1/+1
| | | | | | | | | | | | | | | | [ChangeLog] createStandardContextMenu is moved from QWebEnginePage to QWebEngineView Change-Id: I08a7a1f7e55ca7396547006523cdec250a3ad117 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devMichael Brüning2020-07-243-3/+33
|\| | | | | | | | | | | | | | | | | Conflicts: src/core/compositor/delegated_frame_node.cpp src/core/core_chromium.pri src/core/render_widget_host_view_qt.cpp Change-Id: I9387151e9647c87fc387095e7b6d8d66560cdf71
| * 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>
| * 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>
* | Use QList instead of QVectorJarek Kobus2020-07-157-20/+20
| | | | | | | | | | | | Task-number: QTBUG-84469 Change-Id: I666a060351f73783e15e3f96884c9393a5cd7e46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adapt to newer dependenciesAllan Sandfeld Jensen2020-07-064-12/+22
| | | | | | | | | | | | Change-Id: I495880f56fbc10d8f332f26101f8a25c2a1c5631 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Do not run offscreen test on macOSAllan Sandfeld Jensen2020-07-061-1/+1
| | | | | | | | | | | | | | Offscreen platform only supports OpenGL on Linux. Change-Id: Ibb13c741e9cb7de2baffd7a33bb812bce37d1c36 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-06-295-11/+58
|\| | | | | | | | | | | | | Conflicts: src/src.pro Change-Id: I03c260ba676296f93d8137e79b46f3978f5f41ef
| * 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>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-05-282-26/+68
|\| | | | | | | Change-Id: I40d9ae90a4ea82c6242f5d0a1665af3856ad2f0b
| * 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>
| * 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>
| * 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>
* | Remove leftover of tst_QWebEnginePage::inputFieldFocus auto testPeter Varga2020-05-201-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>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-05-156-22/+263
|\| | | | | | | | | | | | | Conflicts: src/pdf/quick/qquickpdfselection_p.h Change-Id: I6eec37a01347c2d47cbfc1114326dfc6b58719ff
| * 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>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-04-2710-27/+99
|\| | | | | | | | | | | | | | | Conflicts: configure.pri src/pdf/api/qpdfpagerenderer.h Change-Id: I7e68277080e29238bbfe8511539ea75b2db89489
| * 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>
| * 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>
| * Adaptations for Chromium 80Allan Sandfeld Jensen2020-04-071-10/+11
| | | | | | | | | | 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-311-0/+38
| |\
| | * Merge branch '5.14' into 5.15Allan Sandfeld Jensen2020-03-261-0/+38
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Idbc9d3b06c0052a721c974fbcbfa3164faaead14
| | | * Merge 5.14 into 5.14.2Kari Oikarinen2020-03-101-2/+4
| | | |\ | | | | | | | | | | | | | | | 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>