summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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 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>
* 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>
* Use the temporary zoom factor to set the zoom factorMichael Bruning2016-04-212-0/+46
| | | | | | | | | | | | | 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>
* Add tst_settings.qml QML test caseAdam Kallai2016-04-203-0/+131
| | | | | | | | | - Add test for localStorageEnabled setting. - Add test for javascriptEnabled setting. Change-Id: I7a67c24bdf76409148e88500d9a7a092f7896493 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michael Brüning <michael.bruning@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>
* Un-blacklist qwebengineaccessibility autotestJoerg Bornemann2016-04-051-6/+0
| | | | | | | The test passes now. Change-Id: Ifc96c995036759d554938dbbc80ca05a5680d496 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Blacklist tst_QQuickWebEngineView::transparentWebEngineViewsJoerg Bornemann2016-03-311-0/+2
| | | | | | | | This test is failing on 32 bit Windows. Unfortunately, we couldn't reproduce the failure locally yet. Blacklist the test for now. Change-Id: I7bdbc52033ccc0ed16ccf934418cc56a7783f88b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Purge sRGB chunks from PNGs in test.Edward Welbourne2016-03-301-0/+0
| | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce -force Change-Id: I0fe8ea5a1c89d5c9c0dce765607e55ae9e9cf9fd Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Move loadVisuallyCommitted signal to the test support APISzabolcs David2016-03-253-3/+25
| | | | | Change-Id: I877bbd8bc5c710370f135a27bcd7f0f7c95a7292 Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* Blacklist test_geoPermissionRequest on Windows as well.Michael Bruning2016-03-071-0/+1
| | | | | Change-Id: I94aa72517dfedc22d9100b85e4d66dbf67bb3207 Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* Enable qmltests in CIJoerg Bornemann2016-03-014-8/+22
| | | | | | | | Blacklist failing tests. Stabilize some tests. Change-Id: I9fba81fb70f5b358108ef6935e363297e2658f79 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-5/+6
| | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I1d1b38dd5f78d8a949bab7f9a4643a2430657458 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Enable QtQuick inspectorserver test in CIJoerg Bornemann2016-02-252-1/+5
| | | | | Change-Id: I7c5f59a48688ca73889605ef5850ebedf43782de Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Enable WebEngineView tests in CIJoerg Bornemann2016-02-241-1/+0
| | | | | | Change-Id: I6534d36279feffb66eb6a897ed31d4b013b39691 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Enable qquickwebenginedefaultsurfaceformat test in CIJoerg Bornemann2016-02-221-1/+0
| | | | | Change-Id: Ia0dcc45a3b63da49b82cd4f018979df43e847273 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Enable quick/publicapi test in CIJoerg Bornemann2016-02-222-2/+2
| | | | | | | Also, update the API list. Change-Id: Ib21feb823ecf58c071316f796a7e251c9f99bff4 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Prepare separate enabling of QtQuick autotestsJoerg Bornemann2016-02-227-3/+7
| | | | | Change-Id: I330de920c339e31725d123eadf5dcc4227dd500f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>