Fix tests for boot2qt
The tests for boot2qt were disabled with commit
28063805bf
. 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>
This commit is contained in:
parent
c4e5208dd1
commit
adb0f009de
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue