summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix tst_QWebEngineFrame::setUrlHistory expected failuresPeter Varga2014-10-281-17/+26
| | | | | | | | | | | | | | | | Adapt test results to the chromium behavior and remove expected failures. Change-Id: I277462125822e50f84c0d0ae795846a71c9a2b10 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
| * Add setting ErrorPageEnabledAndras Becsi2014-10-141-2/+8
| | | | | | | | | | | | | | | | | | This is required so that embedders can implement custom error pages, and is also needed for tests, where error-page loading has side-effects on subsequent page loads. Change-Id: I5ae276a58864a2fa9d7b608bea3340b482a92f4e Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| * Use the shared waitForSignal method in QQuickWebEngineViewGraphics testSzabolcs David2014-10-141-15/+2
| | | | | | | | | | Change-Id: Ie27e4af5f4517bb1e1eea1262ab32140b3dff816 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
| * Import QQuickWebEngineView API testSzabolcs David2014-10-1413-3/+729
| | | | | | | | | | | | | | | | Add crash tests for the Quick API and mark the unimplemented features in the test logs. Change-Id: I8e6b322fb1bb5ed75fed8b9556e2e975c9227f0a Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* | Distinguish between tab dispositions in NewViewRequest Quick API.Jarred Nicholls2014-10-211-0/+1
| | | | | | | | | | | | | | | | | | A tab's disposition can be foreground (e.g. target="_blank") or background (Ctrl+Click, or middle-click). API consumers should be able to discern between the two intents, so they can decide whether or not to focus their new view. Change-Id: Iab3ccb9e9f0b85256892f4f74204515bdeefa695 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* | Implement acceptNavigationRequest for the widgets API.Andras Becsi2014-10-201-118/+48
| | | | | | | | | | | | | | | | | | This is the equivalent API for navigationRequested in QtQuick. This patch also enables and updates tests that depended on this API, and removes the ones that we will not support. Change-Id: I28970c11225420a9680fbd767880130492664179 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* | TestBrowser: prevent popups from getting GCedPierre Rossi2014-10-131-1/+1
| | | | | | | | | | | | | | | | | | This is a quick fix that only works because dialogs shouldn't outlive the page that opened them. We still have a problem for the new window case. Change-Id: I652e545f7eac394a915f7f173795dc0f187fc6ea Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* | Implement programatic zooming for QtQuickPierre Rossi2014-10-133-0/+127
| | | | | | | | | | | | | | and add shortcuts in the examples (with a basic UI in the test browser) Change-Id: I237a04cf0b1fce2e0c6f8a19891ff3cb51727a40 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* | Use QUrl::fromLocalFilePierre Rossi2014-10-101-1/+1
|/ | | | | | | | so that we can open local files on the command line for quick testing. Change-Id: Ica0fd2242d90e5499c2f1550bc87362f20bf7938 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix WebContentsAdapater::requestedUrl() functionPeter Varga2014-10-071-4/+1
| | | | | | | | | | | | | | The requestedUrl function didn't return empty URL even if the empty URL was really requested. It was assumed if GetOriginalRequestURL returned empty string that means the requested url was not set in the navigation entry. This fix handles that case when empty url is set in the navigation entry as requested url. If the navigation entry is in pending state that means the request url has not been set yet thus the actual URL should be returned. Change-Id: Ic2eff5c487686f7c0e349a7a34a86b80551a002f Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix loadFinished signal in case of interrupting error page loadingPeter Varga2014-10-071-0/+2
| | | | | | | | | | If the error page loading is interrupted by loading of another page the signals of the second page should not be suppressed. Change-Id: I537daabf80ffed005acaaf2a6019e52a3250c523 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Adam Kallai <kadam@inf.u-szeged.hu>
* Fix WebEngineSettings::setDefaultTextEncoding()Szabolcs David2014-10-071-5/+3
| | | | | | | | | | Add the missing default_encoding to the web preferences. Use a 0ms timer instead of the 100ms in order to apply the settings as soon as possible and avoid waiting mechanisms in the test. Change-Id: I12f1a6dd68b29c2b287b160eea1ad5a5fb169c14 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Unskip the working tests in tst_qwebengineframe.cppSzabolcs David2014-10-031-24/+12
| | | | | Change-Id: I9db9bbfd106e8cf939108dbcadf27b7a43923662 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Unskip QWebEngineSettings::JavascriptCanOpenWindows related testsSzabolcs David2014-09-261-35/+5
| | | | | | | | | | | Window.showModalDialog() is not supported since Chromium 37, so we can remove the showModalDialog test case. If the view is not visible, the width and the height of the requested geometry is always 0 in tst_QWebEnginePage::openWindowDefaultSize. Change-Id: I420828815bc9528070ca58a9e42dea44517aeafc Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Skip tst_QWebEngineFrame::setUrlWithFragment API testSzabolcs David2014-09-241-0/+1
| | | | | Change-Id: I66b6cb593ed6fe7cc2e74737829991631606709f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Remove unneeded QWP_PATH environment variable for quick tests.Michael Brüning2014-09-242-2/+0
| | | | | | | | | When the PATH is properly set up, this should not be necessary and it overrode the explicitly set QTWEBENGINEPROCESS_PATH. Change-Id: Ie83a9f4f15f2203329c44fd9653adbb19c62672c Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix an assertion in web_content_delegates_qt.cppAdam Kallai2014-09-231-0/+11
| | | | | | | | If we get a replacement content, we can see a DidFinishLoad event for a frame. This error page should be ignored based on the frame. Change-Id: I3e1cd1773e8c5fc608605197c957011ddf258123 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* [Tests] Change expected QAccessible::role to WebDocument.Michael Brüning2014-09-161-2/+2
| | | | | | | | That is the role that is returned from the WebView. Change-Id: I9ab817e259c8fe69d756ffa576082066cf6b4ea8 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Don't forward loading of error pages to the API layerPierre Rossi2014-09-021-3/+2
| | | | | | | | | | | | | | | | | | The fact that the error pages are HTML and get loaded through the same mechanism should be kept an implementation detail and not be considered as a new load in the API sense. Also implement HasErrorPage for good measure and remove an anoying warning from the demo browser. The issue of the url not being changed remains in the QML test (but it doesn't affect a typical browser-like UI since the user input is still there untouched in the address bar), just make sure that failure does not affect the later checks. It also seems like we have a focus problem somehow, but the test should probably use a click for that matter. Change-Id: Ib5e363981a11287fdf4bfe84b93c999d96ed8087 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Settings in test browserPierre Rossi2014-09-021-0/+27
| | | | | | | | Expose some "testable" settings as well as test the integration with the QML Settings API. Change-Id: I7ec6a7e695f60338b2c16a648e9a93b64ea29a94 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Try harder to return accessible namesFrederik Gladhorn2014-09-011-18/+52
| | | | | | | | | Always check if there is another accessible set as title for the one queried. For text fields also return the placeholder property if nothing else is set. Change-Id: I3f10ff04338a405ad8de00e75e15dded4aaeed3b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Tweak the back and forward buttonsPierre Rossi2014-08-224-17/+79
| | | | | | | | | To have a more "discoverable" UX, and cleaner UI (requiring private QML API for now). Change-Id: Ic275287d429149a1c353a1cbdc5b7f9b19e57410 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Remove XFAIL that got fixed by snapshot updateFrederik Gladhorn2014-08-181-1/+0
| | | | | | Change-Id: I5e2ab9f9119491f61033d8dd93059d0a54f3bc5b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix uncalled callbacks with findTextJocelyn Turcotte2014-08-151-0/+24
| | | | | | | | | | | | | | | | | Calling findText successively might prevent the previous pending FindReply to be sent, which would leak the callback on the application side. This would cause a crash in qupzilla since we empty all pending callbacks in the QWebEnginePage's destructor to catch this kind of issue. This also renames lastRequestId to nextRequestId to make it clear that this is the ID generator for everything, including findText, and that lastFindRequestId is only a tracker. Change-Id: Ia78d553a58ed31af7237aad8772fa9828560c6d4 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add QJSValue support to the public API testSzabolcs David2014-08-131-1/+5
| | | | | | | | | | | | QJSValue is not a built-in QMetaType (it's ID is over 1024 [QMetaType::User]) and we can't get the QML type names from the QML engine, so I hardcoded it in this test. The check of the "void" is unnecessary, because that is built-in: QMetaType::Void Change-Id: I0d7668abedc8830b4bba39ff60bce644fe97888b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Opt-out of the build on platforms where we won't build successfullyJocelyn Turcotte2014-08-121-1/+3
| | | | | | | | | | | To allow the qt5.git integration, allow the build to succeed if the repository is checked out on a platform that we don't maintain. This is the initial list of platforms that we want the integration to succeed and we can add new ones once we start maintaining them. Change-Id: Idce2a84eb8d5b1ef7f14d399fe013f666b479108 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Update the library and QML version to 1.0Jocelyn Turcotte2014-08-1218-18/+18
| | | | | | | | Also update all the examples to use 1.0 as 0.9 shouldn't be publically recommended. Change-Id: Ic58e35bdfd3a0f3d5201fc069b7103027ba84574 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add findText to Quick APIPeter Varga2014-08-073-0/+290
| | | | | Change-Id: Ic0de45c1fe2a5537d61ad446c96fe8fda7c30966 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Move the runJavaScript function from experimental to public APIAndras Becsi2014-08-062-2/+2
| | | | | | | This is essential API that should be public. Change-Id: Ifbd86171933936112e2495ebed074faa2e52464d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add QQuick API for intercepting navigation requestsAndras Becsi2014-08-064-6/+162
| | | | | | | | | | | | Add missing navigationRequested API to be able to intercept navigation requests. This is useful for ignoring requests for example in kiosk-like applications that want to restrinct navigation to a specific url or domain, or want to disable specific types of navigation requests (e.g. reloading, clicking links, form submissions). Change-Id: Ie375e635a3c3566527972d05f5d99b39489c5ca8 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* s/QWebEngine/QtWebEngine/gPierre Rossi2014-08-043-3/+3
| | | | | | | and make it a namespace Change-Id: I15c1af8c7d0d8ab213cdf7945109263fe461d2ac Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Do away without QWebEngineWidgets::initializePierre Rossi2014-08-046-6/+0
| | | | | | | | | If we consider the plugin scenario is unlikely and decide it's unsupported for widgets, we can simplify our tests and examples a bit on this front. Change-Id: Idc96032c127b4ee74fb5c7b3d2cdfdf99c3a722e Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix tst_QWebEngineFrame::setUrlWithFragment testSzabolcs David2014-08-041-3/+4
| | | | | | | | | Change this test to rely on urlChanged() instead loadFinished(), because we don't get loadFinished signal if the load was handled by the same page. Change-Id: I65aa06afa4512fa845074ad97b87ecba16da687e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Drop 5.2 supportJocelyn Turcotte2014-08-011-1/+1
| | | | | | | We actually already depend on dev (5.4) in other areas. Change-Id: Iab297a51ab06209a96f11f97c74463d38203eda8 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add loadVisuallyCommitted signal to the experimental Quick APISzabolcs David2014-08-012-2/+28
| | | | | | | | | This fixes the flaky QQuickWebEngineViewGraphics test and extends it with a new test case. Change-Id: I2d8a0762716cb9232fdea6473760e67ac2e7146d Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Implement accessibility hit testingFrederik Gladhorn2014-07-161-0/+13
| | | | | | | childAt needs to return any child at the given coordinates. Change-Id: I19bfbd24a9bfc868fd1602f058cb9ce873ceef52 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement accessible value interfaceFrederik Gladhorn2014-07-151-0/+39
| | | | | Change-Id: I837d7f3041aec59ae83c0fe802bc83b746e62b76 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement accessible text interfaceFrederik Gladhorn2014-07-151-0/+35
| | | | | Change-Id: I3a9143c61ecda98513be031fc554fd4bfcef7b7c Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix the indexOfChild function for the web documentFrederik Gladhorn2014-07-111-0/+4
| | | | | Change-Id: I37a32bd5dd8760bc91173968a620a1932ae67b4e Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Improve text for accessiblesFrederik Gladhorn2014-07-111-1/+9
| | | | | Change-Id: I0301ed0403b56169e610cf1c38a1e5da39ee164f Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix duplicate document roleFrederik Gladhorn2014-07-111-0/+2
| | | | | | | | The blink root element already has document as role. By setting it in the webview we'd get two documents in the hierarchy. Change-Id: Ie14e57b4e2050dbd9495c4fa94de4e2faebc02c1 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Widget based accessibility glue codeFrederik Gladhorn2014-07-103-0/+119
| | | | | | | | | With this patch the accessibility hierarchy inside webengine becomes available when navigating from QWidget based web views. Change-Id: Ib3625a6ec93b4d3f298fb845ab85209b348349ba Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* tst_qwebenginepage: Fix type in javaScriptConsoleMessage signatureFrederik Gladhorn2014-07-071-1/+1
| | | | | Change-Id: Ie4a2a75388f3db3316e3e333e2b8d578ade034ac Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* XFAIL tst_QWebEnginePage::backActionUpdateJocelyn Turcotte2014-07-011-0/+1
| | | | | | | | | The test relies on events being propagated from the QWebEngineView to its children. We should probably send those events directly to the WebContentsAdapter to fix this kind of use case. Change-Id: Ib5cc199fe8fc27c21603888b49334d1c1f71e575 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* XFAIL tst_QWebEngineFrame::setUrlHistoryJocelyn Turcotte2014-07-011-6/+17
| | | | | | | | | | Update the checks to cover the case where the count could be the same with different URLs, and mark those checks as currently failing because QtWebEngine doesn't have the logic preventing QUrl() to affect the history. Change-Id: Id0260d21d32d9e85fbd14f44536c2c93b6eb40b1 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix typos and warnings in the Quick testsSzabolcs David2014-06-056-18/+23
| | | | | | | | | - Add valid size to tst_faviconLoad.qml - Add missing files to qmltests.pro - Rename test cases and files from WebView to WebEngineView Change-Id: I40163117a11672b18230046a1604624bc4620dba Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix import versions in the Quick testsSzabolcs David2014-06-0514-14/+14
| | | | | Change-Id: I5f16a2f824112bdfa2c50b3e4d93d6d47e34ba1b Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Test for webenginewidgets, not widgetsLaszlo Agocs2014-05-191-1/+1
| | | | | Change-Id: Icecb6b716a45b4682ddd9b16383f3aa4a5acb312 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Set the QtWebEngine modules version to 0.9.0Jocelyn Turcotte2014-05-162-2/+2
| | | | | | | | | | | | | | | | | | | | Also make sure that this version number appears in the user agent string and in the QML imports. The plan, unlike other Qt modules, is to keep our module and QML versions in sync to make it easy for developers to figure out what API is available in a given version. The QTWEBENGINECORE_VERSION_STR define is explicitly set in the .pro file since we don't call syncqt to generate a version header for the core module. The 0-major version currently causes the library name to start with libQt0 instead of libQt5, but this is something that we can fix in qtbase once we want to officially support linux desktop with QtWebEngine 1.0.0. Change-Id: I31915e84869b4db456416ef1f85a2296b8a06c99 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Append MessageLevel postfix to the JavaScriptConsoleMessageLevel.Michael Brüning2014-05-121-3/+3
| | | | | | | This keeps consistency with the other enum names. Change-Id: Idaedb8566fd770b05effeeba377b09a84bf0af12 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>