summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineview
Commit message (Collapse)AuthorAgeFilesLines
...
* | Adaptations for Chromium 67Allan Sandfeld Jensen2018-06-261-4/+3
| | | | | | | | | | Change-Id: I13cedba56012f74651a044d6fa8f0957487bf3eb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | RWHVQDW: Remove QGuiApplication::sync() callJüri Valdmann2018-06-041-51/+46
|/ | | | | | | | It is a workaround that is no longer needed. Task-number: QTBUG-64501 Change-Id: I51b7ad0a24cf80ee0c90be0c8c463ceeeee4239e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove hardcoded size from QWebEngineView::sizeHint()Szabolcs David2018-05-091-0/+42
| | | | | | | | | | | | 800x600 takes more space than expected when building a layout which contains QWebEngineView. Now this function does exactly the same as QWidget::sizeHint(). Add an auto test and update examples which were depending on this hardcoded size. Change-Id: I3b34b7d37cc99a8d6a49100d6c4b66b5b6a1c999 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix finishing IME compositionPeter Varga2018-04-261-0/+136
| | | | | | | | | | | | | Call RenderWidgetHostImpl::ImeCommitText() instead of RenderWidgetHostImpl::ImeFinishComposingText() to trigger the necessary JavaScript events on composing. This fixes IME composition (eg. for dead keys) on web pages which use custom JavaScript IME handler like facebook. Task-number: QTBUG-66046 Change-Id: Ibc177995ba6e85eca42ae333decacfe6e788ce41 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Avoid creating temporary blank WebContentsJüri Valdmann2018-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | - Avoid creating a blank WebContents for new QWebEnginePages only to replace it with a different blank WebContents moments later. This problem is already solved in QQuickWebEngineView by lazy initialization, therefore the patch moves this lazy initialization into WebContentsAdapter itself so that it can be applied to both QQuickWebEngineView and QWebEnginePage. - Try to delay WebContents creation until the first navigation so that we have enough information available to pick the right initial SiteInstance when calling WebContents::Create. This is done by triggering WebContents creation from the first call to a WebContentsAdapter::load* method. - Use the SiteInstance from WebContentsDelegate::OpenURLFromTab. This method gets a SiteInstance pointer which we should give to WebContents::Create. Task-number: QTBUG-65561 Task-number: QTBUG-67163 Change-Id: Id7b351998adefb810cf27c61a1447b61d7f4c606 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Un-blacklist tst_QWebEngineView::mouseLeave auto testPeter Varga2018-03-262-4/+1
| | | | | | | | | Moving mouse cursor to (0, 0) by QTest::mouseMove() doesn't seem to work and the cursor doesn't leave the QWebEngineView. Change initial coordinates as a workaround. Change-Id: Iaad895c770a6edc5ed6e375f68b2b56196d84073 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
* Also blacklist microFocusCoordinates on OS X 10.11Allan Sandfeld Jensen2018-03-081-1/+1
| | | | | | | Also flaky there. Change-Id: I48a5b497de3b7cbbc1a71413db370777d0daa78f Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Blacklist tst_QWebEngineView::microFocusCoordinates on macOS 10.12Michael Brüning2018-03-061-0/+3
| | | | | | | | | It was failing consistently. Blacklist for now and fix as soon as possible. Task-number: QTBUG-66873 Change-Id: Iab314a3e650e7c20fae3ca74ff2db202c5d5fe7d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2018-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/webengine/api/qquickwebengineview_p_p.h src/webenginewidgets/api/qwebenginepage_p.h tests/auto/quick/qmltests/data/TestWebEngineView.qml Change-Id: Id2acc92e8d0364bdaaf5a63ea2d2cb9cd533ade3
| * Blacklist flaky test textSelectionOutOfInputField on all platformsAlexandru Croitor2017-12-181-1/+1
| | | | | | | | | | Change-Id: I685ee99eedfc47065ed01301943802d7b89ffa2a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-12-182-0/+96
|\| | | | | | | Change-Id: I9ddd2bdd830a862cd81dc1af5616d43e652a1c0e
| * Blacklist flaky textSelectionOutOfInputField test on WindowsAlexandru Croitor2017-12-151-0/+3
| | | | | | | | | | Change-Id: I32a92913f3dc80fc409069e624259eecc50c357b Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Blacklist flaky mouseLeave testAlexandru Croitor2017-12-151-0/+3
| | | | | | | | | | | | Task-number: QTBUG-65206 Change-Id: Idc85c71ff56cb24764625877c8f54c978661a044 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Add widget auto test for webUI URLsPeter Varga2017-12-021-0/+86
|/ | | | | | | | Most of them are unsupported but verify that loading them doesn't cause crash or assert. Change-Id: I81f219e8d56923dbe6df16f3412e384803808245 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Speculative stabilization of tst_QWebEngineView::emptyInputMethodEventPeter Varga2017-11-271-6/+5
| | | | | | | | | | Avoid false positive results by waiting for a value change when it is not expected to be changed and make sure the event is processed before check for unexpected change. Moreover, verify that the composition events are sent. Change-Id: Ie7a53237b90cda433502e7f376fbe2ae1964385d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Speculative stabilization of mouseLeave auto testsPeter Varga2017-11-231-1/+3
| | | | | | | | | | | | Occasionally the mouse pointer might be moved above the testDiv during the html load and this changes its text. This seems to happen on CI from time to time. Text of testDiv is expected to be empty in the beginning to make sure an explicit mouse move event changes its text. Change-Id: Ib8488b1e2dd7cc80b78cc40adecbf04c12dbec1b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-151-0/+54
|\ | | | | | | | | | | | | | | | | Conflicts: src/3rdparty tests/auto/quick/qmltests/qmltests.pro tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I2a1e3a83e29a1d6709f3e98fda3f7b4ab7ab297e
| * Notify Chromium about leaving viewPeter Varga2017-11-091-0/+53
| | | | | | | | | | | | | | | | Forward QEvent::Leave for Widget and QEvent::HoverLeave for Quick. Task-number: QTBUG-64265 Change-Id: Ide32768902956476d24b1d4115e305392b62feb3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Pass editor shortcuts to Chromium by ForwardKeyboardEventWithCommandsPeter Varga2017-11-032-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | Moreover, extend the list of supported editor shortcuts and stabilize the corresponding auto test. Task-number: QTBUG-54692 Task-number: QTBUG-54812 Task-number: QTBUG-54221 Task-number: QTBUG-59053 Change-Id: I4dd8230519639ea6e3340992dbb54a609ecfcd91 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix Qt::NoContextMenu policy handling in QWebEngineViewValentin Fokin2017-10-241-0/+63
| | | | | | | | | | | | | | Task-number: QTBUG-62345 Change-Id: I4846e15f007c6792ad02fc49179a6e30deafa4c7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Verify result of QTest::qWaitForWindowExposed() in auto testsPeter Varga2017-10-181-13/+13
| | | | | | | | | | Change-Id: I8e75d21853ac8f7681b20101e40597154bcaca2d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Disable IME on password inputPeter Varga2017-10-041-4/+23
| | | | | | | | | | | | Task-number: QTBUG-62433 Change-Id: Icdc3355ca9d1ec4fb25d512c56c19aca94ae8928 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2017-09-291-4/+4
|\| | | | | | | Change-Id: I7094e85a7770303a2ae30baccbc484c04f33600e
| * Speculative stabilization of tst_QWebEngineView::emptyInputMethodEventPeter Varga2017-09-211-4/+4
| | | | | | | | | | Change-Id: I5dd8c3251587c706f1fd3b90f77e4ac03c2fba97 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations for Chromium 60Alexandru Croitor2017-09-113-22/+14
| | | | | | | | | | | | Change-Id: I536258e22c2ec143f2fd3f1cbda229e0611b6af4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Make FocusOnNavigationEnabled setting disabled by defaultv5.10.0-alpha1Oleg Yadrov2017-09-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this setting was added in Qt 5.8, the behavior was that QWebEngineView/WebEngineView got the focus automatically. With the new setting added it is configurable, but it was left enabled for compatibility reasons. It would had to be changed at some point anyway: none of other QML items or widgets grab the focus after creation, so why would QWebEngineView/WebEngineView do? This patch also fixes a bug with the text cursor in WebView (the cursor was blinking as if WebView had the focus when it did not). [ChangeLog][Important Changes][QtWebEngine][General] focusOnNavigationEnabled setting which allows controlling whether a web view will receive focus on a navigation request is now disabled by default. Task-number: QTBUG-60152 Task-number: QTBUG-60149 Change-Id: I78dc9bb9ffc70bf06217952acd456b97651c5185 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add auto tests for MultipleMouseClickHelperPeter Varga2017-08-311-0/+95
| | | | | | | | | | | | | | | | | | | | | | Qt WebEngine implements a custom handler for multiple mouse clicks. These tests are intended to test whether the mouse click events are properly forwarded to the Chromium's RenderWidgetHost. Custom mouse click test functions have been also added for the custom mouse click handler. Change-Id: Ifdc7d09f5e0f0f76c37e137e5743482bf3fb8abb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devAllan Sandfeld Jensen2017-08-141-6/+17
|\| | | | | | | | | | | Includes sha1 bump of src/3rdparty to head of 58-based. Change-Id: I37743c3979c1b6fb21f71eab7048e82f7aa5d78b
| * Speculative stabilization of imeCompositionQueryEvent widget auto testPeter Varga2017-07-191-5/+7
| | | | | | | | | | | | | | | | Wait for receiver object to be set after show. Task-number: QTBUG-61816 Change-Id: I2eb62775d30b0f8f9ec3e76d60a924b56c811865 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix propagation of unhandled key press eventsJoerg Bornemann2017-07-141-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unhandled key presses for printable keys were not received by the parent widget anymore. This was a regression from 5.8.0. The propagation is suppressed if NativeWebKeyboardEvent::skip_in_browser is true. Commit 4501b9d8 accidentally removed the wrong skip_in_browser assignment. Task-number: QTBUG-61621 Change-Id: I7eafa1fac5fb9a7edc4af2bc1aac21c106264713 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Fix emitting selectionChanged signal for non-user text selection changePeter Varga2017-07-202-35/+60
|/ | | | | | | | | | | | | | | This fixes the case when the text selection is triggered by JavaScript. Text selection changes triggered by IME composition text replecement are ignored. Test has been added for mouse selection clipboard: non-user text selection should not update the clipboard. Pulls in Chromium changes: 3deea95 Update TextSelection for non-user initiated events Task-number: QTBUG-53134 Task-number: QTBUG-60381 Change-Id: Ib94f57a2aa61248fba75f595245fb388b9609b6c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix cancelling IME compositionPeter Varga2017-06-221-2/+26
| | | | | | Task-number: QTBUG-61429 Change-Id: I936f1c924ae8158a5243fdf20d12e6c5508b684a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Override shortcuts only when an HTML input field has focusJoerg Bornemann2017-06-082-9/+15
| | | | | | | | | | | | | | | | Otherwise an application shortcut like Shift+Delete would no longer work when webengine has focus (e.g. "delete mail" in KMail) This removes unconditional calls to editorActionForKeyEvent for ShortcutOverride event handling. We can remove those, because the key sequences that are checked by editorActionForKeyEvent are a subset of the key sequences checked by isCommonTextEditShortcut. This amends commit 3902b27e. Change-Id: I12a98368381edef36f11457c8b864d843efb871a Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add back widget auto tests for inputMethodQuery and inputMethodHintsPeter Varga2017-05-312-118/+117
| | | | | | Task-number: QTBUG-55766 Change-Id: Ic90eb7b9a211b09281ccbb3eae727e8a1c081b9a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix selectionChanged signal out of input fieldPeter Varga2017-05-171-2/+93
| | | | | | Task-number: QTBUG-60688 Change-Id: I6d0b78e6b8df54c40ae30d5f0909c631c440a9cd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Stabilize keyboardEvents auto testsPeter Varga2017-04-281-1/+1
| | | | | | | | The typeAheadTimeout is set to 1sec in Blink. Wait a bit more when selecting the next option in a HTML select element in auto tests. Change-Id: Ia3d9fde05b4d6cde9186aaa701ca48354ca74b4d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Override shortcuts in HTML input fieldsJoerg Bornemann2017-04-251-0/+58
| | | | | | | | | | | | | | | | | | | When users defined a single-letter short cut it was not possible to type this letter in HTML input fields. Fix this by accepting ShortcutOverride events whenever the web page is editing text. Use QInputControl::isCommonTextEditShortcut for Qt 5.9 and later. For the case where QtWebEngine is built against an older Qt a duplicated code path is used. Also, ensure users do not override web action short cuts. Task-number: QTBUG-59053 Change-Id: Ic26cf2a040a72b118273c6645c00b2913b995b0b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Blacklist tst_QWebEngineView::imeCompositionPeter Varga2017-04-241-0/+3
| | | | | | Task-number: QTBUG-60381 Change-Id: Ib0e7ac3e5d7c3a9cea453fee96b2c5984567aa99 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Disable setting background color in QInputMethodEventPeter Varga2017-04-211-0/+6
| | | | | | | | | | | | | IME managers may set background and foreground color of the composition string. Since there is no Chromium API for setting the foreground color, changing the background color to black may produce "black-on-black" text. Chromium locks the background color to transparent thus we do the same in this fix. Task-number: QTBUG-58362 Task-number: QTBUG-60031 Change-Id: I939c8aaaa847de191890d6924ba3c7652465f8a0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Handle QInputMethodQueryEvent forwarded by RWHVQDWPeter Varga2017-04-121-0/+80
| | | | | | Task-number: QTBUG-58362 Change-Id: I6c80c8063ccad97aa80aff8ee44aa10a899c5ff5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix text selection and input method queryPeter Varga2017-04-121-0/+385
| | | | | | | | | | | | | | | Instruct the render process to change the text selection if it was requested via an input method event. Raise the selectionChanged() signal when all the corresponding input method properties are set. Moreover, add back the remaining input method widget auto tests. The updated tests are moved to the QWebEngineView tests since the corresponding APIs (inputMethodQuery() and input event handling) are now available via the QWebEngineView's focus proxy (aka RWHV). Task-number: QTBUG-55766 Change-Id: Ia0022d5f38b31dd59b084ff42e4abc2780ae90ec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add back tst_QWebEngineView::horizontalScrollbarTest auto testPeter Varga2017-03-291-18/+19
| | | | | Change-Id: Iebe5ed3e93b5b39866910ad9b63d02b88d64c3b2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Unblacklist changeLocale auto testsPeter Varga2017-03-152-6/+3
| | | | | | | | | | Do the error message comparison with utf-8 enconding since the localized error messages are stored in utf-8 format (error_page_strings.grdp). This also stabilizes the test because it doesn't depend on the encoding used by the Chromium. Change-Id: I24addc1c18d5b4325f4c0270e675e02c3f4e0812 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Allan Sandfeld Jensen2017-03-042-0/+53
|\
| * Merge remote-tracking branch 'origin/5.8' into 5.9Allan Sandfeld Jensen2017-03-022-0/+53
| |\ | | | | | | | | | Change-Id: Iff6ab3c287c58d8ec84a1513460bfce5218e8a61
| | * Fix QWebEngineView::setFocus to properly set internal QQuickItem focusAlexandru Croitor2017-02-201-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The widgets object hierarchy related to focus goes like this: QWebEngineView's focus proxy is -> RenderWidgetHostViewQtDelegateWidget, which has an internal QQuickRootItem defined by QQuickWidget, and the child of the item is -> RenderWidgetHostViewQuickItem. Previously when QWebEngineView::setFocus was called, the focus was set on the RenderWidgetHostViewQtDelegateWidget and the QQuickRootItem, but not on the RenderWidgetHostViewQuickItem. This caused for e.g. an active HTML text input not receiving focus. Make sure the RenderWidgetHostViewQuickItem is marked to have focus within its root item, so that if the root item receives active focus, so will RenderWidgetHostViewQuickItem receive it. Task-number: QTBUG-58515 Change-Id: I175610e3dfebc03733aefe26c16f47096df8ff5b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * tests: blacklist tst_qwebengineview::changeLocale() on Windows and LinuxLiang Qi2017-02-171-0/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-58022 Change-Id: I433c3b02a82494d6066338dab7a5991fab05040c Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | | Rework change locale tests for 55-based ChromiumPeter Varga2017-03-031-23/+27
|/ / | | | | | | | | | | | | | | | | Error pages no longer have useful titles in Chromium 55. Test the error page content instead. Tests have been also stabilized. Task-number: QTBUG-58022 Change-Id: If5c3e2b1df2cb3ee8b48d651e6f19360fa484f17 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Rework unhandled key event propagation tests for 55-based ChromiumPeter Varga2017-03-011-16/+27
| | | | | | | | | | | | | | | | | | Since change https://codereview.chromium.org/2200833007 input elements are inappropriate for testing unconsumed key events. Test focus change on div elements instead. Change-Id: Ifa2f3e1bc9d6d9cb396fbad7caea907616d085b7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Update auto tests for Chromium 55Allan Sandfeld Jensen2017-03-011-0/+1
| | | | | | | | | | | | | | | | | | Load failures now have a Chromium side timeout of 10s so we need to wait longer than that. Additionally error-pages no longer have descriptive titles, so we can not rely on that in our tests any longer. Change-Id: I33ac8b9f1247403eb214f7260267edb887fe10d0 Reviewed-by: Michal Klocek <michal.klocek@qt.io>