summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devJüri Valdmann2020-10-023-99/+78
|\ | | | | | | Change-Id: Id3613b8dcda5629bce9e3cd14fa926567125a960
| * Use OTR profile in tst_loadsignalsJüri Valdmann2020-09-301-4/+7
| | | | | | | | | | | | Task-number: QTBUG-65223 Change-Id: Ia8183759e23d93c5561fceb8d562b74add474b21 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
| * Use less pointers in tst_loadsignalsJüri Valdmann2020-09-303-98/+74
| | | | | | | | | | | | | | | | | | Make QWebEngineView a member of tst_LoadSignals. Also stop recreating it for every test. Task-number: QTBUG-65223 Change-Id: I2ed7c12559e56e23302813eb6f33c1e26a9d8748 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
| * Fix downloadable.tar.gz issue in tst_loadsignalsJüri Valdmann2020-09-301-2/+2
| | | | | | | | | | | | | | | | No more downloadable.tar.gz in the downloads directory for every run... Task-number: QTBUG-65223 Change-Id: I010bfc7785afca537734298a1618cd7ce05d50cf Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Cleanup qwebenginescript and qwebenginescriptcollection apiMichal Klocek2020-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up script and collection apis: * do not allocate user_script on heap, there is no need for that. * remove isNull(), which was used by collection.findScript(name) * remove collection.size(), there is already collection.count() * remove collection.findScript(name), user can use findScripts(name) which returns list of scripts or empty list if not found * collection.findScripts(name) is simply collection.find(name) [ChangeLog] Removed QWebEngineScriptCollection::findScript(name), use QWebEngineScriptCollection::find(name) instead. Change-Id: Iecf8f1d7c26275b9ce3a1ea97cf4bd74b17f681e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Reuse qwebenginescript in qmlMichal Klocek2020-09-242-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reuse core class and adopt api: * add missing setUrlSource to c++ class * fix typing for setRunsOnSubFrames * remove all invokable from setters in qml, we use properties for that anyway. * remove invokable toString , since we have debug stream operator in c++ [ChangeLog] In qml websetttings.runOnSubframes is now websettings.runsOnSubFrames Change-Id: Iba822a7aa6a59940484c972726d710a1b66cb20d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix compilation after 757a9c21c1 in basePeter Varga2020-09-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Adaptations for the following qtbase changes: - acbf9a858b Cleanup QTypeInfo - 652bd1efca Make QStringList an alias to QList<QString> - 25351dcc54 Long live QKeyCombination! - ed8acbeb7c Automatically register data/debug stream operations in QMetaType - a735038376 Move QStateMachine from QtCore to QtScxml Change-Id: Ieb2677cd0572cc6dfe7be4b8f8dd4189a39bd3fe Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Update dependencies on 'dev' in qt/qtwebengineAllan Sandfeld Jensen2020-09-231-2/+9
| | | | | | | | | | | | | | | | Work-around a QtNetwork bug, and QList::resize(0), doing some weird illegal stuff. Change-Id: I1eb178b121b9dcdd0a9f6d71d121956ddb5eb2a3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-222-9/+46
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/core/certificate_error_controller.cpp src/core/compositor/display_gl_output_surface_qsg.cpp src/webengine/doc/src/webengine_certificate_error.qdoc tests/auto/quick/qmltests/data/tst_certificateError.qml Change-Id: I976958a0833030bfd7c3ed762585eb12031306b0
| * Avoid to reject a certificate error twice in QuickPeter Varga2020-09-162-9/+46
| | | | | | | | | | | | | | | | Widget API already ignores these cases. This would cause a crash for fatal certificate errors after 83-based. Change-Id: I3e80bb12f023f22e330218a5b20f3e267bb237dc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Introduce qml script collection and make webscript as basic typeMichal Klocek2020-09-223-51/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In widget apis webenginescripts are value types and are managed by webenginescriptcollection. Introduce same concept in qml and make qquickwebenginescript a value type and reuse core userscript as private implementation. Rewrite webenginscript list handling. This patch is half baked since it does not include docs and tests for new api, however aim is to move script classes to core and reuse those in qml land. Therefore, new class introduced here is going to be removed in follow up patches, so all the missing parts will be added later. A new way of managing scripts in qml is as follows: * using collection with javascript dictionaries var script = { name: "FOO" sourceUrl: Qt.resolvedUrl("foo.js"), injectionPoint: WebEngineScript.DocumentReady } webEngineView.userScripts.collection = [ script1, script2 ]; * using collection with webscript basic type var script = WebEngine.script() script.name = "FOO" webEngineView.userScripts.collection = [ script ]; * using fine grain user script collection api with basic type var script = WebEngine.script() script.name = "FOO" webEngineView.userScripts.insert(script) Of course new api can be extended and we can provide more convince overloads. Note the main motivation here is to enable reuse webenginescript object created in c++ land, which is now passed as value in follow up patches. This changes reuses private apis of qml and will most likely require further changes when QTBUG-82443 is completed. [ChangeLog] WebEngineScript is a basic value type in qml, it is no longer declarative way of creating it, instead use WebEngine.script() Change-Id: I6a0ac3607e4522ccaefcec0a7d2986577d7e7024 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix qmltest duplication messMichal Klocek2020-09-1759-564/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | We had split qmltest directory since we could not run qml tests without test support, however this duplicated quite a lot files. Moreover adding more fine-grained checks would mean creating even more copies. Generate test list on qmake call, so we can fine-grained which test should be run. Change-Id: I093bdd6deeca50a1936a72276d7d6af12a376c45 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Update dependenciesMichal Klocek2020-09-161-2/+2
| | | | | | | | | | Change-Id: I02d43e9894466844f53bee36246773c1c218ba78 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Move QWebEngineFullScreenRequest to coreKirill Burtsev2020-09-151-6/+7
| | | | | | | | | | | | Task-number: QTBUG-74585 Change-Id: I953f46d01c1e4a82ab0d75b5f955e4f346f1c941 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-1426-154/+317
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-093-37/+65
| | | | | | | | | | Change-Id: Ie422b327025da084bc8038c7a0aadee2db801f29 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * Merge remote-tracking branch 'origin/5.15.1' into 5.15Allan Sandfeld Jensen2020-09-071-10/+27
| |\ | | | | | | | | | Change-Id: Ieb546ccd35db06e8ad6358b11e3139a839c9b4cf
| | * 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>
| * | Expand FullScreenRequest testingKirill Burtsev2020-08-312-0/+90
| | | | | | | | | | | | | | | | | | | | | 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-3112-18/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Make HttpServer to server resource from dirs for unhandled requestsKirill Burtsev2020-08-314-32/+31
| | | | | | | | | | | | | | | Change-Id: I2e15dff77c8f18af60a565cb74558f57c3527db8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * | Simplify testing with HttpServerKirill Burtsev2020-08-318-61/+31
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Wait for favicon in tst_QWebEngineCookieStore::basicFilterOverHTTPJüri Valdmann2020-08-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Wait for favicon request, otherwise, since the profile is shared between tests, the request might happen during the next test. Change-Id: I065e54ff6af4985e493a8cea10084e67293a5f0e Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Allan Sandfeld Jensen2020-09-0713-39/+48587
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-09-0713-39/+48587
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/compositor/display_gl_output_surface_qsg.cpp src/core/web_engine_context.cpp tests/auto/quick/quick.pro Change-Id: Iaf03434696788c89f5d3b524969513a89cb0a235
| | * | Ignore QQuickWebEngineNewViewRequest if it is unhandledTamas Zakor2020-08-251-27/+51
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the case when the WebEngineNewViewRequest.openIn() is not called on newViewRequested(). For example, when opening the view source from context menu in quick minimal example. Fixes: QTBUG-85494 Change-Id: I7c1ae53684361de459b2f268e471904e632821b0 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>
* | | Move qwebenginesettings to coreMichal Klocek2020-09-023-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove duplicated enums for certificate errorsMichal Klocek2020-08-281-0/+1
| | | | | | | | | | | | | | Add missing CertificateSymantecLegacy. Change-Id: I395f0c4a8c69fe3e0c303a13a3cbc077c123d26d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Blacklist javascriptClipboard test on ubuntu 20.04Michal Klocek2020-08-282-0/+4
| | | | | | | | | | | | | | This does not pass after ci upgrade. Change-Id: I84f1da1b954ce151491f4cd022f731995c160206 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Improve QWebEngineCertificateError apiMichal Klocek2020-08-284-35/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-188-201/+201
| | | | | | | | | | | | | | | | | | | | 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-183-160/+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-174-89/+88
| | | | | | | | | | | | | | | | Use QWebEngineDownloadItem class in qml instead of QQuickWebEngineDonloadItem. Change-Id: I0fc9595f8675c9b082be873adead6de3df1e669d Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Move QWebEngineCertificateError to core and use it in QMLJüri Valdmann2020-08-144-44/+66
| | | | | | | | | | | | | | | | Update qml certificate error test. Task-number: QTBUG-74585 Change-Id: I9383052bd1e37160d03e3d66e8f2e4a749023736 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add qml certificate error unit testMichal Klocek2020-08-147-1/+309
| | | | | | | | | | | | | | Follow up patch add more meat into the test. Change-Id: I8eecb7318d7c1e1c67068976c5608d8a7d4708ab Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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-123-56/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-246-4/+107
|\| | | | | | | | | | | | | | | | | 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>
| * 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>
* | Replace Qt::MidButton with Qt::MiddleButtonEdward Welbourne2020-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | The latter has been the preferred name since Qt 4.7.0. (Pick back to 5.15 shall need to drop the test change, as the test was added to dev after it diverged from 5.15.) Pick-to: 5.15 Change-Id: I3154ea1203e741cb337782d3374e02e15c5f209e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Use QList instead of QVectorJarek Kobus2020-07-1513-31/+31
| | | | | | | | | | | | Task-number: QTBUG-84469 Change-Id: I666a060351f73783e15e3f96884c9393a5cd7e46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove the unused include for QRegExpSona Kurazyan2020-07-151-1/+0
| | | | | | | | | | | | Task-number: QTBUG-85235 Change-Id: I2057e42e2b1ce4248f012b5e477120759d0ea805 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>