[autotests] Update tests to use stable version of xdg-shell

Test Plan: All tests pass.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18292
icc-effect-5.17.5
Vlad Zagorodniy 2019-01-16 12:06:22 +02:00
parent a1e5650fd0
commit 8877dff715
9 changed files with 51 additions and 1 deletions

View File

@ -185,6 +185,9 @@ void DecorationInputTest::testAxis_data()
QTest::newRow("topLeft|xdgv6") << QPoint(0, 0) << Qt::TopLeftSection << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("top|xdgv6") << QPoint(250, 0) << Qt::TopSection << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("topRight|xdgv6") << QPoint(499, 0) << Qt::TopRightSection << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("topLeft|xdgWmBase") << QPoint(0, 0) << Qt::TopLeftSection << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("top|xdgWmBase") << QPoint(250, 0) << Qt::TopSection << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("topRight|xdgWmBase") << QPoint(499, 0) << Qt::TopRightSection << Test::ShellSurfaceType::XdgShellStable;
}
void DecorationInputTest::testAxis()
@ -242,6 +245,9 @@ void DecorationInputTest::testDoubleClick_data()
QTest::newRow("topLeft|xdgv6") << QPoint(0, 0) << Qt::TopLeftSection << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("top|xdgv6") << QPoint(250, 0) << Qt::TopSection << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("topRight|xdgv6") << QPoint(499, 0) << Qt::TopRightSection << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("topLeft|xdgWmBase") << QPoint(0, 0) << Qt::TopLeftSection << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("top|xdgWmBase") << QPoint(250, 0) << Qt::TopSection << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("topRight|xdgWmBase") << QPoint(499, 0) << Qt::TopRightSection << Test::ShellSurfaceType::XdgShellStable;
}
void KWin::DecorationInputTest::testDoubleClick()
@ -300,7 +306,9 @@ void DecorationInputTest::testDoubleTap_data()
QTest::newRow("topLeft|xdgv6") << QPoint(10, 10) << Qt::TopLeftSection << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("top|xdgv6") << QPoint(260, 10) << Qt::TopSection << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("topRight|xdgv6") << QPoint(509, 10) << Qt::TopRightSection << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("topLeft|xdgWmBase") << QPoint(10, 10) << Qt::TopLeftSection << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("top|xdgWmBase") << QPoint(260, 10) << Qt::TopSection << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("topRight|xdgWmBase") << QPoint(509, 10) << Qt::TopRightSection << Test::ShellSurfaceType::XdgShellStable;
}
void KWin::DecorationInputTest::testDoubleTap()
@ -353,6 +361,7 @@ void DecorationInputTest::testHover_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void DecorationInputTest::testHover()
@ -411,6 +420,10 @@ void DecorationInputTest::testPressToMove_data()
QTest::newRow("To left|xdgv6") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("To bottom|xdgv6") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("To top|xdgv6") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("To right|xdgWmBase") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("To left|xdgWmBase") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("To bottom|xdgWmBase") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("To top|xdgWmBase") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::ShellSurfaceType::XdgShellStable;
}
void DecorationInputTest::testPressToMove()
@ -480,6 +493,10 @@ void DecorationInputTest::testTapToMove_data()
QTest::newRow("To left|xdgv6") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("To bottom|xdgv6") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("To top|xdgv6") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("To right|xdgWmBase") << QPoint(10, 0) << QPoint(20, 0) << QPoint(30, 0) << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("To left|xdgWmBase") << QPoint(-10, 0) << QPoint(-20, 0) << QPoint(-30, 0) << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("To bottom|xdgWmBase") << QPoint(0, 10) << QPoint(0, 20) << QPoint(0, 30) << Test::ShellSurfaceType::XdgShellStable;
QTest::newRow("To top|xdgWmBase") << QPoint(0, -10) << QPoint(0, -20) << QPoint(0, -30) << Test::ShellSurfaceType::XdgShellStable;
}
void DecorationInputTest::testTapToMove()
@ -540,12 +557,15 @@ void DecorationInputTest::testResizeOutsideWindow_data()
QTest::newRow("wlShell - left") << Test::ShellSurfaceType::WlShell << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("xdgShellV5 - left") << Test::ShellSurfaceType::XdgShellV5 << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("xdgShellV6 - left") << Test::ShellSurfaceType::XdgShellV6 << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("xdgWmBase - left") << Test::ShellSurfaceType::XdgShellStable << Qt::LeftEdge << Qt::SizeHorCursor;
QTest::newRow("wlShell - right") << Test::ShellSurfaceType::WlShell << Qt::RightEdge << Qt::SizeHorCursor;
QTest::newRow("xdgShellV5 - right") << Test::ShellSurfaceType::XdgShellV5 << Qt::RightEdge << Qt::SizeHorCursor;
QTest::newRow("xdgShellV6 - right") << Test::ShellSurfaceType::XdgShellV6 << Qt::RightEdge << Qt::SizeHorCursor;
QTest::newRow("xdgWmBase - right") << Test::ShellSurfaceType::XdgShellStable << Qt::RightEdge << Qt::SizeHorCursor;
QTest::newRow("wlShell - bottom") << Test::ShellSurfaceType::WlShell << Qt::BottomEdge << Qt::SizeVerCursor;
QTest::newRow("xdgShellV5 - bottom") << Test::ShellSurfaceType::XdgShellV5 << Qt::BottomEdge << Qt::SizeVerCursor;
QTest::newRow("xdgShellV6 - bottom") << Test::ShellSurfaceType::XdgShellV6 << Qt::BottomEdge << Qt::SizeVerCursor;
QTest::newRow("xdgWmBase - bottom") << Test::ShellSurfaceType::XdgShellStable << Qt::BottomEdge << Qt::SizeVerCursor;
}
void DecorationInputTest::testResizeOutsideWindow()
@ -611,6 +631,8 @@ void DecorationInputTest::testModifierClickUnrestrictedMove_data()
const QVector<std::pair<Test::ShellSurfaceType, QByteArray>> surfaceTypes{
{Test::ShellSurfaceType::WlShell, QByteArrayLiteral("WlShell")},
{Test::ShellSurfaceType::XdgShellV5, QByteArrayLiteral("XdgShellV5")},
{Test::ShellSurfaceType::XdgShellV6, QByteArrayLiteral("XdgShellV6")},
{Test::ShellSurfaceType::XdgShellStable, QByteArrayLiteral("XdgWmBase")},
};
for (const auto &type: surfaceTypes) {
@ -709,6 +731,8 @@ void DecorationInputTest::testModifierScrollOpacity_data()
const QVector<std::pair<Test::ShellSurfaceType, QByteArray>> surfaceTypes{
{Test::ShellSurfaceType::WlShell, QByteArrayLiteral("WlShell")},
{Test::ShellSurfaceType::XdgShellV5, QByteArrayLiteral("XdgShellV5")},
{Test::ShellSurfaceType::XdgShellV6, QByteArrayLiteral("XdgShellV6")},
{Test::ShellSurfaceType::XdgShellStable, QByteArrayLiteral("XdgWmBase")},
};
for (const auto &type: surfaceTypes) {
@ -772,6 +796,7 @@ void DecorationInputTest::testTouchEvents_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
class EventHelper : public QObject
@ -846,6 +871,7 @@ void DecorationInputTest::testTooltipDoesntEatKeyEvents_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void DecorationInputTest::testTooltipDoesntEatKeyEvents()

View File

@ -94,6 +94,7 @@ void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco()

View File

@ -105,6 +105,7 @@ void DontCrashNoBorder::testCreateWindow_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void DontCrashNoBorder::testCreateWindow()

View File

@ -504,6 +504,7 @@ void MoveResizeWindowTest::testClientSideMove_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void MoveResizeWindowTest::testClientSideMove()

View File

@ -256,6 +256,7 @@ void PlasmaSurfaceTest::testOSDPlacementManualPosition_data()
QTest::newRow("wl-shell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgv5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgv6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void PlasmaSurfaceTest::testOSDPlacementManualPosition()
@ -294,15 +295,19 @@ void PlasmaSurfaceTest::testPanelTypeHasStrut_data()
QTest::newRow("always visible - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer;
QTest::newRow("always visible - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer;
QTest::newRow("always visible - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer;
QTest::newRow("always visible - xdgWmBase") << Test::ShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer;
QTest::newRow("autohide - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer;
QTest::newRow("autohide - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer;
QTest::newRow("autohide - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer;
QTest::newRow("autohide - xdgWmBase") << Test::ShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer;
QTest::newRow("windows can cover - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer;
QTest::newRow("windows can cover - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer;
QTest::newRow("windows can cover - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer;
QTest::newRow("windows can cover - xdgWmBase") << Test::ShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer;
QTest::newRow("windows go below - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer;
QTest::newRow("windows go below - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer;
QTest::newRow("windows go below - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer;
QTest::newRow("windows go below - xdgWmBase") << Test::ShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer;
}
void PlasmaSurfaceTest::testPanelTypeHasStrut()

View File

@ -132,6 +132,10 @@ void TestPointerConstraints::testConfinedPointer_data()
QTest::newRow("XdgShellV6 - bottomRight") << Test::ShellSurfaceType::XdgShellV6 << bottomRight << 1 << 1;
QTest::newRow("XdgShellV6 - topLeft") << Test::ShellSurfaceType::XdgShellV6 << topLeft << -1 << -1;
QTest::newRow("XdgShellV6 - topRight") << Test::ShellSurfaceType::XdgShellV6 << topRight << 1 << -1;
QTest::newRow("XdgWmBase - bottomLeft") << Test::ShellSurfaceType::XdgShellStable << bottomLeft << -1 << 1;
QTest::newRow("XdgWmBase - bottomRight") << Test::ShellSurfaceType::XdgShellStable << bottomRight << 1 << 1;
QTest::newRow("XdgWmBase - topLeft") << Test::ShellSurfaceType::XdgShellStable << topLeft << -1 << -1;
QTest::newRow("XdgWmBase - topRight") << Test::ShellSurfaceType::XdgShellStable << topRight << 1 << -1;
}
void TestPointerConstraints::testConfinedPointer()
@ -300,6 +304,7 @@ void TestPointerConstraints::testLockedPointer_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void TestPointerConstraints::testLockedPointer()
@ -378,6 +383,7 @@ void TestPointerConstraints::testCloseWindowWithLockedPointer_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("XdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("XdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("XdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void TestPointerConstraints::testCloseWindowWithLockedPointer()

View File

@ -157,6 +157,7 @@ void SceneQPainterTest::testWindow_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void SceneQPainterTest::testWindow()

View File

@ -106,15 +106,19 @@ void TestShellClientRules::name##_data() \
QTest::newRow("wlShell|Force") << Test::ShellSurfaceType::WlShell << 2; \
QTest::newRow("xdgShellV5|Force") << Test::ShellSurfaceType::XdgShellV5 << 2; \
QTest::newRow("xdgShellV6|Force") << Test::ShellSurfaceType::XdgShellV6 << 2; \
QTest::newRow("xdgWmBase|Force") << Test::ShellSurfaceType::XdgShellStable << 2; \
QTest::newRow("wlShell|Apply") << Test::ShellSurfaceType::WlShell << 3; \
QTest::newRow("xdgShellV5|Apply") << Test::ShellSurfaceType::XdgShellV5 << 3; \
QTest::newRow("xdgShellV6|Apply") << Test::ShellSurfaceType::XdgShellV6 << 3; \
QTest::newRow("xdgWmBase|Apply") << Test::ShellSurfaceType::XdgShellStable << 3; \
QTest::newRow("wlShell|ApplyNow") << Test::ShellSurfaceType::WlShell << 5; \
QTest::newRow("xdgShellV5|ApplyNow") << Test::ShellSurfaceType::XdgShellV5 << 5; \
QTest::newRow("xdgShellV6|ApplyNow") << Test::ShellSurfaceType::XdgShellV6 << 5; \
QTest::newRow("xdgWmBase|ApplyNow") << Test::ShellSurfaceType::XdgShellStable << 5; \
QTest::newRow("wlShell|ForceTemporarily") << Test::ShellSurfaceType::WlShell << 6; \
QTest::newRow("xdgShellV5|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV5 << 6; \
QTest::newRow("xdgShellV6|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV6 << 6; \
QTest::newRow("xdgWmBase|ForceTemporarily") << Test::ShellSurfaceType::XdgShellStable << 6; \
}
#define TEST_FORCE_DATA( name ) \
@ -125,9 +129,11 @@ void TestShellClientRules::name##_data() \
QTest::newRow("wlShell|Force") << Test::ShellSurfaceType::WlShell << 2; \
QTest::newRow("xdgShellV5|Force") << Test::ShellSurfaceType::XdgShellV5 << 2; \
QTest::newRow("xdgShellV6|Force") << Test::ShellSurfaceType::XdgShellV6 << 2; \
QTest::newRow("xdgWmBase|Force") << Test::ShellSurfaceType::XdgShellStable << 2; \
QTest::newRow("wlShell|ForceTemporarily") << Test::ShellSurfaceType::WlShell << 6; \
QTest::newRow("xdgShellV5|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV5 << 6; \
QTest::newRow("xdgShellV6|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV6 << 6; \
QTest::newRow("xdgWmBase|ForceTemporarily") << Test::ShellSurfaceType::XdgShellStable << 6; \
}

View File

@ -137,6 +137,7 @@ void VirtualDesktopTest::testLastDesktopRemoved_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void VirtualDesktopTest::testLastDesktopRemoved()
@ -182,6 +183,7 @@ void VirtualDesktopTest::testWindowOnMultipleDesktops_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void VirtualDesktopTest::testWindowOnMultipleDesktops()
@ -271,6 +273,7 @@ void VirtualDesktopTest::testRemoveDesktopWithWindow_data()
QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell;
QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5;
QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6;
QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable;
}
void VirtualDesktopTest::testRemoveDesktopWithWindow()