Skip tests that fail on platforms that don't implement grabWindow

Replace QEXPECT_FAIL with QSKIP so that we can fix the offscreen plugin,
and then re-enable tests that pass without having to orchestrate with
the dependency updates.

Pick-to: 6.3
Change-Id: Ifdf7fe85a5005f30d2edcba958ff0e9c6c9000b2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Volker Hilsheimer 2022-01-22 09:58:34 +01:00
parent fdc2608c31
commit a3924b9846
4 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@ void tst_qquickrectangle::color()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QImage image = view.grabWindow();
QVERIFY(image.pixel(0,0) == QColor("#020202").rgba());

View File

@ -1056,7 +1056,7 @@ void tst_qquicktext::hAlignImplicitWidth()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
// Left Align
QImage image = view.grabWindow();

View File

@ -947,7 +947,7 @@ void tst_qquicktextedit::hAlignVisual()
{
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort);
QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
// Left Align
QImage image = view.grabWindow();

View File

@ -133,7 +133,7 @@ void tst_qquickninepatchimage::ninePatch()
if ((QGuiApplication::platformName() == QLatin1String("offscreen"))
|| (QGuiApplication::platformName() == QLatin1String("minimal")))
QEXPECT_FAIL("", "Grabbing does not work on offscreen/minimal platforms", Abort);
QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms");
QCOMPARE(ninePatchImageGrab, generatedImage);
}