summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineprofile
Commit message (Collapse)AuthorAgeFilesLines
* Skip tst_QWebEngineProfile::qtbug_71895 if network load failsJüri Valdmann2019-05-031-2/+3
| | | | | Change-Id: I0daf14c4ec31dfb867d9d7f531b9fdc6f7244e1b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-04-301-3/+3
|\ | | | | | | Change-Id: I051052a70a6e764202a90d77fc1a0f73688d3704
| * Profile test: fix buffer for request job being deleted on main threadKirill Burtsev2019-04-231-2/+1
| | | | | | | | | | Change-Id: I894946ce7c9dcf4f787c5c928e3737cd80a7dc52 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * Profile test: fix waiting for load finished signalKirill Burtsev2019-04-111-1/+2
| | | | | | | | | | Change-Id: I797b596b73d62e420592ef9e96601c35ea7ecad6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Remove our last uses of Q_DECL_OVERRIDE and Q_NULLPTRAllan Sandfeld Jensen2019-04-031-3/+3
| | | | | | | | | | Change-Id: I8806a3fb466006f14cf92f17510cdea8b50e8345 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix disabling http cache after 73-basedPeter Varga2019-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BrowserDataRemoverImpl::Remove() indirectly calls TransportSecurityState::DeleteAllDynamicDataSince() which notifies by a callback about the finished deletion since: https://chromium-review.googlesource.com/c/chromium/src/+/1335939 During the deletion the ProfileIODataQt::requestStorageGeneration() should not be called because it deletes net::TransporSecurityPersister which background_runner is where the finished deletion callback is scheduled. Change-Id: I4782d701f706ed7c8e104a78ba84a27183166fa4 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-02-151-0/+16
|\| | | | | | | Change-Id: I0822fb8a10945a252cfd1aacaf0b6d9902cc8831
| * Fix recreation of cookie store and channel id serviceMichal Klocek2019-01-091-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As more things gets mojofy and become services, we can not simply delete parts of storage context. Therefore regenerate whole storage in case of cookie store, cache, agent settings updates. URLRequestContextStorage guards correct order of destruction. This change aims to fix some crashes during cookie store and http cache recreation when ChannelIDService gets deleted. Depending on timing this ends with different stacktraces like in cookie store manager or during ssl handshake. We still keep network delegate outside of storage context to prevent crashes when url requests end their life due to (forced) request cancellation in cancelAllUrlRequests(). Please note this is just band-aid patch, and introduction of 'profile builder' will be a proper fix. Fixes: QTBUG-71895 Change-Id: If33a7af3ebba2632ea33f32d913e1c21a4534817 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add HTTP request headers to custom URL schemes (reland)Allan Sandfeld Jensen2019-01-301-0/+61
|/ | | | | | | | | | Makes it possible to read extra headers added to the request. This reverts commit 9cbe64c54dee8451794e29f4357ccfac6d883e6b. Task-number: QTBUG-69844 Change-Id: I5c5e0c06655d5f764227fdc97fdb0c2a189f532d Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-211-0/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.js examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc mkspecs/features/platform.prf src/3rdparty src/core/media_capture_devices_dispatcher.cpp src/core/net/url_request_context_getter_qt.cpp src/core/net/url_request_context_getter_qt.h src/core/web_contents_adapter.cpp Change-Id: I467133ba455b1f85f6bb61793794c31cb1094541
| * QWebEngineUrlRequestJob: QUrl("null") for unique initiator originsJüri Valdmann2018-07-201-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | The empty URL is used both for representing a missing origin (browser-initiated navigation request) and a unique/opaque origin. This is problematic since the security implications are very different in these two cases: browser-initiated requests usually should have high security clearance, while requests from unique origins should be restricted. Task-number: QTBUG-69372 Change-Id: Iff73fd1c9a29f1c5c281a8945536333081ff2d6b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Revert "Add HTTP request headers to custom URL schemes"Michal Klocek2018-08-092-63/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a5bdc6236ad52586579a9a3da6a059835ed60761 and 04355f4d6f311adebfc354b094a5f79c6327e86f. CI still crashes on tst_QWebEngineProfile::urlSchemeHandler tests, issue is not reproducible locally and it will take time to investigate. Task-number: QTBUG-69844 Change-Id: I7ddb6a32383400d553fe692c24effb6dfb7b6102 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Unblock ci integrationsMichal Klocek2018-08-081-0/+2
| | | | | | | | | | | | | | | | | | | | It seems that change a5bdc6236a introduced test urlSchemeHandlerRequestHeaders, which triggers some thread safety issue with interceptor, skip the test for now. Task-number: QTBUG-69844 Change-Id: I2d0dc4b72f22a963eef1aa059e1520aeb9da9d8f Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Add HTTP request headers to custom URL schemesAllan Sandfeld Jensen2018-08-031-0/+61
| | | | | | | | | | | | | | Makes it possible to read extra headers added to the request. Change-Id: I4af0ba8a5b28488b8f12a2cff29807575c24f026 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Try to fix assert in tst_QWebEngineProfile::urlSchemeHandlerStreamingAllan Sandfeld Jensen2018-07-301-7/+1
|/ | | | | | | | The mutex could potentially be destroyed while still being locked in closed(). Instead let the job delete the device. Change-Id: I0aeb678b73a45e247ebb2690851f1c13f6d71307 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Correct documentation for storage pathsMichal Klocek2018-02-121-10/+44
| | | | | | | | Udpdate docs and profile unit test for storage paths. Change-Id: I646a33571ad8458af4efcddf310489cdde3a4606 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix thread synchronization issue in tst_qwebengineprofileJüri Valdmann2018-01-241-2/+6
| | | | | Change-Id: I7b7c4a6501387b1d657e55f222908365990b8fef Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2018-01-081-5/+15
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/api/qwebengineurlrequestjob.cpp src/core/browser_context_adapter.cpp src/core/renderer/user_resource_controller.cpp src/core/web_engine_context.cpp src/webenginewidgets/api/qwebenginepage.cpp Change-Id: I5278e5e22e1776d42975fc94d70ff8ca4f81fb9a
| * Doc: QWebEngineUrlRequestJob: mention when to delete the deviceDavid Faure2017-12-201-5/+15
| | | | | | | | | | | | | | | | | | | | It's used from another thread, so it shouldn't be deleted immediately, and it's not deleted by the QtWebEngine code, so tell people to do it themselves at the right time. Change-Id: I54786be320f5fe82f144e7b1c2e6137260d9ceab Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Stop test crashing on some windows CIAllan Sandfeld Jensen2017-11-221-1/+7
| | | | | | | | | | | | | | | | Giving replies their job as parent is unstable currently. Change-Id: Ifd4598b199c8409c15b13e362df383b11051fb7a Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Support streaming QIODevices in custom URL scheme handlersAllan Sandfeld Jensen2017-10-251-0/+85
|/ | | | | | | | We didn't handle the case where the QIODevice does not have all the data available all the time. Change-Id: I6aea8ed48ba9ed297efb907b8f6e5c5fc2a18abd Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix crash on changing persistent storage pathAllan Sandfeld Jensen2016-08-211-0/+20
| | | | | | | | | | The deletion of HttpNetworkSession references the old HttpServerProperties so delete the session before we replace the properties. Task-number: QTBUG-55322 Change-Id: I420dc0523fda44423adaa5f4f0fa1df9ade4b584 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-08-021-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/resources/resources.gyp src/webengine/doc/src/qtwebengine-overview.qdoc src/webenginewidgets/api/qwebenginepage.cpp src/webenginewidgets/api/qwebenginescriptcollection.cpp src/webenginewidgets/api/qwebenginescriptcollection_p.h tests/auto/widgets/qwebenginepage/BLACKLIST And readded newly in 5.6 enabled tests to the BLACKLIST. Change-Id: I4ab1fc54ebfaaf940df81b0d8d6bdd15cae8b7c4
| * Prevent a crash after having downloaded a fileAndy Shaw2016-07-261-0/+13
| | | | | | | | | | | | | | | | | | | | | | Since the profile owns the QWebEngineDownloadItem then it is likely that it will still be around when the QWebEngineProfile is deleted. As the QWebEngineDownloadItem is a child of the QWebEngineProfile then it will try to delete it when deleting the QWebEngineProfile which means it cannot trigger a function call into QWebEngineProfilePrivate. Change-Id: I51077a7857fb49a6708224a9e9942d17de6f6778 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Better handle failure on read in custom url handlersAllan Sandfeld Jensen2016-05-131-1/+53
| | | | | | | | | | | | | | | | | | Chromium 49 expects url request failures to be reported as a response to either start or on read. So we should report failures during read and make sure we can handle QIODevice calling fail on the job. Change-Id: Id8f619d3cb6f187c99da580c6923130a95ca91ee Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-04-251-0/+57
|\| | | | | | | Change-Id: I329397621f19ba3890be5daf44a6bb2d668ad2d8
| * Do not access browser-context to read user-agent or accept languageAllan Sandfeld Jensen2016-04-211-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | Switches HttpUserAgentSettingsQt to reading local string that lives on the IO thread, instead of accessing a pointer that may be deleted. Also adds a test and fixes updating accept-language of already initialized WebContents. Change-Id: Iff4e3bd1ac40482a92bed50c3f703ed8b974b0ad Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
| * Fix user-agent override works when setting contentAllan Sandfeld Jensen2016-04-191-0/+29
| | | | | | | | | | | | | | | | Adds test for user-agent override and fixes the override so that it also works when loading with content instead of URLs. Change-Id: I3f61b1d91b7b0908e35216722054168d1c514a87 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Skip flaky HTTP cache test casesSzabolcs David2016-02-251-0/+5
| | | | | | | | | | Change-Id: I1602bd5f7f63c1f7f438a2eab00b9bb69f3fd1a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-02-201-1/+2
|\| | | | | | | Change-Id: If884b8b8bc087a6a726476b49cdb48a0efaa173e
| * Fix double LoadFinished on URL errorsAllan Sandfeld Jensen2016-02-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-101-20/+30
|\| | | | | | | | | | | | | | | 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>
| * 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-041-0/+105
|\| | | | | | | Change-Id: I0bb971f01ee1e02da768f336680c8ec0254ab2b0
| * 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>
| * 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>
* | Updated license headersJani Heikkinen2016-02-011-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* Set off-the-record to true as documentedAllan Sandfeld Jensen2015-10-132-0/+79
The API had no way of setting off-the-record, because the constructor meant for it set it to false. The patch fixes the constructor and adds basic API tests for the QWebEngineProfiles. Change-Id: I407eb4a4b0524b6c4eb944d17d744620dd9db6fb Task-number: QTBUG-48724 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>