diff options
author | Liang Qi <liang.qi@qt.io> | 2017-09-20 11:38:52 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-09-20 11:38:52 +0200 |
commit | 20ebb685e0fef048e56ed19403575634ce4b3435 (patch) | |
tree | 6ad6fedfbe4d361e40a0307f1f0cdc39044b53b6 /tests | |
parent | e1f89e15cf00420bd77ac16a867a1cadc9b942fc (diff) | |
parent | 3cb09edd71745edda4bbe8de3a6d7ad8e4ea5f58 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I76bfc271efcf75c75bf38f4bf58503e1d2a00839
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/client/client/tst_client.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp index 0c9c007a2..8acddfbe7 100644 --- a/tests/auto/client/client/tst_client.cpp +++ b/tests/auto/client/client/tst_client.cpp @@ -142,6 +142,7 @@ private slots: void backingStore(); void touchDrag(); void mouseDrag(); + void dontCrashOnMultipleCommits(); private: MockCompositor *compositor; @@ -333,6 +334,32 @@ void tst_WaylandClient::mouseDrag() QTRY_VERIFY(window.dragStarted); } +void tst_WaylandClient::dontCrashOnMultipleCommits() +{ + auto window = new TestWindow(); + window->show(); + + QRect rect(QPoint(), window->size()); + + QBackingStore backingStore(window); + backingStore.resize(rect.size()); + backingStore.beginPaint(rect); + QPainter p(backingStore.paintDevice()); + p.fillRect(rect, Qt::magenta); + p.end(); + backingStore.endPaint(); + + backingStore.flush(rect); + backingStore.flush(rect); + backingStore.flush(rect); + + compositor->processWaylandEvents(); + + delete window; + + QTRY_VERIFY(!compositor->surface()); +} + int main(int argc, char **argv) { setenv("XDG_RUNTIME_DIR", ".", 1); |