Commit 3805f212 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

autotests: Remove XdgShellSurfaceType enum

Currently, it has only one item - XdgShellStable.
parent 81a9b824
......@@ -47,7 +47,6 @@ private Q_SLOTS:
void cleanup();
void testGetWindowInfoInvalidUuid();
void testGetWindowInfoXdgShellClient_data();
void testGetWindowInfoXdgShellClient();
void testGetWindowInfoX11Client();
};
......@@ -97,21 +96,13 @@ void TestDbusInterface::testGetWindowInfoInvalidUuid()
QVERIFY(windowData.empty());
}
void TestDbusInterface::testGetWindowInfoXdgShellClient_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
void TestDbusInterface::testGetWindowInfoXdgShellClient()
{
QSignalSpy clientAddedSpy(workspace(), &Workspace::clientAdded);
QVERIFY(clientAddedSpy.isValid());
QScopedPointer<Surface> surface(Test::createSurface());
QFETCH(Test::XdgShellSurfaceType, type);
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data()));
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
shellSurface->setAppId(QByteArrayLiteral("org.kde.foo"));
shellSurface->setTitle(QStringLiteral("Test window"));
......
......@@ -39,7 +39,6 @@ private Q_SLOTS:
void topLevelTest();
void testX11Client();
void testX11Unmanaged();
void testWaylandClient_data();
void testWaylandClient();
void testInternalWindow();
void testClosingDebugConsole();
......@@ -284,13 +283,6 @@ void DebugConsoleTest::testX11Unmanaged()
QVERIFY(!model2.hasChildren(model2.index(1, 0, QModelIndex())));
}
void DebugConsoleTest::testWaylandClient_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
void DebugConsoleTest::testWaylandClient()
{
DebugConsoleModel model;
......@@ -317,8 +309,7 @@ void DebugConsoleTest::testWaylandClient()
using namespace KWayland::Client;
QScopedPointer<Surface> surface(Test::createSurface());
QVERIFY(surface->isValid());
QFETCH(Test::XdgShellSurfaceType, type);
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data()));
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
QVERIFY(!shellSurface.isNull());
Test::render(surface.data(), QSize(10, 10), Qt::red);
......
......@@ -57,7 +57,6 @@ private Q_SLOTS:
void testDoubleClick();
void testDoubleTap_data();
void testDoubleTap();
void testHover_data();
void testHover();
void testPressToMove_data();
void testPressToMove();
......@@ -69,13 +68,11 @@ private Q_SLOTS:
void testModifierClickUnrestrictedMove();
void testModifierScrollOpacity_data();
void testModifierScrollOpacity();
void testTouchEvents_data();
void testTouchEvents();
void testTooltipDoesntEatKeyEvents_data();
void testTooltipDoesntEatKeyEvents();
private:
AbstractClient *showWindow(Test::XdgShellSurfaceType type);
AbstractClient *showWindow();
};
#define MOTION(target) \
......@@ -87,7 +84,7 @@ private:
#define RELEASE \
kwinApp()->platform()->pointerButtonReleased(BTN_LEFT, timestamp++)
AbstractClient *DecorationInputTest::showWindow(Test::XdgShellSurfaceType type)
AbstractClient *DecorationInputTest::showWindow()
{
using namespace KWayland::Client;
#define VERIFY(statement) \
......@@ -99,7 +96,7 @@ AbstractClient *DecorationInputTest::showWindow(Test::XdgShellSurfaceType type)
Surface *surface = Test::createSurface(Test::waylandCompositor());
VERIFY(surface);
XdgShellSurface *shellSurface = Test::createXdgShellSurface(type, surface, surface);
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
VERIFY(shellSurface);
auto deco = Test::waylandServerSideDecoration()->create(surface, surface);
QSignalSpy decoSpy(deco, &ServerSideDecoration::modeChanged);
......@@ -166,17 +163,15 @@ void DecorationInputTest::testAxis_data()
{
QTest::addColumn<QPoint>("decoPoint");
QTest::addColumn<Qt::WindowFrameSection>("expectedSection");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("topLeft|xdgWmBase") << QPoint(0, 0) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("top|xdgWmBase") << QPoint(250, 0) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("topRight|xdgWmBase") << QPoint(499, 0) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("topLeft") << QPoint(0, 0) << Qt::TopLeftSection;
QTest::newRow("top") << QPoint(250, 0) << Qt::TopSection;
QTest::newRow("topRight") << QPoint(499, 0) << Qt::TopRightSection;
}
void DecorationInputTest::testAxis()
{
QFETCH(Test::XdgShellSurfaceType, type);
AbstractClient *c = showWindow(type);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -217,17 +212,15 @@ void DecorationInputTest::testDoubleClick_data()
{
QTest::addColumn<QPoint>("decoPoint");
QTest::addColumn<Qt::WindowFrameSection>("expectedSection");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("topLeft|xdgWmBase") << QPoint(0, 0) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("top|xdgWmBase") << QPoint(250, 0) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("topRight|xdgWmBase") << QPoint(499, 0) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("topLeft") << QPoint(0, 0) << Qt::TopLeftSection;
QTest::newRow("top") << QPoint(250, 0) << Qt::TopSection;
QTest::newRow("topRight") << QPoint(499, 0) << Qt::TopRightSection;
}
void KWin::DecorationInputTest::testDoubleClick()
{
QFETCH(Test::XdgShellSurfaceType, type);
AbstractClient *c = showWindow(type);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -269,17 +262,15 @@ void DecorationInputTest::testDoubleTap_data()
{
QTest::addColumn<QPoint>("decoPoint");
QTest::addColumn<Qt::WindowFrameSection>("expectedSection");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("topLeft|xdgWmBase") << QPoint(10, 10) << Qt::TopLeftSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("top|xdgWmBase") << QPoint(260, 10) << Qt::TopSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("topRight|xdgWmBase") << QPoint(509, 10) << Qt::TopRightSection << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("topLeft") << QPoint(10, 10) << Qt::TopLeftSection;
QTest::newRow("top") << QPoint(260, 10) << Qt::TopSection;
QTest::newRow("topRight") << QPoint(509, 10) << Qt::TopRightSection;
}
void KWin::DecorationInputTest::testDoubleTap()
{
QFETCH(Test::XdgShellSurfaceType, type);
AbstractClient *c = showWindow(type);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -319,17 +310,9 @@ void KWin::DecorationInputTest::testDoubleTap()
QVERIFY(c->isOnAllDesktops());
}
void DecorationInputTest::testHover_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
void DecorationInputTest::testHover()
{
QFETCH(Test::XdgShellSurfaceType, type);
AbstractClient *c = showWindow(type);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -379,18 +362,16 @@ void DecorationInputTest::testPressToMove_data()
QTest::addColumn<QPoint>("offset");
QTest::addColumn<QPoint>("offset2");
QTest::addColumn<QPoint>("offset3");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("To right|xdgWmBase") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To left|xdgWmBase") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To bottom|xdgWmBase") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To top|xdgWmBase") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To right") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0);
QTest::newRow("To left") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0);
QTest::newRow("To bottom") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30);
QTest::newRow("To top") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30);
}
void DecorationInputTest::testPressToMove()
{
QFETCH(Test::XdgShellSurfaceType, type);
AbstractClient *c = showWindow(type);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -440,18 +421,16 @@ void DecorationInputTest::testTapToMove_data()
QTest::addColumn<QPoint>("offset");
QTest::addColumn<QPoint>("offset2");
QTest::addColumn<QPoint>("offset3");
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("To right|xdgWmBase") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To left|xdgWmBase") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To bottom|xdgWmBase") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To top|xdgWmBase") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::XdgShellSurfaceType::XdgShellStable;
QTest::newRow("To right") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0);
QTest::newRow("To left") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0);
QTest::newRow("To bottom") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30);
QTest::newRow("To top") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30);
}
void DecorationInputTest::testTapToMove()
{
QFETCH(Test::XdgShellSurfaceType, type);
AbstractClient *c = showWindow(type);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -499,13 +478,12 @@ void DecorationInputTest::testTapToMove()
void DecorationInputTest::testResizeOutsideWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::addColumn<Qt::Edge>("edge");
QTest::addColumn<Qt::CursorShape>("expectedCursor");
QTest::newRow("xdgWmBase - left") << Test::XdgShellSurfaceType::XdgShellStable << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("xdgWmBase - right") << Test::XdgShellSurfaceType::XdgShellStable << Qt::RightEdge << Qt::SizeHorCursor;
QTest::newRow("xdgWmBase - bottom") << Test::XdgShellSurfaceType::XdgShellStable << Qt::BottomEdge << Qt::SizeVerCursor;
QTest::newRow("left") << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("right") << Qt::RightEdge << Qt::SizeHorCursor;
QTest::newRow("bottom") << Qt::BottomEdge << Qt::SizeVerCursor;
}
void DecorationInputTest::testResizeOutsideWindow()
......@@ -518,8 +496,7 @@ void DecorationInputTest::testResizeOutsideWindow()
workspace()->slotReconfigure();
// now create window
QFETCH(Test::XdgShellSurfaceType, type);
AbstractClient *c = showWindow(type);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -563,45 +540,38 @@ void DecorationInputTest::testModifierClickUnrestrictedMove_data()
QTest::addColumn<int>("mouseButton");
QTest::addColumn<QString>("modKey");
QTest::addColumn<bool>("capsLock");
QTest::addColumn<Test::XdgShellSurfaceType>("surfaceType");
const QString alt = QStringLiteral("Alt");
const QString meta = QStringLiteral("Meta");
const QVector<std::pair<Test::XdgShellSurfaceType, QByteArray>> surfaceTypes{
{ Test::XdgShellSurfaceType::XdgShellStable, QByteArrayLiteral("XdgWmBase") },
};
for (const auto &type : surfaceTypes) {
QTest::newRow("Left Alt + Left Click" + type.second) << KEY_LEFTALT << BTN_LEFT << alt << false << type.first;
QTest::newRow("Left Alt + Right Click" + type.second) << KEY_LEFTALT << BTN_RIGHT << alt << false << type.first;
QTest::newRow("Left Alt + Middle Click" + type.second) << KEY_LEFTALT << BTN_MIDDLE << alt << false << type.first;
QTest::newRow("Right Alt + Left Click" + type.second) << KEY_RIGHTALT << BTN_LEFT << alt << false << type.first;
QTest::newRow("Right Alt + Right Click" + type.second) << KEY_RIGHTALT << BTN_RIGHT << alt << false << type.first;
QTest::newRow("Right Alt + Middle Click" + type.second) << KEY_RIGHTALT << BTN_MIDDLE << alt << false << type.first;
// now everything with meta
QTest::newRow("Left Meta + Left Click" + type.second) << KEY_LEFTMETA << BTN_LEFT << meta << false << type.first;
QTest::newRow("Left Meta + Right Click" + type.second) << KEY_LEFTMETA << BTN_RIGHT << meta << false << type.first;
QTest::newRow("Left Meta + Middle Click" + type.second) << KEY_LEFTMETA << BTN_MIDDLE << meta << false << type.first;
QTest::newRow("Right Meta + Left Click" + type.second) << KEY_RIGHTMETA << BTN_LEFT << meta << false << type.first;
QTest::newRow("Right Meta + Right Click" + type.second) << KEY_RIGHTMETA << BTN_RIGHT << meta << false << type.first;
QTest::newRow("Right Meta + Middle Click" + type.second) << KEY_RIGHTMETA << BTN_MIDDLE << meta << false << type.first;
// and with capslock
QTest::newRow("Left Alt + Left Click/CapsLock" + type.second) << KEY_LEFTALT << BTN_LEFT << alt << true << type.first;
QTest::newRow("Left Alt + Right Click/CapsLock" + type.second) << KEY_LEFTALT << BTN_RIGHT << alt << true << type.first;
QTest::newRow("Left Alt + Middle Click/CapsLock" + type.second) << KEY_LEFTALT << BTN_MIDDLE << alt << true << type.first;
QTest::newRow("Right Alt + Left Click/CapsLock" + type.second) << KEY_RIGHTALT << BTN_LEFT << alt << true << type.first;
QTest::newRow("Right Alt + Right Click/CapsLock" + type.second) << KEY_RIGHTALT << BTN_RIGHT << alt << true << type.first;
QTest::newRow("Right Alt + Middle Click/CapsLock" + type.second) << KEY_RIGHTALT << BTN_MIDDLE << alt << true << type.first;
// now everything with meta
QTest::newRow("Left Meta + Left Click/CapsLock" + type.second) << KEY_LEFTMETA << BTN_LEFT << meta << true << type.first;
QTest::newRow("Left Meta + Right Click/CapsLock" + type.second) << KEY_LEFTMETA << BTN_RIGHT << meta << true << type.first;
QTest::newRow("Left Meta + Middle Click/CapsLock" + type.second) << KEY_LEFTMETA << BTN_MIDDLE << meta << true << type.first;
QTest::newRow("Right Meta + Left Click/CapsLock" + type.second) << KEY_RIGHTMETA << BTN_LEFT << meta << true << type.first;
QTest::newRow("Right Meta + Right Click/CapsLock" + type.second) << KEY_RIGHTMETA << BTN_RIGHT << meta << true << type.first;
QTest::newRow("Right Meta + Middle Click/CapsLock" + type.second) << KEY_RIGHTMETA << BTN_MIDDLE << meta << true << type.first;
}
QTest::newRow("Left Alt + Left Click") << KEY_LEFTALT << BTN_LEFT << alt << false;
QTest::newRow("Left Alt + Right Click") << KEY_LEFTALT << BTN_RIGHT << alt << false;
QTest::newRow("Left Alt + Middle Click") << KEY_LEFTALT << BTN_MIDDLE << alt << false;
QTest::newRow("Right Alt + Left Click") << KEY_RIGHTALT << BTN_LEFT << alt << false;
QTest::newRow("Right Alt + Right Click") << KEY_RIGHTALT << BTN_RIGHT << alt << false;
QTest::newRow("Right Alt + Middle Click") << KEY_RIGHTALT << BTN_MIDDLE << alt << false;
// now everything with meta
QTest::newRow("Left Meta + Left Click") << KEY_LEFTMETA << BTN_LEFT << meta << false;
QTest::newRow("Left Meta + Right Click") << KEY_LEFTMETA << BTN_RIGHT << meta << false;
QTest::newRow("Left Meta + Middle Click") << KEY_LEFTMETA << BTN_MIDDLE << meta << false;
QTest::newRow("Right Meta + Left Click") << KEY_RIGHTMETA << BTN_LEFT << meta << false;
QTest::newRow("Right Meta + Right Click") << KEY_RIGHTMETA << BTN_RIGHT << meta << false;
QTest::newRow("Right Meta + Middle Click") << KEY_RIGHTMETA << BTN_MIDDLE << meta << false;
// and with capslock
QTest::newRow("Left Alt + Left Click/CapsLock") << KEY_LEFTALT << BTN_LEFT << alt << true;
QTest::newRow("Left Alt + Right Click/CapsLock") << KEY_LEFTALT << BTN_RIGHT << alt << true;
QTest::newRow("Left Alt + Middle Click/CapsLock") << KEY_LEFTALT << BTN_MIDDLE << alt << true;
QTest::newRow("Right Alt + Left Click/CapsLock") << KEY_RIGHTALT << BTN_LEFT << alt << true;
QTest::newRow("Right Alt + Right Click/CapsLock") << KEY_RIGHTALT << BTN_RIGHT << alt << true;
QTest::newRow("Right Alt + Middle Click/CapsLock") << KEY_RIGHTALT << BTN_MIDDLE << alt << true;
// now everything with meta
QTest::newRow("Left Meta + Left Click/CapsLock") << KEY_LEFTMETA << BTN_LEFT << meta << true;
QTest::newRow("Left Meta + Right Click/CapsLock") << KEY_LEFTMETA << BTN_RIGHT << meta << true;
QTest::newRow("Left Meta + Middle Click/CapsLock") << KEY_LEFTMETA << BTN_MIDDLE << meta << true;
QTest::newRow("Right Meta + Left Click/CapsLock") << KEY_RIGHTMETA << BTN_LEFT << meta << true;
QTest::newRow("Right Meta + Right Click/CapsLock") << KEY_RIGHTMETA << BTN_RIGHT << meta << true;
QTest::newRow("Right Meta + Middle Click/CapsLock") << KEY_RIGHTMETA << BTN_MIDDLE << meta << true;
}
void DecorationInputTest::testModifierClickUnrestrictedMove()
......@@ -623,8 +593,7 @@ void DecorationInputTest::testModifierClickUnrestrictedMove()
QCOMPARE(options->commandAll3(), Options::MouseUnrestrictedMove);
// create a window
QFETCH(Test::XdgShellSurfaceType, surfaceType);
AbstractClient *c = showWindow(surfaceType);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -660,25 +629,18 @@ void DecorationInputTest::testModifierScrollOpacity_data()
QTest::addColumn<int>("modifierKey");
QTest::addColumn<QString>("modKey");
QTest::addColumn<bool>("capsLock");
QTest::addColumn<Test::XdgShellSurfaceType>("surfaceType");
const QString alt = QStringLiteral("Alt");
const QString meta = QStringLiteral("Meta");
const QVector<std::pair<Test::XdgShellSurfaceType, QByteArray>> surfaceTypes{
{ Test::XdgShellSurfaceType::XdgShellStable, QByteArrayLiteral("XdgWmBase") },
};
for (const auto &type : surfaceTypes) {
QTest::newRow("Left Alt" + type.second) << KEY_LEFTALT << alt << false << type.first;
QTest::newRow("Right Alt" + type.second) << KEY_RIGHTALT << alt << false << type.first;
QTest::newRow("Left Meta" + type.second) << KEY_LEFTMETA << meta << false << type.first;
QTest::newRow("Right Meta" + type.second) << KEY_RIGHTMETA << meta << false << type.first;
QTest::newRow("Left Alt/CapsLock" + type.second) << KEY_LEFTALT << alt << true << type.first;
QTest::newRow("Right Alt/CapsLock" + type.second) << KEY_RIGHTALT << alt << true << type.first;
QTest::newRow("Left Meta/CapsLock" + type.second) << KEY_LEFTMETA << meta << true << type.first;
QTest::newRow("Right Meta/CapsLock" + type.second) << KEY_RIGHTMETA << meta << true << type.first;
}
QTest::newRow("Left Alt") << KEY_LEFTALT << alt << false;
QTest::newRow("Right Alt") << KEY_RIGHTALT << alt << false;
QTest::newRow("Left Meta") << KEY_LEFTMETA << meta << false;
QTest::newRow("Right Meta") << KEY_RIGHTMETA << meta << false;
QTest::newRow("Left Alt/CapsLock") << KEY_LEFTALT << alt << true;
QTest::newRow("Right Alt/CapsLock") << KEY_RIGHTALT << alt << true;
QTest::newRow("Left Meta/CapsLock") << KEY_LEFTMETA << meta << true;
QTest::newRow("Right Meta/CapsLock") << KEY_RIGHTMETA << meta << true;
}
void DecorationInputTest::testModifierScrollOpacity()
......@@ -693,8 +655,7 @@ void DecorationInputTest::testModifierScrollOpacity()
group.sync();
workspace()->slotReconfigure();
QFETCH(Test::XdgShellSurfaceType, surfaceType);
AbstractClient *c = showWindow(surfaceType);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -723,13 +684,6 @@ void DecorationInputTest::testModifierScrollOpacity()
}
}
void DecorationInputTest::testTouchEvents_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
class EventHelper : public QObject
{
Q_OBJECT
......@@ -757,8 +711,7 @@ void DecorationInputTest::testTouchEvents()
{
// this test verifies that the decoration gets a hover leave event on touch release
// see BUG 386231
QFETCH(Test::XdgShellSurfaceType, type);
AbstractClient *c = showWindow(type);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......@@ -796,13 +749,6 @@ void DecorationInputTest::testTouchEvents()
QCOMPARE(hoverLeaveSpy.count(), 2);
}
void DecorationInputTest::testTooltipDoesntEatKeyEvents_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
void DecorationInputTest::testTooltipDoesntEatKeyEvents()
{
// this test verifies that a tooltip on the decoration does not steal key events
......@@ -814,8 +760,7 @@ void DecorationInputTest::testTooltipDoesntEatKeyEvents()
QSignalSpy enteredSpy(keyboard, &KWayland::Client::Keyboard::entered);
QVERIFY(enteredSpy.isValid());
QFETCH(Test::XdgShellSurfaceType, type);
AbstractClient *c = showWindow(type);
AbstractClient *c = showWindow();
QVERIFY(c);
QVERIFY(c->isDecorated());
QVERIFY(!c->noBorder());
......
......@@ -36,7 +36,6 @@ private Q_SLOTS:
void init();
void initTestCase();
void cleanup();
void testMoveCursorOverDeco_data();
void testMoveCursorOverDeco();
};
......@@ -73,22 +72,14 @@ void DontCrashCursorPhysicalSizeEmpty::initTestCase()
QVERIFY(applicationStartedSpy.wait());
}
void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco()
{
// This test ensures that there is no endless recursion if the cursor theme cannot be created
// a reason for creation failure could be physical size not existing
// see BUG: 390314
QScopedPointer<Surface> surface(Test::createSurface());
QFETCH(Test::XdgShellSurfaceType, type);
Test::waylandServerSideDecoration()->create(surface.data(), surface.data());
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data()));
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
QVERIFY(c);
......
......@@ -38,7 +38,6 @@ private Q_SLOTS:
void initTestCase();
void init();
void cleanup();
void testCreateWindow_data();
void testCreateWindow();
};
......@@ -84,13 +83,6 @@ void DontCrashNoBorder::cleanup()
Test::destroyWaylandConnection();
}
void DontCrashNoBorder::testCreateWindow_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
void DontCrashNoBorder::testCreateWindow()
{
// create a window and ensure that this doesn't crash
......@@ -98,8 +90,7 @@ void DontCrashNoBorder::testCreateWindow()
QScopedPointer<Surface> surface(Test::createSurface());
QVERIFY(!surface.isNull());
QFETCH(Test::XdgShellSurfaceType, type);
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data()));
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
QVERIFY(shellSurface);
QScopedPointer<ServerSideDecoration> deco(Test::waylandServerSideDecoration()->create(surface.data()));
QSignalSpy decoSpy(deco.data(), &ServerSideDecoration::modeChanged);
......
......@@ -36,7 +36,6 @@ private Q_SLOTS:
void init();
void cleanup();
void testMaximizeRestore_data();
void testMaximizeRestore();
};
......@@ -82,13 +81,6 @@ void MaximizeAnimationTest::cleanup()
Test::destroyWaylandConnection();
}
void MaximizeAnimationTest::testMaximizeRestore_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
void MaximizeAnimationTest::testMaximizeRestore()
{
// This test verifies that the maximize effect animates a client
......@@ -100,8 +92,7 @@ void MaximizeAnimationTest::testMaximizeRestore()
QScopedPointer<Surface> surface(Test::createSurface());
QVERIFY(!surface.isNull());
QFETCH(Test::XdgShellSurfaceType, type);
QScopedPointer<XdgShellSurface> shellSurface(createXdgShellSurface(type, surface.data(), nullptr, Test::CreationSetup::CreateOnly));
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
// Wait for the initial configure event.
XdgShellSurface::States states;
......
......@@ -33,7 +33,6 @@ private Q_SLOTS:
void init();
void cleanup();
void testInhibit_data();
void testInhibit();
void testDontInhibitWhenNotOnCurrentDesktop();
void testDontInhibitWhenMinimized();
......@@ -70,13 +69,6 @@ void TestIdleInhibition::cleanup()
QCOMPARE(VirtualDesktopManager::self()->count(), 1u);
}
void TestIdleInhibition::testInhibit_data()
{
QTest::addColumn<Test::XdgShellSurfaceType>("type");
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
}
void TestIdleInhibition::testInhibit()
{
auto idle = waylandServer()->display()->findChild<IdleInterface*>();
......@@ -87,8 +79,7 @@ void TestIdleInhibition::testInhibit()
// now create window
QScopedPointer<Surface> surface(Test::createSurface());
QFETCH(Test::XdgShellSurfaceType, type);
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data()));
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
// now create inhibition on window
QScopedPointer<IdleInhibitor> inhibitor(Test::waylandIdleInhibitManager()->createInhibitor(surface.data()));
......
......@@ -40,7 +40,6 @@ private Q_SLOTS:
void initTestCase();
void init();
void cleanup();
void testPointerFocusUpdatesOnStackingOrderChange_data();
void testPointerFocusUpdatesOnStackingOrderChange();