summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp36
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp3
-rw-r--r--tests/auto/gui/kernel/qwindow/BLACKLIST1
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp2
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp3
-rw-r--r--tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp3
-rw-r--r--tests/auto/gui/text/qfont/BLACKLIST3
7 files changed, 38 insertions, 13 deletions
diff --git a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
index 36cf8ac8fd8..18fe43fbcea 100644
--- a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
+++ b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
@@ -35,6 +35,8 @@ private slots:
void write();
void icoMask_data();
void icoMask();
+ void origBitDepth_data();
+ void origBitDepth();
private:
QString m_IconPath;
@@ -354,6 +356,40 @@ void tst_QIcoImageFormat::icoMask()
QCOMPARE(inImage, outImage);
}
+void tst_QIcoImageFormat::origBitDepth_data()
+{
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QList<int>>("origBitDepths");
+
+ QTest::newRow("35FLOPPY") << "35FLOPPY.ICO" << QList<int>{4};
+ QTest::newRow("abcardWindow") << "abcardWindow.ico" << QList<int>{8};
+ QTest::newRow("AddPerf") << "AddPerfMon.ico" << QList<int>{4};
+ QTest::newRow("App") << "App.ico" << QList<int>{4};
+ QTest::newRow("Obj_N2_Internal_Mem") << "Obj_N2_Internal_Mem.ico" << QList<int>{4, 8, 32};
+ QTest::newRow("Qt") << "Qt.ico" << QList<int>{32};
+ QTest::newRow("semitransparent") << "semitransparent.ico" << QList<int>{4};
+ QTest::newRow("Status_Play") << "Status_Play.ico" << QList<int>{4, 8, 32};
+ QTest::newRow("TIMER01") << "TIMER01.ICO" << QList<int>{4};
+ QTest::newRow("trolltechlogo_tiny") << "trolltechlogo_tiny.ico" << QList<int>{8};
+ QTest::newRow("WORLD") << "WORLD.ico" << QList<int>{8, 4, 4};
+ QTest::newRow("yellow") << "yellow.cur" << QList<int>{32};
+}
+
+void tst_QIcoImageFormat::origBitDepth()
+{
+ QFETCH(QString, file);
+ QFETCH(QList<int>, origBitDepths);
+
+ QImage image;
+ QImageReader reader(m_IconPath + QLatin1String("/valid/") + file);
+
+ for (int depth : origBitDepths) {
+ reader.read(&image);
+ QCOMPARE(image.text("_q_icoOrigDepth").toInt(), depth);
+ reader.jumpToNextImage();
+ }
+}
+
QTEST_MAIN(tst_QIcoImageFormat)
#include "tst_qicoimageformat.moc"
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
index 6019261f792..06a1ffb2960 100644
--- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
+++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
@@ -26,9 +26,6 @@ private slots:
void tst_QOpenGLWindow::initTestCase()
{
-#if !QT_CONFIG(run_opengl_tests)
- QSKIP("Skip test as run-opengl-tests feature is off.");
-#endif
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
QSKIP("OpenGL is not supported on this platform.");
}
diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST
index a92d89c6123..4f994fb3059 100644
--- a/tests/auto/gui/kernel/qwindow/BLACKLIST
+++ b/tests/auto/gui/kernel/qwindow/BLACKLIST
@@ -25,6 +25,5 @@ android
windows-10
windows-11
android
-rhel
[windowExposedAfterReparent]
xcb ubuntu-24.04 # QTBUG-129023
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 1c8dd14eba4..66bb0fa84d8 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -11,6 +11,7 @@
#include <QtGui/QPainter>
#include <QTest>
+#include <QtTest/private/qtesthelpers_p.h>
#include <QSignalSpy>
#include <QEvent>
#include <QStyleHints>
@@ -1237,6 +1238,7 @@ void tst_QWindow::testInputEvents()
window.setGeometry(QRect(m_availableTopLeft + QPoint(80, 80), m_testWindowSize));
window.showNormal();
QTRY_VERIFY(window.isActive());
+ QVERIFY(QTestPrivate::ensurePositionTopLeft(&window));
QTest::keyClick(&window, Qt::Key_A, Qt::NoModifier);
QCoreApplication::processEvents();
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index b9b4c3aa11c..36ff1d1f2e9 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -185,9 +185,6 @@ static QSurface *createSurface(int surfaceClass)
void tst_QOpenGL::initTestCase()
{
-#if !QT_CONFIG(run_opengl_tests)
- QSKIP("Skip test as run-opengl-tests feature is off.");
-#endif
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
QSKIP("OpenGL is not supported on this platform.");
}
diff --git a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
index f597dac53d7..423f9419daf 100644
--- a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
+++ b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
@@ -139,9 +139,6 @@ static void dumpConfiguration(QTextStream &str)
void tst_QOpenGlConfig::initTestCase()
{
-#if !QT_CONFIG(run_opengl_tests)
- QSKIP("Skip test as run-opengl-tests feature is off.");
-#endif
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
QSKIP("OpenGL is not supported on this platform.");
}
diff --git a/tests/auto/gui/text/qfont/BLACKLIST b/tests/auto/gui/text/qfont/BLACKLIST
index 2d2440255ae..3f63b678bb5 100644
--- a/tests/auto/gui/text/qfont/BLACKLIST
+++ b/tests/auto/gui/text/qfont/BLACKLIST
@@ -1,12 +1,9 @@
[defaultFamily:cursive]
centos
b2qt
-rhel
[defaultFamily:fantasy]
centos
b2qt
-rhel
-
# QTBUG-130738
[familyNameWithCommaQuote:weird]
vxworks