summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Move the WebEngineView.inspectable property to experimentalJocelyn Turcotte2014-05-091-1/+0
| | | | | | | | The property is still not properly implemented and we'll make it first go through the experimental tryout like other APIs we add. Change-Id: I6eb99fcebb7ca1fc33338d786585cfe7fbc0afd4 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add enum type parameter support to public API testSzabolcs David2014-05-091-2/+18
| | | | | | | | | This test fails since we use enum type (JavaScriptConsoleMessageLevel) as function parameter type. In these cases the given typeName does not contains the class name in isCheckedEnum(). Change-Id: Iab1b257883ff415a2b9c63af106ed3d92050896d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add test_baseUrlAfterLoadHtml QML test caseSzabolcs David2014-05-084-2/+102
| | | | | | | | Remove unreachableUrl support from WebContentsAdapter::setContent, because this argument behaves exactly the same as baseUrl. Change-Id: I36f92b99b7045c6d3b831481bb04d51a0e05772f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add linkHovered signal to the QQuickWebEngineViewSzabolcs David2014-05-053-1/+129
| | | | | | | | I dropped hovered title support from the QtWebKit API, it seems we don't need that logic. Change-Id: I5617c295344512a35aa526a6f1307f0b21f866d6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* WebRTC Widgets APIPierre Rossi2014-04-291-0/+65
| | | | | | | | Simply reuse the existing feature request approach that was used for geolocation and notifications in QtWebKit. Change-Id: I8fec4f4e9e81b491163912fadb4ce17d343864dd Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix WebKit Bugzilla linksSzabolcs David2014-04-222-6/+6
| | | | | | | | The bugs.webengine.org domain does not exist. Change-Id: I70ffb181e20e7c96ca3e6e32ee55b49b21f5bd9f Reviewed-by: Adam Kallai <kadam@inf.u-szeged.hu> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Cleanup the QtWebEngineWidgets public headers and APIJocelyn Turcotte2014-04-154-10/+14
| | | | | | | | | | | | | Headers were left intact to leave a trace of the evolution compared to the QtWebKit API and to make it easier to work until we had a basic subset of the API implemented. With the upcoming release, this patch removes this convenience in the aim of starting polishing the headers and the documentation for the upcoming release. Change-Id: Iae436b4ec041d771a7002575e122835802bc9f3e Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Replace uses of QWebEngineFrame with a security origin URLJocelyn Turcotte2014-04-152-4/+5
| | | | | | | | This changes implemented methods. The rest of the references will go away with the public headers cleanup. Change-Id: I82340cd7a4488c4b463489ae98cd9c16de4e7487 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix tst_QWebEngineView::crashTests test caseSzabolcs David2014-04-151-1/+1
| | | | | | | | | | This test runs without crash, but fails because the expected interval of the load progress is too narrow. For example, the progress values in my case: 0 -> 10 -> 100 Change-Id: I0fd13d6badf717fc27e8d4219f39190db0090692 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Unskip tst_QWebEngineHistory::popPushStateJocelyn Turcotte2014-04-151-6/+3
| | | | | | | | This also add a loadFinished wait and remove the test of the removed clearState API. Change-Id: I677ae0aabdd9b115976bba8e87d59ae421f5b978 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix tst_QWebEngineFrame::setHtmlWithJSAlert test caseSzabolcs David2014-04-151-2/+1
| | | | | Change-Id: I27e6baa24cefabc29c44c76f3e9747ebafaa5078 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add test_urlProperty to tst_loadUrl.qml testcase.Adam Kallai2014-04-094-4/+93
| | | | | | Change-Id: Ia6b866ed52511b92cf7a176f9018c24a31c2ffc0 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Get rid of the BackingStore rendering pathJocelyn Turcotte2014-04-083-15/+3
| | | | | | | | | Now that the widgets view is also using the delegated renderer, there are no supported configuration that use the BackingStore rendering path, itself on the way of deprecation in Chromium. Change-Id: I4ab889f6a7c65e8447c259faf2c7a98b88c1acf5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Render the widgets view using the scene graph into a QOpenGLWidgetJocelyn Turcotte2014-04-086-1/+23
| | | | | | | | | | | | | | | This means that widgets application now need to setup the GL context sharing as well. QWebEngineWidgets::initialize() must be called, which has the same effect as QWebEngine::initialize(). The QtWebEngineWidgets now depends on the QtWebEngine module to make this happen. Since QOpenGLWidget is only available in Qt 5.3, this patch also disables the webenginewidgets module completely when building using Qt 5.2. Change-Id: I0e99a779d1eb080f2ccf5a338ff0763ad64e6eba Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Revert part of the RenderWidgetHostViewQtDelegate refactoringJocelyn Turcotte2014-04-081-1/+0
| | | | | | | | | | | This reverts parts of commit 9c198939be1ef064d1a2430a4b9991f2fe16f359. This does keeps the popup fixes and removes support for QWebEnginePage::setViewportSize and QWebEnginePage::render until we can evaluate the needs vs the cost of such feature. Change-Id: I1b55b751d463717b1462393ea8cd353422f8fdbb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add tst_loadFail.qml testPeter Varga2014-04-032-0/+70
| | | | | | | | Test has been ported from QtWebkit and checks whether the error domain is correct when LoadFailStatus is sent. Change-Id: I456119ea1f5d74e1ed3c6e4fece72597f1306a71 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix iconChanged signal and add favIconLoad QML testSzabolcs David2014-04-016-0/+128
| | | | | | | | | | If WebContentsDelegateQt::DidUpdateFaviconURL was not called after a page load, we need to reset the favicon URL. We can use the navigation entries to store favicon related information. Change-Id: I7bcfbd46c176fabce319eba32c379a293f8ebba6 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Centralize OpenGL initializationSimon Hausmann2014-03-314-15/+6
| | | | | | | | | | We now require the user to use QWebEngine::initialize() in main (preferably) and print out an error message if this wasn't set up accordingly. This limits the use of private scene graph API to inside QWebEngine and offers public API for users of the API. Change-Id: I787c176a85ab7784dbc8787d9876960b4872959e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Implement QWebEngineHistoryItem::lastVisitedJocelyn Turcotte2014-03-311-0/+7
| | | | | | Change-Id: I105cb2a0a2479b146e2ab68db6d194ac2ac2d3f9 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Implement QWebEngineHistory serializationJocelyn Turcotte2014-03-311-0/+4
| | | | | | | | | | | | | | This does uses logic taken from Chromium's state save and restore code. The history version is incremented from the same method in QtWebKit in cases where the application would try loading a stream from a previous version using QtWebKit. In all cases where Chromium does a restore of a serialized history, it does so on a fresh WebContents instance, thus we must do the same and some of the initialization code has to be updated. Change-Id: I45abb052073bd44c9cb47bc2abcf4b558fe3dbbd Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix QQuickWebEngineForwardHistoryListModelPeter Varga2014-03-281-2/+12
| | | | | | | | | | The index calculation was wrong for the history items in the forward list model: model contained the current item too. Test has been added for check the previous and next element in the back and forward lists. Change-Id: I0e05881f05b67752e47b01236ffb9636d31a7dc2 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix a missing titleChanged signal on navigationJocelyn Turcotte2014-03-241-0/+5
| | | | | | | | | | | WebContentsView::SetPageTitle is only called when the Blink page updated its title. For navigations we have to listen for NavigationStateChanged. Also update the history test to check this case. Change-Id: Ia89c61b32913d647a63b2fb9a4cdf3f6867c4f0c Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Base load signals on Blink loader eventsJocelyn Turcotte2014-03-212-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | This mainly remove the use of the LoadingStateChanged callback, which is tied to DidStartLoading and DidStopLoading. Those signals are handled from the browser process side, also wrapping the time where the render process is initialized. We can't rely on those signals for loadStarted, but afterward rely on the Blink loader for loadFinished. We must use the same source for both. Instead only rely on Blink callbacks ultimately related to network events. This gives us a behavior closer to QtWebKit. The major compromise that this forces us to to accept is that loadStarted is now triggered asynchronously. This will basically break anything expecting loadStarted to be emitted synchronously from the load method. This also adjust autotests to get a few more passing. Initial-patch-by: Pierre Rossi <pierre.rossi@digia.com> Change-Id: Ib6c0170df891d1b7f8ed4dc1d483985523e267dc Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add Quick's navigationHistoryPeter Varga2014-03-203-0/+157
| | | | | | | | Add QQuickWebEngineHistory and list models providing API for the quick's navigationHistory. Change-Id: Ia86c94b120cc5d0b4757fc62386fc7a0dcb3e341 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix QOpenGLContext scene graph declaration in the QtQuick autotestsAdam Kallai2014-03-101-3/+4
| | | | | Change-Id: Ia3e588bcdfd5c0dd094418fa77d5dc67b1e66b9c Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fixing QQuickWebEngineView.loadingChanged public API test caseAdam Kallai2014-02-252-3/+3
| | | | | | | | | Rename QQuickWebEngineView.loadingStateChanged signal name to QQuickWebEngineView.loadingChanged. Change-Id: I0e01034f7b2eea57f5211ff0d8258d9f27d278f0 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* QtQuick: add runJavaScript.Pierre Rossi2014-02-193-1/+84
| | | | | | | | | | | Much like the widgets version. This should be helpful to start testing QWebChannel integration. Includes a very basic autotest that checks both approaches (with or without callback) through the view's title property. Change-Id: Id9c3e3736f36d53cecf1dd52e8811c4b921dcf08 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Build fix for public API testSzabolcs David2014-02-182-2/+3
| | | | | | | | Patch by Jocelyn Turcotte This fixes the inclusion of private headers. Change-Id: I490336ac30571bf292d88e2747102c75027b8dc6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add public API test to Quick API.Szabolcs David2014-02-173-0/+223
| | | | | | | | | | | | This test checks the compatibility of WebEngineView and QtWebKit's WebView. (The differences are marked as expected failure.) The QQuickWebEngineNavigationRequest class has not been implemented yet. Change-Id: Ie03d605b06d141c6ca352ae1cd5c6a38f4c80039 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fixup QtQuick autotests with scene graph usagePierre Rossi2014-02-142-0/+7
| | | | | | Change-Id: Ib49ac987af9fd6af32708048613fc5e6442bb73f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Implement QWebEnginePage::findTextJocelyn Turcotte2014-02-132-5/+40
| | | | | | | | | | | | | | | | | | | A few changes to the API: - Return the success result asynchronously. - FindWrapsAroundDocument and HighlightAllOccurrences are enabled by defaults and cannot be disabled. - Found text isn't updating the selection on the page like QtWebKit did, but triggers a separate state not available. A find count and current index could be exposed, but isn't in this case to keep the API delta lower. This also adds the possibility to pass bool results through the CallbackDirectory and add a new tst_QWebEnginePage::findTextResult test since the old test relied on the selection to be updated when the searched text is found. Change-Id: I8189b5aea8d832df183c6c1ae03e3f08198a9c45 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Implement QWebEnginePage::selectedTextJocelyn Turcotte2014-02-131-4/+4
| | | | | Change-Id: Idebde8da0befbea7ccc5942de1e09fcc61ce16d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Adjust some widget auto test expectationsJocelyn Turcotte2014-02-122-1/+15
| | | | | | | | | | More need to be adjusted, but this is a first step. Also move the QSKIP form tst_QWebEngineFrame::loadInSignalHandlers to its _data method to avoid seeing the skip message for every entry. Change-Id: If8d17fd992cb12a4a35cf036f80431e0cab3bb2f Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix flakiness in tests related to load signals being received while spinning ↵Jocelyn Turcotte2014-02-121-25/+24
| | | | | | | | | | | | | | | the event loop Since our sync wrappers spin an event loop, tests that assuming that load signals would only be triggered in the next waitForSignal can fail. Replace ::waitForSignal calls with QTRY_COMPARE/VERIFY on the QSignalSpy::count() instead to support the case where the signal was already emitted before starting the wait. Change-Id: I18246dc643a5280ebfd0b5099af10b10cf6845fe Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add the Sync suffix to testing sync wrapperJocelyn Turcotte2014-02-124-15/+15
| | | | | Change-Id: I0c6594a9758edc97f658717388c20f9e79be0f70 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Implement QWebEnginePage::requestedUrlJocelyn Turcotte2014-02-121-26/+2
| | | | | Change-Id: I6accd8fd40ad72041770439aa6a7aa59ba904418 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix tst_QWebEngineFrame::baseUrlJocelyn Turcotte2014-02-122-17/+22
| | | | | | | | | | | Update tests to check that we can keep the same functionality by querying document.baseURI through runJavaScript instead of implementing QWebEnginePage::baseUrl. This also removes QWebEnginePage::baseUrl from the header. Change-Id: I549e57d3986e22986438f8a23e469bbd220633b7 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Implement loadHtml function for QQuickWebEngineViewSzabolcs David2014-02-112-0/+62
| | | | | | | | Implement unreachableUrl support for WebContentsAdapter::setContent and add loadProgressAfterLoadHtml QML test case. Change-Id: I2d0d7834cbbf8f508de4fa9cb72240f2ac6ebf83 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Quick: Support reparentingArvid Nilsson2014-01-311-6/+0
| | | | | | | | | | | | | | | | | To support reparenting, we make the compositing surface independent of the window by using gfx::TEXTURE_TRANSPORT. We also need to be able to keep frame data across window changes so we can reconstruct the QSGNode tree in a new context, so extract that data into DelegatedFrameNodeData class. Any context-specific data is still stored in DelegatedFrameNode. Also hook up window changes to WebContents::WasShown/Hidden for Quick. Remove checking of Qt isVisible state, this mechanism is used to sync Chromium with Qt, not the other way around. WasShown/Hidden is orthogonal to Show/Hide, and can use different triggers. However for Widgets it probably makes sense to hook both up to widget visibility. Change-Id: I1ef4b50cd61b8e54b791e03f0b41929c42fec8bf Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Disable test discovery from the build systemJocelyn Turcotte2014-01-312-2/+6
| | | | | | | | | | CONFIG += testcase enables make check and the CI test planner to find and execute tests. Since our tests aren't 100% passing yet, disable them for now. Change-Id: I0dbafa7f6d6176979b28249b0642905611d791c2 Reviewed-by: Arvid Nilsson <anilsson@blackberry.com> Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Make the QWebEngineFrame tests passPierre Rossi2014-01-301-22/+24
| | | | | | | | | The unskipped ones that is. This highlights some behavior changes, notably the fact that loadFinished now fires as many times as there were loads initiated. Change-Id: I75665cdf06f4692fbeccb5227aa056e598038748 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* WebPage: Implement javaScriptConsoleMessagePierre Rossi2014-01-301-5/+3
| | | | | | | And unskip the corresponding autotest. Change-Id: Ida2dcee38b261b2ba4ad0c5c016f5510ed1590a4 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix tst_QWebEnginePage's use of evaluateJavaScriptPierre Rossi2014-01-302-129/+128
| | | | | | | Mostly speculative autotest adjustments due to lacking features Change-Id: I5b0cfa8fb586ae4531327c21d03b064d9c307d06 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add loadIgnoreEmptyUrl test case to loadUrl QML test.Szabolcs David2014-01-281-0/+50
| | | | | Change-Id: I56c78aa7e60194888123d372c6dbbb60624856c5 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add loadUrl QML test with stopStatus test case.Szabolcs David2014-01-282-0/+72
| | | | | | | Fix the webEngineView.stop() function in the WebContentsAdapter. Change-Id: I82c5000fb3cbc5aff59dd0c4c7c86ca7755a6329 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Get rid of tr1/functionalJocelyn Turcotte2014-01-272-15/+19
| | | | | | | | | | This header requires rtti in libstdc++ on Mac, which we can't recommend since Qt itself is usually built without rtti. Replace its uses with simpler hand-made template functors. Change-Id: Ic020dcceaf262f77d92b31a8318a513fa200428d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add properties QML test.Szabolcs David2014-01-272-0/+68
| | | | | Change-Id: I55fcbd7958f6dbc51c119133ee631fc2ccad1152 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add loadProgressSignal QML test.Szabolcs David2014-01-242-0/+74
| | | | | Change-Id: I785bbcd81061228d437fd7334809c9b85ab18f38 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add loadProgress QML test.Szabolcs David2014-01-243-0/+70
| | | | | Change-Id: I3989f114520900246fa78f7f6bb6068be398ee63 Reviewed-by: Andras Becsi <andras.becsi@digia.com>