summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove download properly on profile destruction to avoid use after freeKirill Burtsev2019-02-191-0/+32
| | | | | | | | | | | | | In the Widgets API, download items are children of the profile and are destroyed when the parent profile destroys its children. The download item's destructor can therefore not access the profile, as it would cause a heap-use-after-free crashes. On quick side turn ongoing downloads cleanup to match widgets one. Fixes: QTBUG-73839 Change-Id: Iabb379e91187e3e68ebcd4693fec35883b72b1f2 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Update public QML API test and enforce failure checkKirill Burtsev2019-02-191-6/+40
| | | | | Change-Id: Ie6dd101b15ac5bd7b6d60b61922b5db688aff785 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* tst_origins: Don't create SharedWorkers from unregistered schemeJüri Valdmann2019-02-051-4/+1
| | | | | | | | | | | | | | | Triggers DCHECK in content::SharedWorkerInstance::Matches on CI. According to the DCHECK, SharedWorkers cannot be constructed from unique origins (worker and constructor page need to be same-origin and unique origins are never same-origin with anything). In release builds the construction will just fail as expected. The DCHECK is only triggered if at least one other active SharedWorker already exists in the same storage partition. The reason it only happens on CI might be that the previous renderer process is not torn down fast enough and the previous SharedWorker remains active. Change-Id: I0906e1b5c85587df67b768ef022386d599ce9541 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-02-012-0/+39
|\ | | | | | | Change-Id: I4315127d8a329bcb65e6853d4f3625b6dbc55560
| * Fix hide/show of delegate widgetMichal Klocek2019-01-091-0/+23
| | | | | | | | | | | | | | | | | | | | For QQuickWidget::show does not work correctly if widget was not hidden. Fixes: QTBUG-72299 Change-Id: I12fba8c18cbf3f847d30de8b057a50e6d9917fde Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Fix recreation of cookie store and channel id serviceMichal Klocek2019-01-091-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As more things gets mojofy and become services, we can not simply delete parts of storage context. Therefore regenerate whole storage in case of cookie store, cache, agent settings updates. URLRequestContextStorage guards correct order of destruction. This change aims to fix some crashes during cookie store and http cache recreation when ChannelIDService gets deleted. Depending on timing this ends with different stacktraces like in cookie store manager or during ssl handshake. We still keep network delegate outside of storage context to prevent crashes when url requests end their life due to (forced) request cancellation in cancelAllUrlRequests(). Please note this is just band-aid patch, and introduction of 'profile builder' will be a proper fix. Fixes: QTBUG-71895 Change-Id: If33a7af3ebba2632ea33f32d913e1c21a4534817 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Answer permission checks for clipboard permissionsSzabolcs David2019-01-301-0/+33
| | | | | | | | | | | | | | | | Wire page settings into clipboard permissions and add some auto test. Task-number: QTBUG-72714 Change-Id: If921c65cdff7f55a48340d90fc593071febc6ebe Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove download items internally when API objects are deletedAllan Sandfeld Jensen2019-01-213-6/+49
| | | | | | | | | | | | | | | | | | | | We were never removing internal download item. [ChangeLog][Behavioral Changes] Deleting a download item will now also cancel it if it is still in progress. Change-Id: I2fab497d7acf7ca6ca17f4a61e106b1c18bfb333 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix building testsAllan Sandfeld Jensen2019-01-161-2/+2
| | | | | | | | | | | | | | Like the quick version, this also can't be const, as they are assigned. Change-Id: Icdbf3d62b9da1e824da719c96f3be480cc748005 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | 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>
* Fix building with clangAllan Sandfeld Jensen2019-01-041-2/+2
| | | | | | | | We are doing an assign later, so the properties can't be const, or the default assign operator is automatically deleted. Change-Id: I4ddb46cbde9098ad5c3aa72687c3107da9485a96 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix QWebEngineUrlRequestInfo::firstPartyUrl() after 69-basedTamas Zakor2019-01-0318-18/+323
| | | | | | | | | | | | | | The issue was introduced by this Chromium change: https://chromium-review.googlesource.com/c/chromium/src/+/1025772/ Add new auto tests for first party url. Depends on Chromium change: d2f5d6869f Add net::URLRequest::first_party_url() Task-number: QTBUG-70790 Change-Id: Ib43bde69990e7fb1d495cc32ac2f6860a613f185 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Disable external text handles and edit menuPeter Varga2018-12-082-2/+2
| | | | | | | | | | | Chromium implements its own ones and we don't want to conflict with them. This disables the QtVirtualKeyboard's selection handle what is not functional with QtWebEngine. Task-number: QTBUG-59999 Change-Id: I6a615a04d5eac1ce2d0392d63ba0fc9039583914 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Disable text prediction for inputPeter Varga2018-12-072-2/+2
| | | | | | | | | | This is a workaround to avoid issues with QtVirtualKeyboard when used with QtWebEngine. Task-number: QTBUG-70158 Task-number: QTBUG-71995 Change-Id: I1e6fcd4dceb131dbe781dd7ab3856cb154ac6a18 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Blacklist failing tst_QQuickWebEngineView tests in openSUSE 15.0Tony Sarajärvi2018-12-042-4/+5
| | | | | | | | This time we blacklist in the right directory Task-number: QTBUG-71461 Change-Id: If60b128f485b6d1810d759c44275555a5a422525 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix input method updatePeter Varga2018-11-292-0/+373
| | | | | | | | | | | | Do the update after the input properties are changed in RenderWidgetHostViewQt. Moreover, always update on input state changes, like cursor position, surrounding text and text selection (see QInputMethod::update() docs). Task-number: QTBUG-70158 Task-number: QTBUG-71995 Change-Id: I9d5c6e299826fbe66f5285b648013ef79aabed9b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix IME with negative start positionPeter Varga2018-11-221-0/+42
| | | | | Change-Id: I64a39975788cc40c5e0595c1a0c5db9000889bfd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Test-case for closing opener tabAllan Sandfeld Jensen2018-11-161-0/+37
| | | | | Change-Id: Ib8b19335148ff71fa8817ce3d9a5d2af2fb9916e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix typos in html testsTamas Zakor2018-11-145-5/+8
| | | | | Change-Id: I578595a1efa5e9a560b98e7a0a138621fdd04245 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix building tst_printing against libc++Jüri Valdmann2018-11-071-2/+2
| | | | | | | Linking fails if system poppler-cpp is built against libstdc++. Change-Id: I5c46cb56770abe3ed6c2bfa461ee08d32f476f16 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Blacklist failing tst_QQuickWebEngineView tests in openSUSE 15.0Tony Sarajärvi2018-10-291-0/+4
| | | | | | Task-number: QTBUG-71461 Change-Id: I837cf81c1685ad210a17a8d548c4f6e439e181d6 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Test world-ids over 11Allan Sandfeld Jensen2018-10-231-3/+14
| | | | | | | Add a test that we can have larger world ids. Change-Id: Ibc8a0eb5e6f56aa41183adb3726b2c3141197c84 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Allan Sandfeld Jensen2018-10-226-0/+257
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.json src/3rdparty src/core/content_browser_client_qt.cpp src/core/content_browser_client_qt.h src/core/login_delegate_qt.cpp src/core/login_delegate_qt.h src/core/net/url_request_context_getter_qt.cpp src/core/net/url_request_context_getter_qt.h src/core/qtwebengine.gni 3rdparty changes: 616a7f558c7e This is expected for us, so don't report it as an error. c30febceaa1b Do not write <protocol>.json to source directory 9e68e4f2d92c Remove incomplete logic to detect AMD K2 CPU's e0ed41c8e90a FIXUP: This is expected for us, so don't report it as an error. f9fd9109b4b7 Fix --single-process --disable-gpu combination not to hit asserts f305d65cc27e Reduce severity level of messages when kDisableGpu switch is used 5e3e5074bb78 Work around MSVC2017 optimizer bug when printing a page usind Pdfium 34f52ec3bae8 Bump maximum number of custom isolated world ids f7a2f8153c82 Fix hunspell::NodeReader::affix_id_for_leaf bounds check 1e80090f7044 Fix resolve_proxy service permissions 2e498629651d Add proxy_resolver_manifest Change-Id: I2b176c80aa315a0ae0a22b5707694fdcd407407b
| * Adds proxy pac testMichal Klocek2018-10-186-0/+257
| | | | | | | | | | | | | | | | Task-number: QTBUG-71128 Task-number: QTBUG-69281 Task-number: QTBUG-71229 Change-Id: If6b839ce12efb3ccd69c270d99b10b3756014bb2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Allow XMLHttpRequests from qrc to fileJüri Valdmann2018-10-184-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test for cross origin XMLHttpRequests from/to custom schemes. By default, this is not allowed, but can be changed by adding an origin access whitelist entry to blink::WebSecurityPolicy in the renderer. Do this for the qrc scheme. As a result SecurityOrigin("qrc").CanRequest("file") will return true, which makes DocumentThreadableLoader::Start disable CORS for the request. Otherwise, CORS would be used, which only works with CORS enabled schemes. Fixes: QTBUG-70228 Change-Id: I2da60fddbbfb490c6d2f03329be286dbc28e1f12 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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>
* | Disable error pages for external URLsv5.12.0-beta2Jüri Valdmann2018-10-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Failing to launch an external URL triggers a navigation to "chrome-error://chromewebdata". Navigating to "chrome-error://chromewebdata" results in a failed attempt to launch it as an external URL. The cycle repeats until the computer becomes bored. Match Chromium and disable error pages for external URL load failures. Fixes: QTBUG-63378 Change-Id: I6c401532d658744edc56921b55efd0d040a12b1a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix mojo-based WebUIAllan Sandfeld Jensen2018-10-121-0/+1
| | | | | | | | | | | | | | We were lacking the mojo_bindings.js resource. Change-Id: I7afa4dc101fb9dfd7e28e17ccb7f3edef0a5566b Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Chromium requires C++14Allan Sandfeld Jensen2018-10-113-3/+0
| | | | | | | | | | | | | | | | | | QtWebEngineCore was only building because Chromium CPPFLAGS was overriding ours. And setting C++11 in our examples and tests now forces a downgrade. Change-Id: I3642394f15bb9974688991800552624d2379faf9 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Fix warning when building without webchannel supportSzabolcs David2018-10-081-1/+2
| | | | | | | | | | | | | | | | warning: ‘QWebEngineScript webChannelScript()’ defined but not used [-Wunused-function] Change-Id: If7d5def2c539c3b2d448452fa154c1574778b17d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fix QWebEngineView changed properties emit on setPageKirill Burtsev2018-10-011-0/+96
| | | | | | | | | | | | | | | | | | | | QWebEngineView now also emits url, title, icon and selection changes on setPage in the save way when url changes. Before, those updates were only forwarded from current page. Fixes: QTBUG-69300 Change-Id: If827205094423bc00064a123ddb143b6002d2e7c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Add test for URL.createObjectURL on custom schemesJüri Valdmann2018-09-293-0/+30
| | | | | | | | | | | | | | | | | | | | Works with registered custom schemes, does not work with unregistered ones. In the latter case the function call is treated as a security violation and the renderer process is killed. Task-number: QTBUG-70420 Change-Id: I9c6fc0f02b44854bbceaffd1efbfe065dee61582 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add accessibility_tree_formatter_qtAllan Sandfeld Jensen2018-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Needed by chrome://accessibility Updates chromium to related change: 224fc0748a Do not assert on --disable-gpu 0ba5e6626a FIXUP: Add ifdefs to exclude ATL and accessibility from the build Change-Id: Ida0b03048ab6aa04686251d16ccfbf4855a37690 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-224-8/+17
| | | | | | | | | | Change-Id: Ifeaf0ee13213dc5a24d2f2b4655cf7f405cddef7 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Clean up WebEngineAction APIPeter Varga2018-09-202-47/+46
| | | | | | | | | | | | | | | | | | - Rename iconText to iconName - Remove unused QQuickWebEngineAction::toggled signal - Remove argument of QQuickWebEngineAction::enabledChanged signal Change-Id: I37172c096003eea58e567753265abd91679dacf1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Allan Sandfeld Jensen2018-09-172-25/+25
|\| | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/core_common.pri Change-Id: I36dc3a70aa653e6c8a610c787b615034180a6127
| * Merge 5.11 into 5.11.2Frederik Gladhorn2018-08-271-4/+4
| |\ | | | | | | | | | Change-Id: Iea03d76799b1e94991e536c056a5b918d63041a4
| | * Document Tango icons used in examplesKai Koehne2018-08-211-4/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-62053 Change-Id: I2df300239f4f02bb74f1ec27a74874b3877aabd0 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * | Fix build against Qt 5.9Jüri Valdmann2018-08-221-21/+21
| |/ | | | | | | | | | | | | | | | | | | | | Somehow it's the case that QtTest 5.9 doesn't know how to QCOMPARE a QString with a normal string literal: ld: error: undefined symbol: bool QTest::qCompare<QString, char [31]>(QString const&, char const (&) [31], char const*, char const*, char const*, int) Change-Id: I13ce50689d9f1c157378b862fb1ed4a572ac7f79 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix issues with qml bindings accessing non-existing adapterMichal Klocek2018-09-125-2/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have currently two levels of initialization for WebEngineView: the profile initialization and the adapter initialization. The adapter initialization is delayed to first navigation request to pick the right initial site instance and avoid creating dummy/blank WebContents, which in turn would start unnecessary render process. Profile initialization is delayed to make sure we avoid unnecessary default profile creations. Created profiles use filestorage. Unfortunately qml will call QQuickItem::componentComplete() only when the root element is completed and the bindings can be already in use by that time. Profile initialization has to take place before adapter initialization. Construct adapter together with WebEngineView, but create and initialize profile before adapter initialization. Go through WebEngineView and fix emitting signals based on adapter initialization. Most of the signals are emitted on initializationFinished(). Task-number: QTBUG-70248 Change-Id: I2acd8bff761c692a360733cbf537de53e1295695 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Improve QWebEngineUrlScheme APIJüri Valdmann2018-09-121-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following feedback from 5.12 API review: - Use enum class for Syntax - Add Q_FLAG for Flags - Mark constructor from name as explicit - Rename Secure to SecureScheme - Rename Local to LocalScheme - Rename addScheme to registerScheme - Rename findScheme to schemeByName Task-number: QTBUG-70247 Change-Id: Iae332c8d9843349506e8a4b07d70f0d234597375 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix focus for inputmethods manual testPeter Varga2018-09-061-0/+2
| | | | | | | | | | Change-Id: I9e154fd94a2d6e9dacb80efba2c4a6ff260e9514 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Avoid reattach of page before deleting itAllan Sandfeld Jensen2018-09-051-0/+15
| | | | | | | | | | | | | | | | | | Also fixes potential double delete if you do delete a view's implied page. Change-Id: Ib74128c0801f992694f4a5d8c148974039a6c7b2 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Zakor Tamas <ztamas@inf.u-szeged.hu>
* | WebEventFactory: Fallback for WebKeyboardEvent::dom_codeJüri Valdmann2018-08-271-0/+26
| | | | | | | | | | | | | | | | | | | | Usually this field should be computed from the native scan code, but sometimes we do not have a native scan code (in tests, for example). Add a fallback case to compute this field from windows_key_code, with test. Task-number: QTBUG-69442 Change-Id: I046094032576f4215cc8b3a6ced699a86ea148a9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | tests: Fix build against Qt 5.9Jüri Valdmann2018-08-232-7/+7
| | | | | | | | | | Change-Id: I9a6b4e7625700c1ff2621f4e2a2125727c34d3a1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-215-4/+88
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>