summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Update tst_navigationHistory QML testSzabolcs David2015-02-271-6/+5
| | | | | | | This API is not experimental anymore. Change-Id: Ide416705f7d9e148133f155f915e8db79fee8e12 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* QtQuick API for userScriptsPierre Rossi2015-02-221-0/+27
| | | | | | | | QObject-based, allowing the same things as the Widgets API in a declarative fashion. Change-Id: I9c9819b691b2098ec47e0536d47ccd2a950126c2 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Update QtWebEngine version to 1.1 in the testsSzabolcs David2015-02-1922-22/+22
| | | | | Change-Id: Ie5c484540e5a46adec7f4e50cb63bc31d854a8b9 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* WebChannel: don't mess with the navigator objectPierre Rossi2015-02-191-1/+1
| | | | | | | | | | | | | The navigator object is actually exposed later on from WebCore using a different mechanism, so the V8 extension approach won't work with it. Better take the chrome extensions approach and expose our own. This should "un-break" the part of the web that was broken by eee482929a. Change-Id: I991be2e12bb9ebcf60ace02721497c3fcd923c7f Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix tst_qwebengineaccessibility API testSzabolcs David2015-02-182-1/+21
| | | | | | | | | | | Implement a custom QTEST_MAIN preprocessor macro in order to support hardcoded Chromium content switches in the API tests. Force renderer accessibility to be on instead of enabling it on demand when a screen reader is detected. Change-Id: I9600ac4b26f4656104ce27ff19accbed4ea817c6 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Move navigationHistory out of experimentalPierre Rossi2015-02-181-1/+8
| | | | | | | | | | | | | | | Add an offset role to the models. Implement goBackAndForward that uses this offset. Also add a complete model, items, that includes current navigation entry (at offset 0) to allow for the Firefox-style single menu, and add that one to the nano browser example. The models are now instantiated lazily as it's unlikely the three models will be used by the same app. Change-Id: Ib551738611497c7eb9c501f045cda315968a2ada Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1625-216/+216
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ieb6bac7a1be5c25eb7cb917495b58b6a870ca6d4 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Move webChannel property out of experimentalPierre Rossi2015-02-131-2/+2
| | | | | | | | | Add a notify signal to go with the setter. Parent the default-provided channel to the view. Comes with basic documentation. Change-Id: I2bde8153df5928fc92ac36b7fa4d4b3b1da22f53 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Integrate with WebChannelPierre Rossi2015-02-122-0/+135
| | | | | | | | | | Provide a transport mechanism for WebChannel over chromium IPC and expose WebChannel in our experimental QML API. Co-authored by Milian Wolff. Change-Id: Ia24b1d4ebc8515de677d4849ec33cb55c963918e Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Proper versioning of the Quick APISzabolcs David2015-02-061-1/+0
| | | | | | | | | - Add missing "REVISION 1" to the new parts of the API: zoomFactor, certificateError and profile. - setZoomFactor should not be a slot. Change-Id: I02551ee7eb7323ff8dbb0b62ea503ed08b2051c2 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Propagate unhandled key events to the QtWebEngine view's parentJocelyn Turcotte2015-02-052-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | This allows applications to receive unhandled key events from the page by setting an event handler on the view's parent widget/item, like it was possible with QtWebKit. This is different in that events first have to asynchronously go through the QtWebEngineProcess. If the WebEngine view has the keyboard focus, the events will be consumed inconditionally by the RenderWidgetHostViewQtDelegates, and a copy will be resent to the view's parent if it wasn't consumed. This sends it to the parent instead of the QWebEngineView directly since those are only unhandled events, unlike with other widgets where you can first intercept events. It is done that way also in cases where the QWebEngineView would be be the focus widget directly in the future, instead of the RWHV. If applications want to intercept key events before they reach the page, they need to use an event filter on the QWebEngineView's children or globally on the application. Change-Id: I3b48f5212d3f238a1c0497cec1db6ae3badbad26 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add Qt WebEngine Quick API for allowing certificate errorsPaulo Pinheiro2015-02-021-0/+23
| | | | | | | | | This adds API for overriding some certificate errors. Once overridden any identical error for the same hostname and certificate will use the same override. Change-Id: Idf9e968edca18751cbdab744880480750d0c1bd4 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Update the expected list of public API testcaseAdam Kallai2015-01-281-0/+22
| | | | | | | | - Also fix the qtwebengineglobal_p.h header include in quickwebneignedownloaditem_p.h, because it is searched for wrong manner from the tst_publicapi testcase. Change-Id: I8997fafbf198f19a3d54b194f3408def6370417e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Import the inspectorserver auto test from qtwebkitJocelyn Turcotte2015-01-223-0/+191
| | | | | | | | The command interface is still similar to the remote inspector in WebKit2, the JSON page list information is slightly different. Change-Id: I85e6bd665efe9ba487622ec0f5c2e66669526888 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add Keyboard modifiers to MotionEventQt.Zeno Albisser2015-01-203-1/+160
| | | | | | | | | | Also fix the mapping of Ctrl and Meta keys on Mac OSX. On this platform Qt automatically maps Meta to Control and vice versa. Chromium however does not expect such behavior. Change-Id: Ia9913322ae8ae6ffd99feb6edfc91b9ea752c5cb Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-022-0/+24
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/3rdparty src/core/content_browser_client_qt.h src/core/core_module.pro Change-Id: Ia05a6564a4d17ca14ff9b76ae018c3f4ef33d535
| * Enable cmake config files generationJocelyn Turcotte2014-12-122-0/+24
| | | | | | | | | | | | | | | | | | As QtWebEngine now uses 5.x as its version number, we can just provide cmake tests and let qmake scripts do the rest. Task-number: QTBUG-42073 Change-Id: I28ccddbd1849980074dfbeefb5cb5a70c9209ab1 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Don't crash when using onEditingFinishedPierre Rossi2014-12-192-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to stay in line with the behavior expected by Chromium, we focus the view on load. This is problematic when relying on the editingFinished signal of text inputs in QML, as it is fired both when pressing enter and when losing focus. In our case, this would lead to reentering into load and in turn QQuickWindowPrivate::setFocusInScope, and when returning from the outer call, QQuickWindow would try to access the RWHVQtDelegateQuick from the first load through a now dangling pointer. It seems preferable to guard WebContentsAdapter::load against recursion. Adds a simple autotest that covers the crash scenario. Task-number: QTBUG-42929 Change-Id: Ib3bf9f421b1a91645b3e0e9aa658f2a3646d9caf Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* | Update public API test expectationsAllan Sandfeld Jensen2014-12-121-0/+27
| | | | | | | | | | Change-Id: I0b9a35c59d6eadb426143c041538ebb9c9d6d800 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devAndras Becsi2014-12-012-15/+29
|\| | | | | | | | | | | | | | | | | Conflicts: src/core/access_token_store_qt.cpp src/core/access_token_store_qt.h src/core/content_browser_client_qt.cpp Change-Id: Id319ad0d87ce071e63d9c6c22b4fc35523ddfa74
| * Merge remote-tracking branch 'origin/5.4' into 5.4.0Oswald Buddenhagen2014-11-121-2/+2
| |\ | | | | | | | | | Change-Id: I3b7df1ada08a8985734d804208b50cd5e0403903
| * | Disable error page while testing loadFail signal of Quick APIPeter Varga2014-11-062-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | Error page should be disabled while testing loadFail signal since testing signals of the internal error page is not possible yet. Change-Id: I07f0bb6378fcbf5d18634197808801c94606803c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* | | Merge remote-tracking branch 'origin/5.4' into devAllan Sandfeld Jensen2014-11-1117-37/+833
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | Conflicts: src/core/browser_context_qt.cpp src/webengine/api/qquickwebengineview_p.h Change-Id: I73bdec03b627b282851d7dda12006d4ab631072c
| * | Fix build in QWebEnginePage API testSzabolcs David2014-11-101-2/+2
| |/ | | | | | | | | Change-Id: I7cb497ce0f67eaf948caa88930fa1a3040ff4c39 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
| * Add runJavaScript testAllan Sandfeld Jensen2014-10-291-0/+68
| | | | | | | | | | | | | | Adds a test to check the return types of runJavaScript. Change-Id: Ifd0cb4adf57c972e8a8ad240d51f11f0cc17aa3d Reviewed-by: Andras Becsi <andras.becsi@digia.com>
| * Make url handling consistent in widget and quick APIPeter Varga2014-10-282-3/+3
| | | | | | | | | | | | | | | | Use explicit url in quick API too and use GetLastCommittedURL instead of GetVisibleURL for getting the expected urls in tests. Change-Id: If3251323645979643f3dc0e16491fe35b584f51c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
| * 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>
* 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>
* 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>
* 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>
* Update the library and QML version to 1.0Jocelyn Turcotte2014-08-1216-16/+16
| | | | | | | | 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-072-0/+243
| | | | | 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>