summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Blacklist doNotSendMouseKeyboardEventsWhenDisabled on WindowsAllan Sandfeld Jensen2016-11-231-0/+2
| | | | | | | | It fails occasionally and blocks integration Task-number: QTBUG-57117 Change-Id: I7266ccf4fe7e0905dc31e5e7c085be6f90d0aa03 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix flaky tst_QQuickWebEngineView::loadProgress testAlexandru Croitor2016-09-301-3/+2
| | | | | Change-Id: I102bda62bfaa16a8c9ff4c4929e6b5a055de3e25 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* 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>
* Blacklist showHideShow test on LinuxAllan Sandfeld Jensen2016-07-151-1/+1
| | | | | | | | It was already skipped on OS X and Windows, but it is also unrealiable on Linux. Change-Id: Ie443c97595979a3cc9d34991a5b0b3f9c69f136c Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Propagate the view's screen coordinates on global position changeJoerg Bornemann2016-07-122-0/+116
| | | | | | | | | | | | | | | Suppose having a QWebEngineView as one of many child widgets in a layout. Resize some child widget such that the position of the QWebEngineView changes (without changing the position of the top-level window). Chromium must be informed of the changed global position, otherwise popups will be opened at the old position. Also see commit 7f941a34, which originally introduced the coordinate propagation for top-level window moves. Task-number: QTBUG-51244 Change-Id: Ieb372e8d7554700d5e8d1e2148ab778094ea3878 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove tst_QWebEnginePage::localURLSchemesJoerg Bornemann2016-07-121-29/+0
| | | | | | | | This was a rudimentary test case for QWebSecurityOrigin. This API was replaced in QtWebEngine. Change-Id: If41a7f48906a6b49d5a83c72c69dbfd125804537 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Enable qquickwebengineviewgraphics test in CIJoerg Bornemann2016-07-084-10/+8
| | | | | | | | | This test requires the QtQuick test support API. Exclude it from build if the API isn't available. Blacklist one problematic test case. Remove the - now superfluous - ENABLE_QML_TESTSUPPORT_API checks. Change-Id: I0b36de182628969e1185d685fa098d6140ae8d9c Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Clear internal selected text when searchingAlexandru Croitor2016-07-011-18/+13
| | | | | | | | | | | | | Previously if a selection was made on a web page, and afterwards a find operation is executed, the selection in the web page would be cleared, but the call to selectedText() would still return the old selection. Make sure selectedText() is always cleared, when starting a find operation, as well as when stopping one. Change-Id: If78f0fa1dd836a52184015e749ef5a84b9f784cd Task-number: QTBUG-54071 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix inputEventForwardingDisabledWhenActiveFocusOnPressDisabled test.Alexandru Croitor2016-06-241-7/+24
| | | | | | | | | | | | | Test was flaky due to a couple of reasons, mainly: 1) Size of event recording widget did not match web view size, which led to some events not being caught. 2) There were some bogus QHoverEvents being sent by QQuickWindow whenever a QQuickItem is repositioned (can happen when using a tiling window manager on a Linux machine). 3) Usual timing issues. Change-Id: Idd9d4fa6bd65095f98125196025e0ad560025348 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Stabilize FilePicker QML autotestsAllan Sandfeld Jensen2016-06-161-12/+6
| | | | | | | | Switch from timed wait to using tryCompare. Task-number: QTBUG-53777 Change-Id: I845fb8ee7b84641bd23314794512960634423d54 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix translation of multiple pressed mouse buttonsAllan Sandfeld Jensen2016-06-141-0/+36
| | | | | | | | | | | | We were reporting any mouse button event where the left mouse button was held as a left mouse button event. We should instead separate the button changed and the ones held. Also adds test of the translation. Change-Id: I1139d6615d54a036dfe843fdb1d1c90b23b467b5 Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix tst_QWebEnginePage::setHtmlWithImageResource testAllan Sandfeld Jensen2016-06-102-11/+8
| | | | | | | | | | | We have changed qrc resources so that they can be accessed from any security origin. To have a test of local resources we would need a file URL. Task-number: QTBUG-53153 Change-Id: I22b730f07785eacd365e3ec591f5dcbd09b6fc84 Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Skip geolocation testAllan Sandfeld Jensen2016-06-101-2/+1
| | | | | | | This test is unreliable in 5.6. We have a working version in 5.7. Change-Id: I1e4e2abe896e479d8960a3a3b990d80d41b844f1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove tests for the javaScriptWindowObjectCleared signalJoerg Bornemann2016-05-301-45/+0
| | | | | | | | We have no equivalent of QWebFrame::javaScriptWindowObjectCleared and won't need it. Change-Id: I998e0412256887414c125df9ab994216dee22dc9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix event forwarding when activeFocusOnPress is false.Alexandru Croitor2016-05-262-1/+109
| | | | | | | | | | | | | | | | | | | | | | | If a QQuickWebEngineView does not have focus, and activeFocusOnPress is set to false, a user can still partially interact with the view. For instance hovering the mouse over a link would change the cursor, a link can be clicked to go to a different page. Clicking on a text input field would focus the text field, but entering characters will not be possible, because the view does not have QtQuick keyboard focus, and clicking does not give the focus (because activeFocusOnPress is set to false) and this leads to confusing behavior. Thus the fix is to make sure no mouse / keyboard events are forwarded to Chromium if the view has no focus, and activeFocusOnPress is set to false, in order to maintain a more user-friendly behavior. Manually forcing the focus via some user-provided method that calls forceActiveFocus() would allow further proper interaction. Change-Id: I72c3ff69438972b9a93ee2d415fa1d4b44b86cd9 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Disabled WebEngine views should not receive focus.Alexandru Croitor2016-05-262-0/+62
| | | | | | | | | | | | | | Currently if a QWebEngineView or a QQuickWebEngineView is disabled using setEnabled(false), after loading a web page, the views are automatically focused, and a user might see a blinking caret in an html input for example, even though the user can't interact with it. Fix consists in not calling the Focus() method whenever a view is disabled. Change-Id: I1014fb5898a5ddf01a4e9b14c3eaf5d4006e5131 Task-number: QTBUG-53159 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* Stop disabled QWebEngineView widget from processing input events.Alexandru Croitor2016-05-261-0/+120
| | | | | | | | | | | If a QWebEngineView is disabled, input events are still forwarded to Chromium, thus allowing the user to interact with a web page. Fix consists in stopping the forwarding of input events in the generic event handler, just like QWidget::event() does. Change-Id: Ie822d1f3d640840569a282223d76749686cf3419 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.6.1' into 5.6" into ↵Liang Qi2016-05-191-0/+3
|\ | | | | | | refs/staging/5.6
| * 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 pasting images to web pagesJoerg Bornemann2016-05-193-0/+62
|/ | | | | | | | | WebKit expects pasted images to have the MIME type image/png (see code and comment in DataObjectItem::getAsFile()). Task-number: QTBUG-53409 Change-Id: I2b0c1244d309687ad190db26c5b00718ed0c4258 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>