[autotest] Extend test for PlasmaShellSurface on server side

Verifies that the shell is returned correctly and the static getter
for wl_resource works as expected.
This commit is contained in:
Martin Gräßlin 2016-06-13 13:31:00 +02:00
parent ee5e92fe14
commit 8e28a6c1c2

View file

@ -187,6 +187,9 @@ void TestPlasmaShell::testRole()
QVERIFY(sps); QVERIFY(sps);
QVERIFY(sps->surface()); QVERIFY(sps->surface());
QCOMPARE(sps->surface(), surfaceCreatedSpy.first().first().value<SurfaceInterface*>()); QCOMPARE(sps->surface(), surfaceCreatedSpy.first().first().value<SurfaceInterface*>());
QCOMPARE(sps->shell(), m_plasmaShellInterface);
QCOMPARE(PlasmaShellSurfaceInterface::get(sps->resource()), sps);
QVERIFY(!PlasmaShellSurfaceInterface::get(nullptr));
// default role should be normal // default role should be normal
QCOMPARE(sps->role(), PlasmaShellSurfaceInterface::Role::Normal); QCOMPARE(sps->role(), PlasmaShellSurfaceInterface::Role::Normal);