summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginepage
Commit message (Collapse)AuthorAgeFilesLines
* Un-blacklist tst_QWebEnginePage combobox auto testsTamas Zakor2019-03-062-11/+27
| | | | | | | | | | | | | tst_QWebEnginePage::comboBoxPopupPositionAfterMove(): Fix moving view by changing coordinates according to the old view position instead of the screen position. tst_QWebEnginePage::comboBoxPopupPositionAfterChildMove(): Fix resizing spacer widget to change position of view properly. Task-number: QTBUG-55158 Change-Id: I62ebb06ee3f9dadd80888eae05d037e7129bcd69 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Emit QWebEnginePage::selectionChanged asynchronouslyJüri Valdmann2019-02-211-0/+23
| | | | | | | | | | Currently selectionChanged is emitted from a Chromium task, meaning our MessagePump is blocked and, even with a nested QEventLoop, it's not possible to for Chromium code to make any progress during the handling of this signal. Fixes: QTBUG-73876 Change-Id: I45135238cffa81fb0db74ddfd53037c7f1b94348 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Web Notifications APIKirill Burtsev2019-02-062-0/+98
| | | | | | | | | | | | | | Implements API for end-user notifications. Co-authored by Allan Sandfeld Jensen [ChangeLog][Profile] Support for Web Notifications API for end-user notifications through QWebEngineNotification Task-number: QTBUG-50995 Fixes: QTBUG-51191 Change-Id: Icebaaa05275a713e801f1f8ecdaaec725fa264c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add tst_QWebEnginePage::localStorageVisibilityJüri Valdmann2019-01-221-0/+36
| | | | | | | Based on the QtWebKit's testOptionalJSObjects. Change-Id: I3bbd7143dba06e90053841bc3f23e12774e0a3dd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.12' into devMichael Brüning2019-01-181-1/+2
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/net/network_delegate_qt.cpp src/core/profile_io_data_qt.cpp src/core/web_engine_context.h tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp Change-Id: Id98e3f52f548ceb5b68abd80aedd6ae59db72cc0
| * Fix tst_QWebEnginePage::dynamicFrameAllan Sandfeld Jensen2019-01-091-1/+2
| | | | | | | | | | | | | | | | Any error pages would overwrite the content of the iframe. Fixes: QTBUG-72883 Change-Id: I5f9e6a4c5af74e8ee1e1b6044b5a5f58d2bedbf1 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Test: port tests to QRegularExpressionSamuel Gaist2019-01-091-1/+0
| | | | | | | | | | | | | | | | | | This patch updates the tests to use QRegularExpression in place of QRegExp which is to be considered deprecated. Fixes: QTBUG-72596 Change-Id: Idebd9595b60d653974aa6ac49a75e2f90fea184f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Delete QtWebKit tests from tst_qwebenginepage.cppJüri Valdmann2018-11-261-1318/+0
|/ | | | | | | File is too big. Change-Id: I719be3d4d467712f17fd7c140fd68c416d1c8eb1 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Avoid chromium assert in desktop capture testsPeter Varga2018-10-171-0/+20
| | | | | | | | | The page need to be visible to use desktop capture. Task-number: QTBUG-71005 Change-Id: Icf19b68fb9132e528d206ac45245121beb31a1ac Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix QWebEnginePage emit zero loadProgress before loadStartedKirill Burtsev2018-09-241-2/+7
| | | | | | | | | | Restore expected behavior for QWebEnginePage loading progress. This was missing after queuing progress notification signals change. Add missing state transition to loadSignalsOrder test. Change-Id: Id1d94f8391b83decc8057c5108d2d19c38258965 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* General adaptations for Chromium 69Allan Sandfeld Jensen2018-09-221-0/+9
| | | | | Change-Id: Ifeaf0ee13213dc5a24d2f2b4655cf7f405cddef7 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-212-2/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.js examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc mkspecs/features/platform.prf src/3rdparty src/core/media_capture_devices_dispatcher.cpp src/core/net/url_request_context_getter_qt.cpp src/core/net/url_request_context_getter_qt.h src/core/web_contents_adapter.cpp Change-Id: I467133ba455b1f85f6bb61793794c31cb1094541
| * [Windows] Reblacklist flaky mouseMovementProperties auto testMichael Brüning2018-08-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Although the test should have been fixed by the change and did succeed during local tests and CI runs, it still fails on the CI. This prevents a merge to dev. Partially reverts commit: d62cb919722f0baad4d0826e566b9a63f7fc7488 Task-number: QTBUG-66527 Change-Id: I1571c918034d84bd969ca0d401d4cfb17a10fd68 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * MediaCaptureDevicesDispatcher: Disable getDefaultScreenId on X11Jüri Valdmann2018-08-081-0/+40
| | | | | | | | | | | | | | | | Not needed and triggers race condition. Task-number: QTBUG-69007 Change-Id: Id57ba527387e5dbe44a8dd6c5a49e7278403ce64 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| * Fix failing mouseMovementProperties auto test on Windows and macOSMichael Brüning2018-08-022-5/+1
| | | | | | | | | | | | | | | | | | | | The view did not get all the movement events if the mouse was moved onto the view after it had loaded the page. Fix this by placing the mouse onto the view before setting the html content. Task-number: QTBUG-66527 Change-Id: I6d6847d5215005fe9490250b5b4f0c01ce317c23 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Make WebChannel an optional featureMichal Klocek2018-08-091-1/+7
| | | | | | | | | | | | | | Add webengine-webchannel feature. Change-Id: I600572180f8169aafe79cf0408527cc087d9a007 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Move printing out of tst_qwebenginepageMichal Klocek2018-07-184-56/+0
| | | | | | | | | | Change-Id: Ida7ee0e4a31a1c19d7b2eaf572b6ff703cbab79d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Create WebContents with initially_hidden = trueJüri Valdmann2018-07-161-0/+5
| | | | | | | | | | | | | | Task-number: QTBUG-69360 Change-Id: Ia17ce79a8221aa339c72763a984bf1958935ef96 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-06-261-0/+10
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json src/3rdparty tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Id79ff6cf01c2db3a2044881ddcbf044abdf84936
| * Fix segfault in QWebEnginePage::triggerActionJüri Valdmann2018-05-301-0/+10
| | | | | | | | | | | | | | | | Calling triggerAction for a context-menu-specific action (like DownloadLinkToDisk), when no context menu exists, will crash. Change-Id: Ife647b7a7d8ab1a0d9dcb7d3566be130516e6e63 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Adaptations for Chromium 67Allan Sandfeld Jensen2018-06-261-0/+9
| | | | | | | | | | Change-Id: I13cedba56012f74651a044d6fa8f0957487bf3eb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Adaptations for Chromium 66Allan Sandfeld Jensen2018-06-261-7/+7
| | | | | | | | | | Change-Id: Iee88721a50036d4ef85a23dd1708d4fb84218708 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Make tests work on high-dpi screensKai Koehne2018-06-251-2/+2
| | | | | | | | | | | | Change-Id: I89c39ccf6fd383cad33639959a90b7592467edac Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-061-9/+14
| | | | | | | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Don't try to run user scripts if provisional load failedJüri Valdmann2018-06-053-0/+27
| | | | | | | | | | | | | | | | | | Fixes DCHECK in UserResourceController::DidFinishDocumentLoad. Task-number: QTBUG-68594 Change-Id: I67128e2144420e61f8bffe080fa16a828b8202ad Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Test runJavaScript without JavascriptEnabledJüri Valdmann2018-05-181-0/+16
|/ | | | | Change-Id: I5fef99d3674fe4dee43df79d740988853d144abd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix tst_QWebEnginePage::openLinkInDifferentProfileJüri Valdmann2018-05-151-0/+1
| | | | | Change-Id: I9468faccfc8d943302bb643a57b9f7d1eed8862a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-091-0/+28
|\ | | | | | | Change-Id: Id41b0b07a934994471df40de884e1231ee1c0e8e
| * Fix invalid site instance when switching browser contextsJüri Valdmann2018-04-301-0/+28
| | | | | | | | | | | | | | | | | | All pages in a site instance should belong to the same browser context, an invariant which is violated by our WebContentsDelegateQt::OpenURLFromTab. Task-number: QTBUG-67900 Change-Id: I754180bb96de07448ee3058210391f7856f4caeb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove hardcoded size from QWebEngineView::sizeHint()Szabolcs David2018-05-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 800x600 takes more space than expected when building a layout which contains QWebEngineView. Now this function does exactly the same as QWidget::sizeHint(). Add an auto test and update examples which were depending on this hardcoded size. Change-Id: I3b34b7d37cc99a8d6a49100d6c4b66b5b6a1c999 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Test of data-url with anchor and base URLAllan Sandfeld Jensen2018-04-201-0/+16
|/ | | | | Change-Id: Ib63727794a794c20b1ca372ab6457c2a8a141762 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add tst_QWebEnginePage::devToolsJüri Valdmann2018-04-171-0/+43
| | | | | | | Open devtools from autotest. Change-Id: I5e78d6259fdd29df5608b45292ee0a786d179e26 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Shorten names of permission classesJüri Valdmann2018-04-131-8/+8
| | | | | | | | | | | Remove 'permission' from class and signal names, so e.g. QWebEngineQuotaPermissionRequest becomes QWebEngineQuotaRequest and quotaPermissionRequested becomes quotaRequested. Rename the internal controller classes to public name + "Controller". Change-Id: I247714ab0a2880adbf4ed8ee68f1b78838ae7a14 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Avoid creating temporary blank WebContentsJüri Valdmann2018-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | - Avoid creating a blank WebContents for new QWebEnginePages only to replace it with a different blank WebContents moments later. This problem is already solved in QQuickWebEngineView by lazy initialization, therefore the patch moves this lazy initialization into WebContentsAdapter itself so that it can be applied to both QQuickWebEngineView and QWebEnginePage. - Try to delay WebContents creation until the first navigation so that we have enough information available to pick the right initial SiteInstance when calling WebContents::Create. This is done by triggering WebContents creation from the first call to a WebContentsAdapter::load* method. - Use the SiteInstance from WebContentsDelegate::OpenURLFromTab. This method gets a SiteInstance pointer which we should give to WebContents::Create. Task-number: QTBUG-65561 Task-number: QTBUG-67163 Change-Id: Id7b351998adefb810cf27c61a1447b61d7f4c606 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Stabilize tst_qwebenginedownloadsJüri Valdmann2018-04-031-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The waitForRequest/waitForSignal function used by these tests is broken: it assumes that calling QEventLoop::exit() will immediately exit from the event loop. In actuality this is not immediate and the event loop may continue to execute more signals handlers even after exit() has been called. This means that in e.g. waitForRequest the 'result' variable may be assigned to twice. Additionally there is a race condition in downloadTwoLinks, where we sometimes skip the first download. This is not a bug but simply one pending navigation being aborted in favor of another. Changes - Delete waitForRequest. Define one HTTP request handler per test, using state variables to communicate with the main body of the test. Ignore unknown requests (including favicon requests). Same for downloadRequested signals. - Expand downloadTwoLinks and fix expectations. - Add logging to HTTPServer. - Unblacklist. Task-number: QTBUG-66888 Change-Id: I718cac6c4b32a8cc68400fa8ee5b853686c77fcb Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Unskip loadInSignalHandlers testMichal Klocek2018-03-181-13/+7
| | | | | | | | Remove testing of provisionalLoad, use QTRY_COMPARE(spy.count()) instead of spy.wait() to determine number of actual calls. Change-Id: I37cbca8f27d4e12d42c7b30b8362249c1f76c79e Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Remove credentials from view-source URLsPeter Varga2018-03-141-0/+34
| | | | | | Task-number: QTBUG-65997 Change-Id: Icb55326c51f1dfff77e8e862e9ced619be17ead1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rename protocol() to scheme() in QWERPHPermissionRequestJüri Valdmann2018-03-081-3/+3
| | | | | | | | | Scheme refers to a part of a URL. Protocol refers to a formal standard for communication over a network. Therefore scheme is more accurate here, since registerProtocolHandler only defines simple aliases. Change-Id: I71a1511aa92e41c3e3aca4c0403f54af6d91c563 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Blacklist mouseMovementProperties test on WindowsAlexandru Croitor2018-02-221-0/+1
| | | | | | Task-number: QTBUG-66527 Change-Id: I2d2c427d5a2e07247222772772ba265e0a153b85 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Expose actual URL for data URLs instead of the virtual URL in the APIPeter Varga2018-02-211-0/+18
| | | | | | | | | | | Chromium considers the actual URL as "scary" therefore prefers to pass a simpler URL via the WebContents::GetVisibleURL() content API function. For data URLs, use the actual URL instead to keep their anchor information. Task-number: QTBUG-64972 Change-Id: I74db3e5dd22a728656a58e50a4e3fba93b82dae2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add support for registerProtocolHandlerJüri Valdmann2018-02-132-0/+66
| | | | | | | | | | | | | | | | | | | Extend initialization of URLRequestContextGetterQt to create a content::ProtocolHandlerRegistry for each content::BrowserContext and add the registry's URL request interceptor to the front of the interceptor chain. Implement methods in WebContentsDelegateQt to add/remove protocol handlers to/from the ProtocolHandlerRegistry. Add permission request signal and classes for core, quick and widgets. Add widgets autotest. Add signal handlers to quicknanobrowser and simplebrowser. Task-number: QTBUG-62783 Change-Id: I808e7eb9a1cb4d7216686deed4895de14fe46310 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2018-02-021-423/+42
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/download_manager_delegate_qt.cpp src/core/download_manager_delegate_qt.h src/core/render_widget_host_view_qt.cpp src/core/web_contents_adapter.cpp src/webengine/api/qquickwebengineview.cpp tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp Change-Id: I2308414ce257ae5bb0fc9f6493aa111a267ff39b
| * Rewrite and activate multiplePageGroupsAndLocalStorageAllan Sandfeld Jensen2018-01-251-42/+39
| | | | | | | | | | | | | | Convert it to QtWebEngine. Change-Id: I7a453cd7544a20a9c461c3bb29b3a2fb78016d44 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Remove test relying on WebKit internalsAllan Sandfeld Jensen2018-01-241-15/+0
| | | | | | | | | | | | | | This test makes little sense for QtWebEngine Change-Id: I0177fb59ea23383a3c8135853f7e62b26ce5708a Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Remove dead tests we will not be reusingAllan Sandfeld Jensen2018-01-241-360/+0
| | | | | | | | | | | | | | We have no plans of implement QtWebKit still plugins. Change-Id: I9f7bb94cc240e2f0eda8c85c03fa5860435d52a3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Re-enable setUrltoEmpty and setUrlHistory testsAllan Sandfeld Jensen2018-01-231-7/+4
| | | | | | | | | | | | | | Have been skipped for years but appears to work. Change-Id: I461459b64fe3731b2fb50a3cc9c9d4ab75b135d4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Test adaptations for Chromium 63Allan Sandfeld Jensen2018-01-251-24/+21
| | | | | | | | | | Change-Id: I19bf693fb3916a78f4a199e6e095ca58b8fdfa27 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Adaptations for Chromium 62Allan Sandfeld Jensen2018-01-251-5/+2
| | | | | | | | | | Change-Id: I49cd3c419d4dd1180144c3c07bdd9a628ab73caa Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Fix tst_QWebEnginePage::setUrlToBadDomainAllan Sandfeld Jensen2018-01-221-2/+2
| | | | | | | | | | Change-Id: I54e7633fdfd1f3a4574373e0469c3df733dd32a4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2018-01-171-0/+19
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/webengine/api/qquickwebengineview_p_p.h src/webenginewidgets/api/qwebenginepage_p.h tests/auto/quick/qmltests/data/TestWebEngineView.qml Change-Id: Id2acc92e8d0364bdaaf5a63ea2d2cb9cd533ade3