summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make url handling consistent in widget and quick APIPeter Varga2014-10-281-2/+0
| | | | | | | | 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>
* 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>
* Unskip the working tests in tst_qwebengineframe.cppSzabolcs David2014-10-031-24/+12
| | | | | Change-Id: I9db9bbfd106e8cf939108dbcadf27b7a43923662 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Skip tst_QWebEngineFrame::setUrlWithFragment API testSzabolcs David2014-09-241-0/+1
| | | | | Change-Id: I66b6cb593ed6fe7cc2e74737829991631606709f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@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>
* 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>
* 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 WebKit Bugzilla linksSzabolcs David2014-04-221-5/+5
| | | | | | | | 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>
* Replace uses of QWebEngineFrame with a security origin URLJocelyn Turcotte2014-04-151-2/+3
| | | | | | | | 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_QWebEngineFrame::setHtmlWithJSAlert test caseSzabolcs David2014-04-151-2/+1
| | | | | Change-Id: I27e6baa24cefabc29c44c76f3e9747ebafaa5078 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Render the widgets view using the scene graph into a QOpenGLWidgetJocelyn Turcotte2014-04-081-0/+6
| | | | | | | | | | | | | | | 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>
* Base load signals on Blink loader eventsJocelyn Turcotte2014-03-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Adjust some widget auto test expectationsJocelyn Turcotte2014-02-121-1/+11
| | | | | | | | | | 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-121-8/+8
| | | | | 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-121-17/+15
| | | | | | | | | | | 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>
* 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>
* Get rid of tr1/functionalJocelyn Turcotte2014-01-271-2/+2
| | | | | | | | | | 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>
* Clear callbacks with an empty value on page destructionJocelyn Turcotte2014-01-221-0/+17
| | | | | | | | | | | | | | | The current implementation offers no way to cancel async requests. This means that normal applications could easily allow callbacks to dereference a destroyed object unless they use a smart pointer within the callback function object. This patch will empty the pending callback list by calling each of them with an empty value. This will at least allow applications to cover the cases where the page is expected to have a shorter or equal lifetime than objects referenced in the callback. Change-Id: Ia9fc556b03f5d83f904a0ff4b05dc9e440ea488c Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Unskip and ajust tests using setHtml, setContent, toHtml and toPlainTextJocelyn Turcotte2014-01-221-37/+20
| | | | | | | | | | Replace direct calls of toHtml and toPlainText to use a blocking helper function that spins a QEventLoop to wait for the async result. This should work fine for tests where the event loop is less polluted by other events that could cause code reentrancy through stacked stacks. Change-Id: Ic46a06a9abad782a39a620ceecdc51c3bbb6b5a1 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Make tst_QWebEngineFrame compileJocelyn Turcotte2014-01-221-271/+387
| | | | | | | | Even though this code now test QWebEnginePage, keep it in its original file to allow easier tracking of differences with QtWebkit. Change-Id: Id001c2fcba0ee4a756fe5f32d8002e15368a191b Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Implement QWebEnginePage::toHtml and toPlainTextJocelyn Turcotte2014-01-221-0/+7
| | | | | | | | | | | | | | | | Those methods are now made asynchronous and need to be given a callback to handle the result. Update the code in the browser and fancybrowser examples using std::bind when using C++11 or tr1::bind with C++03 (which should be available with compilers on platforms that we support). Add a (currently failing) earlyToHtml test to make sure that an empty page doesn't crash because of a possibly incomplete attachment of the QtRenderViewObserver. Change-Id: I3ab7cb6f25b91b584dd80df5e4e9ad1e3214348e Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Turn on to run all widgets tests by make check. Move widgets test to tests/auto.Adam Kallai2013-10-141-0/+1569
Change-Id: If3617d86ea44f665a44a54b6ba57935b69220a9e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>