diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-06-05 12:48:40 +0300 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-22 12:03:49 +0000 |
commit | adb0f009de9ddc603234913a316744d0f8ca417f (patch) | |
tree | e4aae43fe7ce0f17266509403d8f10999c3350ed /tests | |
parent | c4e5208dd17196fd6870bd8672cf68ff50873ad1 (diff) |
Fix tests for boot2qt
The tests for boot2qt were disabled with commit
28063805bf22b77a93f22a4289ca8afa9f1cb201. The tests can
be enabled since qtdeclarative now fallbacks to software
renderer if OpenGL is not supported.
Some tests involving mouse behavior and window grabbing
need to be skipped on minimal/offscreen platforms.
Task-number: QTBUG-60268
Change-Id: Ib468638df8d5001bf127dd17aee7dcfe38b11780
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/auto.pro | 6 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_combobox.qml | 6 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_tooltip.qml | 4 | ||||
-rw-r--r-- | tests/auto/cursor/tst_cursor.cpp | 5 | ||||
-rw-r--r-- | tests/auto/menu/tst_menu.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qquickmenubar/tst_qquickmenubar.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp | 4 |
7 files changed, 31 insertions, 6 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 87cda7dc..2f6dc9af 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -28,9 +28,3 @@ SUBDIRS += \ sanity \ snippets -# QTBUG-60268 -boot2qt: SUBDIRS -= applicationwindow calendar controls cursor \ - drawer focus font menu platform palette popup \ - qquickmaterialstyle qquickmaterialstyleconf \ - qquickuniversalstyle qquickuniversalstyleconf \ - snippets qquickmenubar qquickninepatchimage diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index 136c0830..dc146ba3 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -732,6 +732,9 @@ TestCase { compare(highlightedSpy.count, 0) mouseMove(content, content.width / 2 + 1, content.height / 2 + 1) compare(activatedSpy.count, 0) + if ((Qt.platform.pluginName === "offscreen") + || (Qt.platform.pluginName === "minimal")) + expectFail("", "Mouse highlighting not functional on offscreen/minimal platforms") compare(highlightedSpy.count, 1) mouseRelease(content) compare(activatedSpy.count, 1) @@ -1177,6 +1180,9 @@ TestCase { } function test_mouseHighlight() { + if ((Qt.platform.pluginName === "offscreen") + || (Qt.platform.pluginName === "minimal")) + skip("Mouse highlight not functional on offscreen/minimal platforms") var control = createTemporaryObject(comboBox, testCase, {model: 20}) verify(control) diff --git a/tests/auto/controls/data/tst_tooltip.qml b/tests/auto/controls/data/tst_tooltip.qml index c7973c69..1382655b 100644 --- a/tests/auto/controls/data/tst_tooltip.qml +++ b/tests/auto/controls/data/tst_tooltip.qml @@ -283,6 +283,10 @@ TestCase { } function test_activateShortcutWhileToolTipVisible() { + if ((Qt.platform.pluginName === "offscreen") + || (Qt.platform.pluginName === "minimal")) + skip("Mouse hoovering not functional on offscreen/minimal platforms") + var root = createTemporaryObject(buttonAndShortcutComponent, testCase) verify(root) diff --git a/tests/auto/cursor/tst_cursor.cpp b/tests/auto/cursor/tst_cursor.cpp index 6256112d..0f24a29e 100644 --- a/tests/auto/cursor/tst_cursor.cpp +++ b/tests/auto/cursor/tst_cursor.cpp @@ -184,6 +184,11 @@ void tst_cursor::scrollBar() const QPoint scrollBarPos(window->width() - scrollBar->width() / 2, window->height() / 2); QTest::mouseMove(window, scrollBarPos); + + if ((QGuiApplication::platformName() == QLatin1String("offscreen")) + || (QGuiApplication::platformName() == QLatin1String("minimal"))) + QEXPECT_FAIL("", "Active status behaves differently in offscreen/minimal platforms", Continue); + QVERIFY(scrollBar->isActive()); QCOMPARE(window->cursor().shape(), scrollBar->cursor().shape()); QCOMPARE(scrollBar->cursor().shape(), Qt::CursorShape::ArrowCursor); diff --git a/tests/auto/menu/tst_menu.cpp b/tests/auto/menu/tst_menu.cpp index 4e96dea4..4497c096 100644 --- a/tests/auto/menu/tst_menu.cpp +++ b/tests/auto/menu/tst_menu.cpp @@ -127,6 +127,10 @@ void tst_menu::count() void tst_menu::mouse() { + if ((QGuiApplication::platformName() == QLatin1String("offscreen")) + || (QGuiApplication::platformName() == QLatin1String("minimal"))) + QSKIP("Mouse hovering not functional on offscreen/minimal platforms"); + QQuickApplicationHelper helper(this, QLatin1String("applicationwindow.qml")); QQuickApplicationWindow *window = helper.appWindow; @@ -896,6 +900,10 @@ void tst_menu::subMenuMouse_data() void tst_menu::subMenuMouse() { + if ((QGuiApplication::platformName() == QLatin1String("offscreen")) + || (QGuiApplication::platformName() == QLatin1String("minimal"))) + QSKIP("Mouse hovering not functional on offscreen/minimal platforms"); + QFETCH(bool, cascade); QQuickApplicationHelper helper(this, QLatin1String("subMenus.qml")); diff --git a/tests/auto/qquickmenubar/tst_qquickmenubar.cpp b/tests/auto/qquickmenubar/tst_qquickmenubar.cpp index 932e13bc..19d67eac 100644 --- a/tests/auto/qquickmenubar/tst_qquickmenubar.cpp +++ b/tests/auto/qquickmenubar/tst_qquickmenubar.cpp @@ -77,6 +77,10 @@ void tst_qquickmenubar::delegate() void tst_qquickmenubar::mouse() { + if ((QGuiApplication::platformName() == QLatin1String("offscreen")) + || (QGuiApplication::platformName() == QLatin1String("minimal"))) + QSKIP("Mouse highlight not functional on offscreen/minimal platforms"); + QQmlApplicationEngine engine(testFileUrl("menubar.qml")); QScopedPointer<QQuickApplicationWindow> window(qobject_cast<QQuickApplicationWindow *>(engine.rootObjects().value(0))); diff --git a/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp b/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp index c7710199..b5dd7f2f 100644 --- a/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp +++ b/tests/auto/qquickninepatchimage/tst_qquickninepatchimage.cpp @@ -125,6 +125,10 @@ void tst_qquickninepatchimage::ninePatch() // Bottom-left painter.drawImage(0, generatedImage.height() - blueRect.height(), blueRect); + if ((QGuiApplication::platformName() == QLatin1String("offscreen")) + || (QGuiApplication::platformName() == QLatin1String("minimal"))) + QEXPECT_FAIL("", "Grabbing does not work on offscreen/minimal platforms", Abort); + QCOMPARE(ninePatchImageGrab, generatedImage); } |