summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-01-18 18:04:03 +0100
committerLiang Qi <liang.qi@qt.io>2018-01-18 18:04:03 +0100
commit06230d22488796d92ea130e985d1e0ee2ed05199 (patch)
tree85829879b207a1a53db04e877ec2ae66294009db /tests
parent8ab1765b0f9640eb410864971cb4336adc7b30ab (diff)
parent6793a0a907f3aa92f8f8bd5448505c152d0e3a3d (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/client/client/tst_client.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index 3897bd3b1..aed601d8a 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -35,6 +35,8 @@
#include <QMimeData>
#include <QPixmap>
#include <QDrag>
+#include <QWindow>
+#include <QOpenGLWindow>
#include <QtTest/QtTest>
#include <QtWaylandClient/private/qwaylandintegration_p.h>
@@ -112,6 +114,25 @@ public:
QPoint mousePressPos;
};
+class TestGlWindow : public QOpenGLWindow
+{
+ Q_OBJECT
+
+public:
+ TestGlWindow();
+
+protected:
+ void paintGL() override;
+};
+
+TestGlWindow::TestGlWindow()
+{}
+
+void TestGlWindow::paintGL()
+{
+ glClear(GL_COLOR_BUFFER_BIT);
+}
+
class tst_WaylandClient : public QObject
{
Q_OBJECT
@@ -149,6 +170,7 @@ private slots:
void dontCrashOnMultipleCommits();
void hiddenTransientParent();
void hiddenPopupParent();
+ void glWindow();
private:
MockCompositor *compositor;
@@ -409,6 +431,21 @@ void tst_WaylandClient::hiddenPopupParent()
QTRY_VERIFY(compositor->surface());
}
+void tst_WaylandClient::glWindow()
+{
+ QSKIP("Skipping GL tests, as not supported by all CI systems: See https://bugreports.qt.io/browse/QTBUG-65802");
+
+ QScopedPointer<TestGlWindow> testWindow(new TestGlWindow);
+ testWindow->show();
+ QSharedPointer<MockSurface> surface;
+ QTRY_VERIFY(surface = compositor->surface());
+
+ //confirm we don't crash when we delete an already hidden GL window
+ //QTBUG-65553
+ testWindow->setVisible(false);
+ QTRY_VERIFY(!compositor->surface());
+}
+
int main(int argc, char **argv)
{
setenv("XDG_RUNTIME_DIR", ".", 1);