summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginepage
Commit message (Collapse)AuthorAgeFilesLines
* Propagate the view's screen coordinates on global position changeJoerg Bornemann2016-07-122-0/+116
| | | | | | | | | | | | | | | Suppose having a QWebEngineView as one of many child widgets in a layout. Resize some child widget such that the position of the QWebEngineView changes (without changing the position of the top-level window). Chromium must be informed of the changed global position, otherwise popups will be opened at the old position. Also see commit 7f941a34, which originally introduced the coordinate propagation for top-level window moves. Task-number: QTBUG-51244 Change-Id: Ieb372e8d7554700d5e8d1e2148ab778094ea3878 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove tst_QWebEnginePage::localURLSchemesJoerg Bornemann2016-07-121-29/+0
| | | | | | | | This was a rudimentary test case for QWebSecurityOrigin. This API was replaced in QtWebEngine. Change-Id: If41a7f48906a6b49d5a83c72c69dbfd125804537 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Clear internal selected text when searchingAlexandru Croitor2016-07-011-18/+13
| | | | | | | | | | | | | Previously if a selection was made on a web page, and afterwards a find operation is executed, the selection in the web page would be cleared, but the call to selectedText() would still return the old selection. Make sure selectedText() is always cleared, when starting a find operation, as well as when stopping one. Change-Id: If78f0fa1dd836a52184015e749ef5a84b9f784cd Task-number: QTBUG-54071 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix translation of multiple pressed mouse buttonsAllan Sandfeld Jensen2016-06-141-0/+36
| | | | | | | | | | | | We were reporting any mouse button event where the left mouse button was held as a left mouse button event. We should instead separate the button changed and the ones held. Also adds test of the translation. Change-Id: I1139d6615d54a036dfe843fdb1d1c90b23b467b5 Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix tst_QWebEnginePage::setHtmlWithImageResource testAllan Sandfeld Jensen2016-06-102-11/+8
| | | | | | | | | | | We have changed qrc resources so that they can be accessed from any security origin. To have a test of local resources we would need a file URL. Task-number: QTBUG-53153 Change-Id: I22b730f07785eacd365e3ec591f5dcbd09b6fc84 Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Remove tests for the javaScriptWindowObjectCleared signalJoerg Bornemann2016-05-301-45/+0
| | | | | | | | We have no equivalent of QWebFrame::javaScriptWindowObjectCleared and won't need it. Change-Id: I998e0412256887414c125df9ab994216dee22dc9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.6.1' into 5.6" into ↵Liang Qi2016-05-191-0/+3
|\ | | | | | | refs/staging/5.6
| * Blacklist flaky QWebEnginePage::setHtmlWithImageResource test.Alexandru Croitor2016-05-101-0/+3
| | | | | | | | | | | | | | | | | | It used to be an expected fail, then it seemed to work in 5.6, and for some reason it fails again in 5.6.1. Change-Id: I95161e001c3b8af3ea48fc284e448a2d8853e108 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix pasting images to web pagesJoerg Bornemann2016-05-193-0/+62
|/ | | | | | | | | WebKit expects pasted images to have the MIME type image/png (see code and comment in DataObjectItem::getAsFile()). Task-number: QTBUG-53409 Change-Id: I2b0c1244d309687ad190db26c5b00718ed0c4258 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix unexpected passes in tst_QWebEnginePage::setHtmlWithImageResource.Alexandru Croitor2016-04-271-2/+0
| | | | | | | | | | Requesting a local file resource without a baseUrl set, should not be allowed. This hasn't worked before in Webkit, so the checks were marked with QEXPECT_FAIL. Remove these, as the issue has been fixed, and now causes unexpected passes. Change-Id: I7d38692a9961651d48abe28218d7ee022a85f101 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Use the temporary zoom factor to set the zoom factorMichael Bruning2016-04-211-0/+26
| | | | | | | | | | | | | It turns out that using the temporary zoom factor is meant to set the zoom factor for one certain view, and this is actually what we want. Also added auto tests for this. Task-number: QTBUG-51851 Task-number: QTBUG-51969 Change-Id: I8912cbc25637d3c1681026380a2ab3068a964868 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* Remove tst_QWebEnginePage::viewModesJoerg Bornemann2016-03-171-21/+0
| | | | | | | This tested semi-public API. History points to a WRT-related feature. Change-Id: I974feec55c5b243701bb2fa481ca16273088e438 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Remove test for QWebEnginePage::metaDataJoerg Bornemann2016-03-081-42/+0
| | | | | | | This API doesn't exist. Meta data can be read by evaluating JavaScript. Change-Id: I6089de34b463d34d94d4d05e723e12bc163d288d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Remove skipped test tst_QWebEnginePage::popupFocusJoerg Bornemann2016-03-071-46/+0
| | | | | | | | This test makes only sense in QtWebKit where HTML input elements are implemented with Qt widgets (e.g. QComboBox). Change-Id: I0fdd63530db762595df7ca370ff2f9b1d73cc0a8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Remove test for unimplemented Web SQL Database APIJoerg Bornemann2016-03-071-59/+0
| | | | | | | | | | QWebEngine will not provide a wrapper API for the now deprecated Web SQL Database HTML5 API. Change-Id: I8864b202ce9200145953ba5273f86eddff9e133a Task-number: QTBUG-51346 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Fix double LoadFinished on URL errorsAllan Sandfeld Jensen2016-02-101-0/+33
| | | | | | | | | | | | | | | | | | RenderFrameDeleted was called before DidFinishLoad, which meant m_loadingErrorFrameList was empty and wouldn't detect the page loaded was an error page. Instead this patch relies on the chromium error-page url which we already asserted. Additonally we delay emitting the loadFinished signal until the error page is also done loading, since the error-page can be considered part of the load, and we otherwise have a race condition on toPlainText. Finally we were not getting error-pages when blocking requests because we reported them as aborted them instead of blocked. Change-Id: I945eb838b7f080d4e146f18354e8986e1b88b5cd Task-number: QTBUG-50752 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Preserve webchannel and userscripts when restoring historyAllan Sandfeld Jensen2016-01-311-0/+36
| | | | | | | | | | | Most page-state is set in webcontentsadapter::initialize except user scripts and webchannel. This patch ensures those are initialized too when changing to a new adapter during history restore. Change-Id: I4dca23ddab50480b1a72252a038834ce1802ad77 Task-number: QTBUG-50751 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: David Rosca <nowrep@gmail.com>
* Stabilize tst_QWebEnginePage::symmetricUrl some moreJoerg Bornemann2016-01-111-1/+2
| | | | | | | | The second call to setUrl might override the first setUrl, depending on the timing. Change-Id: I30a8257751be3256a61668bd57195b1a12154d68 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Stabilize tst_QWebEnginePage::symmetricUrlJoerg Bornemann2016-01-081-1/+4
| | | | | | | | | | | | The sequence view.setUrl(dataUrl2); view.setUrl(dataUrl3); might result in a navigation entry for dataUrl2 or not, depending on whether the first call completes before the second call would overwrite the pending load. Change-Id: I487ada16517daa218078af007083a68c01697c9c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Stabilize tst_QWebEnginePage::getUserMediaRequestJoerg Bornemann2015-12-101-3/+3
| | | | | | | Do not use 100 ms timeouts. Change-Id: Ied4a9a8b9af6ac33c025930a823d334000be2945 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* enable tests/auto/widgetsJoerg Bornemann2015-12-071-0/+5
| | | | | | | Enable autotests and blacklist tests that are known to fail. Change-Id: Iea23c69aa5a7bbd44c21803e352d17a92e9178a0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* stabilize tst_qwebenginepage some moreJoerg Bornemann2015-12-071-6/+5
| | | | | | | | Remove a qWait, and use the default timeout of waitForSignal. Do not expect the CI to be as fast as your desktop machine. Change-Id: I30b060422a285a2110ee7e065a3f17f80039e775 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Make QWebEngineFullScreenRequest const correctKai Koehne2015-11-121-1/+1
| | | | | | | | | | | | Let QWebEngineFullScreenRequest be logically const-correct. It feels weird to be allowed to call "accept()" or "reject()" on a constant object. Also allow the user to copy the request, but check whether the page is still valid in the implementations of accept(), reject(). Change-Id: Ibf139a126734fc8e2db68ec26dc8f24cd4438942 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* add dummy positioning pluginJoerg Bornemann2015-11-061-0/+9
| | | | | | | | | | | The QtPositioning plugin loader only loads plugins that are marked as testable whenever it detects that a Qt autotest is running. We now provide our own very simple positioning plugin that always provides the same location: the western beacon of port entrance Warnemünde. Change-Id: I747188dc261ba47c10056ad50754bb686e75c783 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Remove userAgentApplicationName API test caseSzabolcs David2015-10-271-23/+0
| | | | | | | | | | We can't support this functionality, because we have multiple QCoreApplications in QtWebEngine and the user agent would pick up "QtWebEngineProcess" as value from the core layer. The users have to do it themselves. Change-Id: Id2b92d919ed47390f46b31da50a1e8e224c163ad Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix build of tst_qwebenginepageSzabolcs David2015-10-211-2/+8
| | | | | Change-Id: Ic6cff6bed5ec1120ce8147ea02eeaea697788d16 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix ABI breakage due to fullscreen featureAllan Sandfeld Jensen2015-10-191-20/+5
| | | | | | | | | | | We can not add a new virtual method without breaking ABI on some platforms, instead we need to use a setter. The API now uses a request object, and a separate signal for canceling, since canceling can not be rejected. Change-Id: If8069c343e86926293c30e8de179bf4e3cbd5886 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Remove whitespaces from custom HTTP user agentsSzabolcs David2015-09-291-20/+9
| | | | | | | | | This prevents adding additional headers to the outgoing HTTP request through overridden user agent and unskips userAgentNewlineStripping API test. Change-Id: If9b3a88b0346058a7dc462471637d9777683fe82 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Unskip loadFinishedAfterNotFoundError test caseSzabolcs David2015-09-141-10/+6
| | | | | Change-Id: Ie9f1aea1c7aad3e5a188667d1a38e5bc516564f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Change some QNAM tests to use URLRequestInterceptorSzabolcs David2015-09-141-127/+0
| | | | | Change-Id: I83536664df15375622e1b24496685ae19ab829c1 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Remove unnecessary QNetworkAccessManager test casesSzabolcs David2015-09-141-36/+0
| | | | | Change-Id: I83b996740c96e8844f448cf4eb97593c6088a481 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Remove unnecessary QWebEngineFrame test casesSzabolcs David2015-09-111-193/+1
| | | | | | | We will not implement API for web frames. Change-Id: I9ba09cc2f58fc8a2abc96f3148a76d854946fed4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Merge QWebEngineFrame tests into tst_qwebenginepageSzabolcs David2015-09-098-0/+1672
| | | | | | | | It also fixes the failing progressSignal test case and skips the asserting tests: setUrlToEmpty and setUrlHistory. Change-Id: I2b2b5504247c09e5791a3c202b24b83c266c286f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Enable geolocation permission testAllan Sandfeld Jensen2015-09-081-31/+28
| | | | | | | Fix and enable the geolocation permission test. Change-Id: I337df66fe744101f47abb9381ef8151b697a35a2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix selectAll on data urlAllan Sandfeld Jensen2015-09-031-3/+7
| | | | | | | | SelectAll only works when there is a focused frame, so we must ensure a frame is focused when the web-contents requests focus. Change-Id: I00d670321b29342fcd447b4b07251df776019f1c Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* stabilize QWebEnginePage tests that use JS callbacksJoerg Bornemann2015-09-031-11/+87
| | | | | | | | Replace the QTest::qWait calls with a watcher object that can wait on JS callbacks. Change-Id: Iad5cfb73f31661103698fdb1c00e8a1e16f9981e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Enable parts of tst_QWebEnginePage::textSelectionAllan Sandfeld Jensen2015-09-011-6/+16
| | | | | | | | We can support the basics of the test though we are missing the actions to move selections. Change-Id: Iba1eae0d17857761145cd99c77a58a7d2f2b2c4c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* fix tst_QWebEnginePage::runJavaScript for "undefined"Joerg Bornemann2015-09-011-1/+1
| | | | | Change-Id: Ic49f07ee1a1d0384eba33dd2090ebe2650600107 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Widgets: Add fullscreen supportSzabolcs David2015-08-263-1/+64
| | | | | | Change-Id: Ibf1697d2bb3b3af5e7d71149305c5acffba43f0f Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* move automatic resource inclusion to pri filesJoerg Bornemann2015-08-251-1/+0
| | | | | | | Avoid code duplication. Change-Id: Icd270ff4e45112111b7eb9590e415947f63ce15b Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix compile warnings of QWebEnginePage widget auto testPeter Varga2015-04-151-0/+5
| | | | | | | Change-Id: I22a63075c66d263e4aebb6aea47e80d6ce08cb3c Reviewed-by: Adam Kallai <kadam@inf.u-szeged.hu> Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix openWindowDefaultSize QWebEnginePage testPierre Rossi2015-04-071-7/+8
| | | | | | | | | Add some qWait statements for timing-sensitive popup test. Replace QVERIFY with QCOMPARE for better reporting when it fails. Change-Id: I75eb2e774851beb01376042f0b60614db005970c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devAllan Sandfeld Jensen2014-11-111-2/+70
|\ | | | | | | | | | | | | | | 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>
* | 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 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 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>
* 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>
* Do away without QWebEngineWidgets::initializePierre Rossi2014-08-041-1/+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>