From 41ac06747e00b9acd3c45e0e4a1dcdc860726903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 10 Jun 2016 15:46:40 +0200 Subject: [PATCH] [autotest] Verify the static getter on PlasmaShellSurface Extends the test to verify that the PlasmaShellSurface::get returns the PlasmaShellSurface for a given Surface. --- src/wayland/autotests/client/test_plasmashell.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wayland/autotests/client/test_plasmashell.cpp b/src/wayland/autotests/client/test_plasmashell.cpp index 2507e9f18f..8e8e966d3a 100644 --- a/src/wayland/autotests/client/test_plasmashell.cpp +++ b/src/wayland/autotests/client/test_plasmashell.cpp @@ -165,7 +165,11 @@ void TestPlasmaShell::testRole() // create the surface QScopedPointer s(m_compositor->createSurface()); + // no PlasmaShellSurface for the Surface yet yet + QVERIFY(!PlasmaShellSurface::get(s.data())); QScopedPointer ps(m_plasmaShell->createSurface(s.data())); + // now we should have a PlasmaShellSurface for + QCOMPARE(PlasmaShellSurface::get(s.data()), ps.data()); // try to create another PlasmaShellSurface for the same Surface, should return from cache QCOMPARE(m_plasmaShell->createSurface(s.data()), ps.data());