diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-08-11 10:18:08 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-08-14 11:42:09 +0200 |
commit | 1ec53868363c41a4f08ca2660638da532eb56b10 (patch) | |
tree | ac982148b467a63e7d1ceb2a7f943c3f3f5bf8d0 /tests | |
parent | 49b94b14d3da42f945f6d49a3288c3ede5b98d36 (diff) | |
parent | 59e35e033b8c8327db5b3fdbfb5d6ecee48a4405 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Includes sha1 bump of src/3rdparty to head of 58-based.
Change-Id: I37743c3979c1b6fb21f71eab7048e82f7aa5d78b
Diffstat (limited to 'tests')
3 files changed, 22 insertions, 8 deletions
diff --git a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp index 3d44efa6a..2afaf03a3 100644 --- a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp +++ b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/tst_qquickwebenginedefaultsurfaceformat.cpp @@ -110,6 +110,9 @@ QUrl tst_QQuickWebEngineDefaultSurfaceFormat::urlFromTestPath(const char *localF void tst_QQuickWebEngineDefaultSurfaceFormat::customDefaultSurfaceFormat() { +#if !defined(Q_OS_MACOSX) + QSKIP("OpenGL Core Profile is currently only supported on macOS."); +#endif // Setting a new default QSurfaceFormat with a core OpenGL profile, before // app instantiation should succeed, without abort() being called. int argc = 1; diff --git a/tests/auto/widgets/qwebenginedefaultsurfaceformat/tst_qwebenginedefaultsurfaceformat.cpp b/tests/auto/widgets/qwebenginedefaultsurfaceformat/tst_qwebenginedefaultsurfaceformat.cpp index 3757a7842..1e8cc74e2 100644 --- a/tests/auto/widgets/qwebenginedefaultsurfaceformat/tst_qwebenginedefaultsurfaceformat.cpp +++ b/tests/auto/widgets/qwebenginedefaultsurfaceformat/tst_qwebenginedefaultsurfaceformat.cpp @@ -51,8 +51,8 @@ private Q_SLOTS: void tst_QWebEngineDefaultSurfaceFormat::customDefaultSurfaceFormat() { -#if defined(Q_OS_WIN) - QSKIP("Crashes on Windows"); +#if !defined(Q_OS_MACOSX) + QSKIP("OpenGL Core Profile is currently only supported on macOS."); #endif // Setting a new default QSurfaceFormat with a core OpenGL profile before // app instantiation should succeed, without abort() being called. diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp index 0b49bd892..2ed461e57 100644 --- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp +++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp @@ -451,16 +451,25 @@ void tst_QWebEngineView::unhandledKeyEventPropagation() QTRY_COMPARE(parentWidget.releaseEvents.size(), 3); QCOMPARE(evaluateJavaScriptSync(webView.page(), "document.activeElement.id").toString(), QStringLiteral("second_div")); + // Focus the button and press 'y'. + evaluateJavaScriptSync(webView.page(), "document.getElementById('submit_button').focus()"); + QTRY_COMPARE(evaluateJavaScriptSync(webView.page(), "document.activeElement.id").toString(), QStringLiteral("submit_button")); + QTest::sendKeyEvent(QTest::Press, webView.focusProxy(), Qt::Key_Y, 'y', Qt::NoModifier); + QTest::sendKeyEvent(QTest::Release, webView.focusProxy(), Qt::Key_Y, 'y', Qt::NoModifier); + QTRY_COMPARE(parentWidget.releaseEvents.size(), 4); + // The page will consume the Tab key to change focus between elements while the arrow // keys won't be used. - QCOMPARE(parentWidget.pressEvents.size(), 2); + QCOMPARE(parentWidget.pressEvents.size(), 3); QCOMPARE(parentWidget.pressEvents[0].key(), (int)Qt::Key_Right); QCOMPARE(parentWidget.pressEvents[1].key(), (int)Qt::Key_Left); + QCOMPARE(parentWidget.pressEvents[2].key(), (int)Qt::Key_Y); // Key releases will all come back unconsumed. QCOMPARE(parentWidget.releaseEvents[0].key(), (int)Qt::Key_Right); QCOMPARE(parentWidget.releaseEvents[1].key(), (int)Qt::Key_Tab); QCOMPARE(parentWidget.releaseEvents[2].key(), (int)Qt::Key_Left); + QCOMPARE(parentWidget.releaseEvents[3].key(), (int)Qt::Key_Y); } void tst_QWebEngineView::horizontalScrollbarTest() @@ -2132,14 +2141,16 @@ void tst_QWebEngineView::imeCompositionQueryEvent() QObject *input = nullptr; QFETCH(QString, receiverObjectName); - if (receiverObjectName == "focusObject") + if (receiverObjectName == "focusObject") { + QTRY_VERIFY(qApp->focusObject()); input = qApp->focusObject(); - else if (receiverObjectName == "focusProxy") + } else if (receiverObjectName == "focusProxy") { + QTRY_VERIFY(view.focusProxy()); input = view.focusProxy(); - else if (receiverObjectName == "focusWidget") + } else if (receiverObjectName == "focusWidget") { + QTRY_VERIFY(view.focusWidget()); input = view.focusWidget(); - - QVERIFY(input); + } QInputMethodQueryEvent srrndTextQuery(Qt::ImSurroundingText); QInputMethodQueryEvent cursorPosQuery(Qt::ImCursorPosition); |