summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix getDisplayMedia crashJüri Valdmann2019-10-171-14/+21
| | | | | | | | | | | | | | | | | | The MEDIA_DISPLAY_VIDEO_CAPTURE stream type is handled incorrectly by MediaCaptureDevicesDispatcher causing a crash when an unexpected type of media device is returned to Chromium. This patch only fixes the crash, screen sharing is nonetheless not properly supported by WebEngine due to limitations of the public API which does not allow selecting between screens, not to mention windows or tabs. On Linux WebRTC's ScreenCapturer is not even built since it depends on use_x11 being set in GN. Fixes: QTBUG-78016 Change-Id: I7fa49febaba1be94bdb6c31265dfc24ee809d635 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Stabilize tst_QWebEnginePage::comboBoxPopupPositionAfterMove auto testPeter Varga2019-10-091-0/+6
| | | | | | | | Fixes a flaky fail when jsViewPosition is called too early to query the view position. Change-Id: Ib2e9c1e95a6363a8e45e8bcc44e1878fd9a6914f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Unify shared context initializationMichal Klocek2019-09-262-2/+15
| | | | | | | | | | | | | | | | | | | | | | Setting shared context on core application object should be done before core application is initialised. This is handled correctly in widgets part but not in qml part. Unify our shared context creation and call WebEngine::initialize() before QCoreaApplication is created. Context has to be set shared before first window's QPlatformOpenGLContext is created and not before window itself is created as documentation claimed. Keep the older code running, but print the warning. Update one test to test new initialization order, but keep the others to check if they still works. [ChangeLog] WebEngine::initialize() has to be called before QCoreApplication is created. Task-number: QTBUG-76391 Change-Id: Iff938493a4d21f360110136192daedb6199584c1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix XMLHttpRequest status with custom schemesJüri Valdmann2019-09-251-0/+110
| | | | | | | | | | | | Emulate a HTTP 200 OK response when QWebEngineUrlRequestJob::reply is called so that an XMLHttpRequest to a custom scheme gets a proper 'status' property. Note that calling QWebEngineUrlRequestJob::fail on the other hand emulates a network error, meaning it triggers the 'error' event in XMLHttpRequest. Fixes: QTBUG-78316 Change-Id: Ia7249a5b72533aa7e2ed4ef8f62d8b6b89820cc1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix flaky tst_QWebEnginePage::runJavaScriptFromSlotJüri Valdmann2019-09-142-9/+4
| | | | | | | | Unfortunately, "load finished" doesn't mean "ready to execute JavaScript". Fixes: QTBUG-74718 Change-Id: I611e35cfbb530ff68745d86124679d60ab0b113e Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add environment variable check for tst_ProxyPac::proxypac()Tamas Zakor2019-09-121-0/+4
| | | | | | | Yield error message if --proxy-pac-url argument is not passed. Change-Id: I9a5685982c0a9d8decc65ad9c728357c038ef0a0 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Fix invalid url on profile changeMichal Klocek2019-09-041-0/+14
| | | | | | | | If adapter is initialized use always active url. Fixes: QTBUG-77977 Change-Id: Ie8d4ec7d7c703322cef50d26931cce2b130dcf34 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix QWebEnginePage visibility stateJüri Valdmann2019-08-201-0/+34
| | | | | | | | | | | | | | | | | | Calling view.show(); view.load(...); view.hide(); results in a WebContents in visible state because the first call to show() is delayed via a timer and never canceled so it takes effect after the hide(). Also, the page's visibility state is not updated when changing views, so that a visible QWebEngineView can be set to display a hidden QWebEnginePage. Fixes: QTBUG-77209 Change-Id: I0243c659f4039a35c36e04ea55c5972666170fd0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix file URI checks for FilePickerController::accepted() on WindowsTamas Zakor2019-07-311-12/+76
| | | | | | | Extend auto tests with windows specific cases. Change-Id: I731cd520c12a38636a5df4829a79d7bd1d85a314 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Clean-up handling of selected filesAllan Sandfeld Jensen2019-07-271-29/+23
| | | | | | | | | | Simplifies the code and makes sure both the two QML implementations of the file-selector are source compatible. Note, this does not address issues with test on Windows. Change-Id: Ieee84866c456d600a812683cae389d6a6980366f Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Allan Sandfeld Jensen2019-07-233-17/+57
|\
| * Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-07-233-17/+57
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/config/common.pri src/core/configure.json src/core/net/url_request_qrc_job_qt.cpp src/core/ozone/surface_factory_qt.cpp src/core/web_contents_adapter.cpp Change-Id: If679aa179123f793639da3d8ee4ab5d116707754
| | * Reset findText reply id on StopFinding to prevent callback laterKirill Burtsev2019-07-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Not updating lastReceivedFindReply caused next findText call after StopFinding to trigger redundant callback call on checking stale query. Fixes: QTBUG-77029 Change-Id: Iad4b71364ecb3ec3db3096b739e77620d12731f9 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| | * Remove qt.io load from findTextInterruptedByLoad and ensure checksKirill Burtsev2019-07-161-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Load of real website is not really needed, simple html is enough to verify that on load no findText callback is executed from previous query. Ensure callback is not called with timeout and additional check inside it to verify that it's not called twise. Task-number: QTBUG-75541 Change-Id: Iebf207e40d8f4d4f680b46bb0f32480edd72f36d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| | * Fix quick dialog test wrong message on view's LoadStatus changedKirill Burtsev2019-07-121-4/+5
| | | | | | | | | | | | | | | Change-Id: Ic8eb671409794799bcdad4760dc58e84de3b109f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| | * Fix spellcheck test flaky failure with misspelled word missingKirill Burtsev2019-07-121-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | Work is done asynchronously by chromium SpellChecker object. Therefore there is no guarantee that on ShowContextMenu event for WebContents there will be a result with misspelled word. Change-Id: I2978ed99e4c14f0a7d9086853c5218f82ea1ab60 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | | Fix flaky inputContextQueryInput testKirill Burtsev2019-07-222-5/+2
|/ / | | | | | | | | | | | | | | | | After change 5a6a8509a9 selectionChanged emitted asynchronously. That means it's not right to assume this signal be emitted after receiving and processing InputMethodQueries for QPlatformInputContext. Change-Id: Ibe06bdbb5d39f7805f938740e3925a8e47b95e40 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-07-106-28/+67
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/quick/qmltests/BLACKLIST tests/auto/quick/qquickwebengineview/BLACKLIST Change-Id: I29b68dec8692d0369a2dda56350ee62d3ad73e08
| * Wait for SelectAll to be enabled in tst_QWebEnginePage::findTextJüri Valdmann2019-07-091-0/+1
| | | | | | | | | | | | | | | | Fixes flaky m_view->hasSelection() assertion. Change-Id: Idba17916c38ac76b8002e30bab08d7f9e1064b2a Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Un-blacklist some passing testsJüri Valdmann2019-07-084-26/+0
| | | | | | | | | | | | | | | | Remove from the blacklist some tests which, according to Grafana, have had no failures in the last 90 days on 5.12 branch. Change-Id: I3f174c82b5644d74b70fffa3856ae79f8c9893f8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Bump timeout in tst_InspectorServer::openRemoteDebuggingSessionJüri Valdmann2019-07-041-1/+1
| | | | | | | | | | | | | | Flaky on Windows 10. Change-Id: Idaf73ccaf29831010e84397ae722dbe54a2de9bb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Set custom user-agent manually on new windowsAllan Sandfeld Jensen2019-06-071-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | Chromium forgets to set ShouldOverrideUserAgentInNewTabs(), so we need to manually set the override. Fixes: QTBUG-76249 Change-Id: Id240ee525dacec3cd8389aca058a61d3af62b00a Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Speculative fix for flaky runJavaScriptFromSlot testJüri Valdmann2019-07-031-0/+3
| | | | | | | | | | | | Task-number: QTBUG-74718 Change-Id: Idb46521b94517b54d4c38624d4557fbe31565560 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Binary compatibility files against Qt5.13.0 for QtWebEngineMilla Pohjanheimo2019-07-012-0/+35567
| | | | | | | | | | | | | | BC files added. Change-Id: I67a272137f69581b54fa1fb711bf207b47007eba Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-06-112-2/+147
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/3rdparty src/core/configure.json src/core/profile_io_data_qt.cpp tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Ie8ae4aa03881a0733ff497fff46e3f7040735650
| * Disable edit actions when content has no focused framePeter Varga2019-05-272-2/+147
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-75505 Change-Id: Ia1329ff554a86e307aa7995e9af1665ea6c5e64c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Refactor tst_QWebEngineDownloadItem::downloadPathValidation()Tamas Zakor2019-05-291-18/+13
| | | | | | | | | | | | | | | | | | Set temporary download path with new API. Change-Id: Ie448b14c9b063db45c99406bc491d92f3d61cb15 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.13.0' into 5.13Allan Sandfeld Jensen2019-06-041-0/+3
|\ \ | | | | | | | | | Change-Id: I82726c9286e1cc7b2904887a5c0b05df4c669233
| * | Blacklist tst_QWebEngineView::inputContextQueryInput on windowsv5.13.0-rc3v5.13.0-rc2v5.13.0-rc1v5.13.0Allan Sandfeld Jensen2019-05-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Has failed twice in a row now. Change-Id: I9433ec9a3b2f1720efbaf7a34fcaa563525126e5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-05-244-0/+179
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/net/network_delegate_qt.cpp tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp Change-Id: Ib715b3047213583e0441b915d3cabb801d9d4ba8
| * | Add path validation for QWebEngineDownloadItem::setPath()Tamas Zakor2019-05-201-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not set path if it ends with separator or if it matches with an already existing directory name. Task-number: QTBUG-75566 Change-Id: I4b78b28afe034c7589633c569a4945a36b32008e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Referrer HTTP Header no longer ignored when set via RequestInterceptorLeander Beernaert2019-05-202-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the HTTP referer is properly placed on a request when it's set via the QWebEngineUrlRequestInterceptor. Added test case to catch future incidents. Fixes: QTBUG-60203 Change-Id: Ida2f713a7352c3199fc9f8e15b5d8350d50afdda Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Update docs and test for runJavaScriptJüri Valdmann2019-05-091-0/+12
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-69567 Change-Id: Icdf5a200f7be1eb7a98cce62848e3a641c49e804 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-05-102-0/+95
|\| | | |/ |/| | | | | | | | | | | | | | | | | Conflicts: src/core/profile_adapter.cpp src/core/profile_adapter.h src/webengine/api/qquickwebengineprofile.cpp src/webenginewidgets/api/qwebengineprofile.cpp tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp Change-Id: Ic561f22b361e32a0a63668c73bf6c0fc9c1ce16f
| * Q(Quick)WebEngineProfile: Update list of internal schemesJüri Valdmann2019-05-071-0/+41
| | | | | | | | | | | | | | | | | | | | | | Disallow installing handler for "about" and everything in kStandardURLSchemes of url/url_util.cc. Except for "gopher" which is used in tests. Suppress warning about custom schemes for "gopher" since it's not a custom scheme. Also lowercase the scheme in urlSchemeHandler() and removeUrlSchemeHandler(). Change-Id: I72b06d4fa6433882019405a0d600a593c8971bf1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Do not crash on QWebEnginePagePrivate::releaseProfile()Allan Sandfeld Jensen2019-05-031-0/+19
| | | | | | | | | | | | | | | | | | Deregistering the widget or deleting the view should be able to handle a now missing d_ptr in the old page. Change-Id: Ic843f7bde12776b6aad4fad865ccf14a25695154 Fixes: QTBUG-75547 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * Silence warnings in tst_qwebengineprofileAllan Sandfeld Jensen2019-04-301-0/+20
| | | | | | | | | | | | | | Register custom schemes Change-Id: I536a27da8f936e4ea6569e39a8ec6e30e23af03a Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * Handle corner case of assigning an implicit page to a new viewAllan Sandfeld Jensen2019-04-301-0/+15
| | | | | | | | | | | | | | | | Pass the ownership on to the the new view, so it is still handled like an implicit page. Change-Id: I76ad3cb349a492e60e3ad2bdd4aebaabed07bd4f Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Do not blacklist webChannelWithBadStringMichal Klocek2019-05-033-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is about documenting some weird new behavior. Since Chormium 72 our webChannelWithBadString fails. This is fascinating issue and can be tracked down to commit in Chromium https://chromium-review.googlesource.com/c/1282993 which "fixes" well-forming of JSON.strigify. This function is used by webchannel.js to send data through webchannel transport. In c++ land we get now for invalid utf16 replacement in form of '\\u' + i.toString(16).padStart(4, '0'). This sadly does not trigger any longer REPLACE_INVALID_UTF8 in WebChannelTransport::NativeQtSendMessage. Moreover this goes even "worse" since QMetaObjectPublisher will create invalid utf16 form raw "\ud800" string -> '\ud800'. This is not an error per se, since test creates invalid utf16 character in javascript and it ends as invalid utf8 character in c++. Btw enable test on qemu. Change-Id: I36f2df417d7b9f3f2113792f08025821737d8d01 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Skip tst_QWebEngineProfile::qtbug_71895 if network load failsJüri Valdmann2019-05-031-2/+3
| | | | | | | | | | Change-Id: I0daf14c4ec31dfb867d9d7f531b9fdc6f7244e1b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-04-303-3/+98
|\| | | | | | | Change-Id: I051052a70a6e764202a90d77fc1a0f73688d3704
| * Profile test: fix buffer for request job being deleted on main threadKirill Burtsev2019-04-231-2/+1
| | | | | | | | | | Change-Id: I894946ce7c9dcf4f787c5c928e3737cd80a7dc52 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * Fix QWebEngineView::setPage not deleting old pageJüri Valdmann2019-04-171-0/+46
| | | | | | | | | | | | | | | | | | | | | | Also fix QWebEnginePage::setView not deleting old page Also fix wrong page being deleted if it's parented to the view. Fixes: QTBUG-75131 Fixes: QTBUG-75175 Change-Id: Ie4dfb15b3182de7aa3a94cddcac54ea40a86121b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix resolving relative URLs with custom schemesJüri Valdmann2019-04-161-0/+49
| | | | | | | | | | | | | | | | Pull in 3rdparty patch and add test. Fixes: QTBUG-74864 Change-Id: I5440f58ff55297c2a51f896d43f479404ff6ca2f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Profile test: fix waiting for load finished signalKirill Burtsev2019-04-111-1/+2
| | | | | | | | | | Change-Id: I797b596b73d62e420592ef9e96601c35ea7ecad6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Make offscreen test offlineMichal Klocek2019-04-174-3/+16
| | | | | | | | | | | | | | This enables also the test on qemu. Change-Id: I70c40b3cedeadfb21e396d8a550a54fe0a319438 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Fix running proxypac test on qemuMichal Klocek2019-04-172-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Do not override '--no-sandbox' on boot2qt. Starting resolver service on qemu is bonkers and ends up in unsupported calls during threading checks. Adding '--no-zygote' solves the issue, however introduces race condition and deadlocks on resolver service start, which would make test flaky. The deadlock issue is not reproducible without qemu. Therefore to workaround the issue run test in single process mode. Task-number: QTBUG-63346 Change-Id: I33a1079776edecddf3d7653db6c2ecc3a868b1a1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add unit test for verifying QWebEnginePage::contentsSize correctnessMichael Brüning2019-04-131-0/+29
| | | | | | | | | | | | | | | | An adaptation to Chromium 70 caused a regression in this. Change-Id: I8928694b9f99cd420afd858d3a1023228276bae0 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix qmltests::WebEngineViewSingleFileUpload auto testsTamas Zakor2019-04-104-21/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | Add scheme checks for FilePickerController::accepted(). A file:// prefix to a file selected here causes chromium to terminate the render process due to an illegal ipc message. Extend auto tests with custom Dialog. Also fix directory upload test. Change-Id: I8d672e435129d62d268b48c3471b924c0161b44b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Skip downloadToReadOnlyDir auto test on WindowsPeter Varga2019-04-102-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | It should be rather skipped than blacklisted since it is not expected to work on Windows. See the corresponding warning about ACLs: https://doc.qt.io/qt-5/qfile.html#setPermissions Task-number: QTBUG-74698 Change-Id: Iad66c028583d6811b7a413dd9800e9095d8f6da7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>