summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-03-21 08:59:26 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-03-21 08:59:26 +0100
commitcc920b4cddc170a7442d8fdfb53076c208a3d71e (patch)
treee4757cffe420bd3c61dda1d369b452a0fac9eff7 /tests/auto/gui/kernel
parentc8c8cc790a315710b0dae2282dc32e3472e107ee (diff)
parentfc8fd508165c8e4dcfe0da397b63cf99f15178e3 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
index 8ffd1bb9b4..a971450ee8 100644
--- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
+++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
@@ -42,6 +42,7 @@ private slots:
void initTestCase();
void create();
void basic();
+ void resize();
void painter();
void partial_data();
void partial();
@@ -115,8 +116,7 @@ void tst_QOpenGLWindow::basic()
// Check that the virtuals are invoked.
QCOMPARE(w.initCount, 1);
- int resCount = w.resizeCount;
- QVERIFY(resCount >= 1);
+ QVERIFY(w.resizeCount >= 1);
QVERIFY(w.paintCount >= 1);
// Check that something has been drawn;
@@ -132,6 +132,27 @@ void tst_QOpenGLWindow::basic()
QCOMPARE(v[2], GLint(w.width() * w.devicePixelRatio()));
QCOMPARE(v[3], GLint(w.height() * w.devicePixelRatio()));
w.doneCurrent();
+}
+
+static bool isPlatformWayland()
+{
+ return QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive);
+}
+
+void tst_QOpenGLWindow::resize()
+{
+ if (isPlatformWayland())
+ QSKIP("Wayland: Crashes on Intel Mesa due to a driver bug (QTBUG-66848).");
+
+ Window w;
+ w.reset();
+ w.resize(640, 480);
+ w.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
+
+ // Check that the virtuals are invoked.
+ int resCount = w.resizeCount;
+ QVERIFY(resCount >= 1);
// Check that a future resize triggers resizeGL.
w.resize(800, 600);