From 37fbb49bf0afa0641476b4ee4af6b66e3f1d2625 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 16 Nov 2018 12:28:26 +0000 Subject: [PATCH] [wayland] Fix maximised test The existing test after the client was maximised sent a buffer with the same size. Naturally correctly didn't generate a geometry change. --- autotests/integration/maximize_test.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/autotests/integration/maximize_test.cpp b/autotests/integration/maximize_test.cpp index 226099c56a..b76f3a8043 100644 --- a/autotests/integration/maximize_test.cpp +++ b/autotests/integration/maximize_test.cpp @@ -122,8 +122,9 @@ void TestMaximized::testMaximizedPassedToDeco() QVERIFY(geometryShapeChangedSpy.isValid()); workspace()->slotWindowMaximize(); - - Test::render(surface.data(), QSize(100, 50), Qt::red); + QVERIFY(sizeChangedSpy.wait()); + QCOMPARE(sizeChangedSpy.first().first().toSize(), QSize(1280, 1024 - decoration->borderTop())); + Test::render(surface.data(), sizeChangedSpy.first().first().toSize(), Qt::red); QVERIFY(geometryShapeChangedSpy.wait()); QCOMPARE(geometryShapeChangedSpy.count(), 2); QCOMPARE(client->maximizeMode(), MaximizeMode::MaximizeFull); @@ -135,9 +136,6 @@ void TestMaximized::testMaximizedPassedToDeco() QCOMPARE(decoration->borderRight(), 0); QVERIFY(decoration->borderTop() != 0); - QCOMPARE(sizeChangedSpy.count(), 1); - QCOMPARE(sizeChangedSpy.first().first().toSize(), QSize(1280, 1024 - decoration->borderTop())); - // now unmaximize again workspace()->slotWindowMaximize();