summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | Blacklist getUserMediaRequest on WindowsAllan Sandfeld Jensen2016-03-051-0/+3
| | | | | | | | | | | | | | | | It fails occasionally on the CI. Change-Id: I684f78785568cd78c3d817133dbc5795e7d61f0e Task-number: QTBUG-51652 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Skip crashing test on windowsAllan Sandfeld Jensen2016-03-021-0/+3
| | | | | | | | | | | | | | | | | | This test crashes on the CI system on Windows, and needs to be skipped until we have fixed the issue. Task-number: QTBUG-51608 Change-Id: Icc11fe062626f58ea32f06b332074af16e146b7d Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Move printToPDF to pageAllan Sandfeld Jensen2016-02-252-19/+17
| | | | | | | | | | | | | | | | | | The API needs nothing from view and view just forwards it to the page anyway. This is an page level API, this also makes it work without being shown. Change-Id: I3b8555ab472ec2c7632db3655bcc31925fcfa001 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Skip flaky HTTP cache test casesSzabolcs David2016-02-251-0/+5
| | | | | | | | | | Change-Id: I1602bd5f7f63c1f7f438a2eab00b9bb69f3fd1a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge "Merge dev into 5.7" into refs/staging/5.7Oswald Buddenhagen2016-02-231-22/+14
|\ \
| * \ Merge dev into 5.7Oswald Buddenhagen2016-02-171-22/+14
| |\ \ | | | | | | | | | | | | Change-Id: I43d4811120b551ae9c2619dedb2099b7e7796660
| | * | Fix iconUrl getter and changed signalAllan Sandfeld Jensen2016-02-121-22/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should only emit iconUrlChanged when iconUrl changes, and the return value of iconUrl should match the value of the last emitted change. Change-Id: I70f4d6a11b96d83278dddc4d85e1c78ca82bf5cb Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | | | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-02-202-1/+35
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| Change-Id: If884b8b8bc087a6a726476b49cdb48a0efaa173e
| * | Fix double LoadFinished on URL errorsAllan Sandfeld Jensen2016-02-102-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Add rudimentary printing API and add it to example.Michael Bruning2016-02-164-7/+52
| |/ |/| | | | | | | Change-Id: I48141d07e9744bb21d64a5c8724579cb469ba35c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-109-20/+275
|\| | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp tests/auto/widgets/widgets.pro Change-Id: Id9444359ed2e35d469331db96a355c9ea2d095d5
| * Stabilize failed load sub-test of urlSchemeHandlerAllan Sandfeld Jensen2016-02-051-3/+3
| | | | | | | | | | | | | | | | | | | | When a failed load is replaced by an error-page we currently get two loadFinished signals. So disable error-pages to make the test of failed load simpler. Change-Id: I3baaf0f5a06c5e755695d6540316287a860e0d5f Task-number: QTBUG-50752 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * OS X: Fix crash when setting a custom default QSurfaceFormat.Alexandru Croitor2016-02-048-0/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting a new default QSurfaceFormat after QtWebEngineCore::initialize() is called, might lead to a crash. This happens when the new surface format has a different OpenGL profile, compared to the profile created by web engine in the RenderWidgetHostViewQtDelegateWidget constructor. The default constructed QSurfaceFormat has an OpenGL Compatibility profile. Inside the Cocoa platform plugin when a new shared OpenGL context is created, it fails to initialize the new context because of the difference in profiles, and thus ultimately creates an unshared context, which leads to a crash. Fix consists in using the shared context QSurfaceFormat in the RenderWidgetHostViewQtDelegateWidget constructor, and also printing a fatal warning to notify the developer only to set the new QSurfaceFormat before the application instance is declared. Bottom line, if the QSurfaceFormat OpenGL profile has to be changed, it should be done before QtWebEngineCore::initialize() is called. Doing so after initialize() is called, will lead to a crash. Change-Id: I8a07211b592143d736b001556b944d4759802396 Task-number: QTBUG-50665 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
| * Stabilize tst_QWebEngineProfile::urlSchemeHandlers some moreJoerg Bornemann2016-02-041-0/+2
| | | | | | | | | | | | | | | | | | Work around QTBUG-50752 in URL scheme handler test. Triggering the failing load makes subsequent calls to toPlainTextSync unreliable. Change-Id: I370d59b935b186fa4e3be3097ee921802f951720 Task-number: QTBUG-50752 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Stabilize tst_QWebEngineProfile::urlSchemeHandlersJoerg Bornemann2016-02-041-13/+21
| | | | | | | | | | | | | | | | Sometimes the emission of loadFinished wasn't caught. Use a QTRY_VERIFY-like function to synchronously load a page. Change-Id: Ib260a126c0cff7f254c97b1cd89f49b806010235 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Use fictional schemes in URL scheme handler testJoerg Bornemann2016-02-041-7/+7
| | | | | | | | | | | | | | Avoid the usage of mailto. It might get forwarded to QDesktopServices. Change-Id: I2e8c889e8b0107b11c22c182a64685bc5ac16aae Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-02-044-9/+171
|\| | | | | | | Change-Id: I0bb971f01ee1e02da768f336680c8ec0254ab2b0
| * 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>
| * Fix crash on exit for view-owned QWebEngineUrlSchemeHandler objectsJoerg Bornemann2016-01-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For view-owned URL scheme handlers the destructor would remove the handler and then trigger URLRequestContextGetterQt::generateStorage. This would access the browser context from the IO thread while it already has been destroyed on the browser thread. Increment the ref count for the browser context before every call of generateStorage, and decrement it when generateStorage is finished. Task-number: QTBUG-50160 Change-Id: Id8b1505891ec56e93bf9d47f33bb8bc3304eb55a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Stabilize tst_QQuickWebEngineViewGraphicsJoerg Bornemann2016-01-241-3/+4
| | | | | | | | | | | | | | | | Fix a race condition where loadVisuallyCommitted was emitted before the QSignalSpy in waitForSignal could be connected. Change-Id: I7fcb9e3b423430405daf99c588ae8b70645333a1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Stabilize tst_QQuickWebEngineViewJoerg Bornemann2016-01-221-6/+26
| | | | | | | | | | | | | | | | Remove the 200 ms wait and instead try to grab the window contents repeatedly until a certain condition is met. Change-Id: I96dd720ef41ced9bdb48772939d25dd957081c33 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Fix deadlock on QWebEngineUrlRequestJob::failJoerg Bornemann2016-01-221-0/+23
| | | | | | | | | | | | | | | | | | | | | | URLRequestCustomJob::notifyFailure calls NotifyStartError(status), which in turn will result in a call to URLRequestCustomJob::Kill. We must release the lock of m_mutex before calling NotifyStartError, otherwise m_mutex.lock() will wait forever in Kill. Change-Id: I319e45049766c2192dfc46a91b352b92ec677bc6 Task-number: QTBUG-50160 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Add autotest for URL scheme handlersJoerg Bornemann2016-01-191-0/+75
| | | | | | | | | | Change-Id: I372366afce46703b9960ef2a8e5f575eaedb2514 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add FaviconManager to corePeter Varga2016-02-0327-30/+634
| | | | | | | | | | | | | | | | | | The new icon manager uses the WebContents::DownloadImage() API for downloading icons. It proposes the best quality among the available favicons via the iconChanged signal. Change-Id: I66a014365b6f6560ff34d40ee870aee84e4e70e4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-02-0154-1260/+608
| | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & tests are licensed under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header (in those files which will be under GPL 3 with exceptions) Change-Id: I59fcbb8cd1ca42b1a5ef96577bcb35ea0af01b71 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Extend HttpCacheType with NoCache optionSzabolcs David2016-01-271-0/+33
| | | | | | | | | | | | | | | | | | Add option to disable cache with passing NULL as cache backend. It behaves the same way as using HttpCache::set_mode(DISABLE), but saves some memory without instantiating backend factory. Change-Id: I1565cc773eda21a6bc73eebe14ab8046252a7755 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-184-41/+28
|\| | | | | | | Change-Id: I038f3544785862f3a2e2f35b8fab0b163e75d542
| * Remove FilterRequest from qwebenginecookiestoreMichal Klocek2016-01-152-15/+1
| | | | | | | | | | | | | | | | | | | | OnCanSetCookie and OnCanGetCookies should both be mapped to API. Since the other call is missing (filter cookies which should be send) remove existing one from 5.6 Change-Id: I4f42c4a1fee6add7a5efffaf4c38877a1f35ce61 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Remove callback functions from qwebenginecookiestoreMichal Klocek2016-01-151-25/+19
| | | | | | | | | | | | | | | | | | | | Remove all callback api calls, rename getAllCookies to loadCookies, update documentation. New function name reflects the fact the cookieAdded signal is always emitted when cookies are loaded from the store. Change-Id: Iab7bb04871c7396d2e23306a10084d425426a19f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Fix tst_QQuickWebEngineViewGraphics::showHideShow for OS XJoerg Bornemann2016-01-131-1/+8
| | | | | | | | | | | | | | | | | | Defer the TestView::exposeChanged signal. On OS X exposeEvent is called directly by view->show(). Thus exposeChanged was emitted before signalSpy.wait() was called and the check on wait consequently failed. Change-Id: Ie318f8ddc0d1bcc35a14c73e615798b3e164739c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add API to set WebChannel on isolated worldAllan Sandfeld Jensen2016-01-154-1/+488
| | | | | | | | | | | | | | | | | | | | | | Make it possible to set a web-channel so that it can only be accessed by private scripts. Pulls in needed API extension in 3rdparty. Task-number: QTBUG-50318 Change-Id: I61bcce5c318dffe0a406ee8cddf31f58a021c22c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-1211-59/+87
|\| | | | | | | Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
| * 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_QQuickWebEngineViewGraphics::showHideShowJoerg Bornemann2015-12-211-3/+3
| | | | | | | | | | | | | | Increase wait timeouts to let the test pass under heavy conditions. Change-Id: I412d5d6a33c33ce698e15a487355c5a5e51a9905 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Stabilize test_urlPropertyv5.6.0-beta1Allan Sandfeld Jensen2015-12-141-0/+2
| | | | | | | | | | | | | | | | | | | | Pulls in Chromium patches that fixes crashes in the test, and add a missing waitForLoadSucceeded, that otherwise might cause the next test to fail. Task-number: QTBUG-48031 Change-Id: I4844aee0ccf159e50de955f3b3da704160a4a0f5 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Make QQuickWebEngineProfile publicKai Koehne2015-12-122-11/+5
| | | | | | | | | | | | | | | | | | Make QQuickWebEngineProfile a publicly exported class. This allows users to set up and manipulate the profile from C++, and removes the ugly hack needed to access the cookie store. Change-Id: I99e1a8c2cb99d9d1a14e1c78bec5948ba1282fb3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Build qmltests only if QML testsupport API is availableJoerg Bornemann2015-12-111-1/+2
| | | | | | | | | | Change-Id: Id54356024f60e5f877271b29895912e2bf0cb84f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Fix path issues tst_QQuickWebEngineViewJoerg Bornemann2015-12-111-25/+36
| | | | | | | | | | | | | | | | | | Compare URLs, not paths. This saves us a bunch of conversions and fixes the test on Windows. Change-Id: Iaf91e7be2b015545bb7b2b1141bc316f85e629ea Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Update tests/auto/quick/publicapiJoerg Bornemann2015-12-111-1/+5
| | | | | | | | | | Change-Id: Ia40857762cffb8e9fc47b55e3f9e41a177a6fa26 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>
| * Stabilize tst_download.qmlJoerg Bornemann2015-12-101-4/+8
| | | | | | | | | | | | | | | | | | Connect to WebEngineViewDownloadItem.stateChanged to collect state changes. This makes sure that state changes from tests that ran before do not interfere with the current test. Change-Id: I360ac325711bf041f82375b3714a9cfe7a42398c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * enable tests/auto/widgetsJoerg Bornemann2015-12-073-3/+12
| | | | | | | | | | | | | | 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>
* | Add methods for running javascript in isolated worldsAllan Sandfeld Jensen2016-01-082-0/+9
| | | | | | | | | | | | | | | | We exposed javascript worlds for user-scripts, this adds variants of runJavaScript that can access those worlds. Change-Id: I5a0b40b863b543cd364c902d0a84ae2c35e2a0b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add function to clear data from the cacheSzabolcs David2016-01-061-0/+40
|/ | | | | | | | | It marks the entries of the current cache backend for deletion and starts to remove them. Task-number: QTBUG-48177 Change-Id: I85ec25048ff5429976f1b2dcacd74666bdbe6624 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Change QWebEngineUrlRequestInterceptor::interceptRequest to void.Michael Bruning2015-12-021-5/+3
| | | | | | | | Now uses a flag in QWebEngineUrlRequestInfoPrivate to store if the interceptor actually changed the request. Change-Id: Idccbd1c15696e577ee69248e53b75ba6ec1c571c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Remove unneeded qWaits from tst_QWebEngineCookieStoreJoerg Bornemann2015-12-011-2/+0
| | | | | | | The issue why these waits were introduced is not valid anymore. Change-Id: Ie8d562ba1b27b8ddbf3b0dfd27c12904b0f6a20e Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Rename QWebEngineCookieStoreClient to QWebEngineCookieStoreMichal Klocek2015-12-018-25/+25
| | | | | Change-Id: I8f9a4c5c155a65ede24908799218fd867db0767c Reviewed-by: Joerg Bornemann <joerg.bornemann@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>