Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/plasma_surface_test.cpp
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Line(s) | |||||
251 | 251 | | |||
252 | void PlasmaSurfaceTest::testOSDPlacementManualPosition_data() | 252 | void PlasmaSurfaceTest::testOSDPlacementManualPosition_data() | ||
253 | { | 253 | { | ||
254 | QTest::addColumn<Test::ShellSurfaceType>("type"); | 254 | QTest::addColumn<Test::ShellSurfaceType>("type"); | ||
255 | 255 | | |||
256 | QTest::newRow("wl-shell") << Test::ShellSurfaceType::WlShell; | 256 | QTest::newRow("wl-shell") << Test::ShellSurfaceType::WlShell; | ||
257 | QTest::newRow("xdgv5") << Test::ShellSurfaceType::XdgShellV5; | 257 | QTest::newRow("xdgv5") << Test::ShellSurfaceType::XdgShellV5; | ||
258 | QTest::newRow("xdgv6") << Test::ShellSurfaceType::XdgShellV6; | 258 | QTest::newRow("xdgv6") << Test::ShellSurfaceType::XdgShellV6; | ||
259 | QTest::newRow("xdgWmBase") << Test::ShellSurfaceType::XdgShellStable; | ||||
259 | } | 260 | } | ||
260 | 261 | | |||
261 | void PlasmaSurfaceTest::testOSDPlacementManualPosition() | 262 | void PlasmaSurfaceTest::testOSDPlacementManualPosition() | ||
262 | { | 263 | { | ||
263 | QScopedPointer<Surface> surface(Test::createSurface()); | 264 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
264 | QVERIFY(!surface.isNull()); | 265 | QVERIFY(!surface.isNull()); | ||
265 | QScopedPointer<PlasmaShellSurface> plasmaSurface(m_plasmaShell->createSurface(surface.data())); | 266 | QScopedPointer<PlasmaShellSurface> plasmaSurface(m_plasmaShell->createSurface(surface.data())); | ||
266 | QVERIFY(!plasmaSurface.isNull()); | 267 | QVERIFY(!plasmaSurface.isNull()); | ||
Show All 22 Lines | 288 | { | |||
289 | QTest::addColumn<PlasmaShellSurface::PanelBehavior>("panelBehavior"); | 290 | QTest::addColumn<PlasmaShellSurface::PanelBehavior>("panelBehavior"); | ||
290 | QTest::addColumn<bool>("expectedStrut"); | 291 | QTest::addColumn<bool>("expectedStrut"); | ||
291 | QTest::addColumn<QRect>("expectedMaxArea"); | 292 | QTest::addColumn<QRect>("expectedMaxArea"); | ||
292 | QTest::addColumn<KWin::Layer>("expectedLayer"); | 293 | QTest::addColumn<KWin::Layer>("expectedLayer"); | ||
293 | 294 | | |||
294 | QTest::newRow("always visible - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer; | 295 | QTest::newRow("always visible - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer; | ||
295 | QTest::newRow("always visible - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer; | 296 | QTest::newRow("always visible - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer; | ||
296 | QTest::newRow("always visible - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer; | 297 | QTest::newRow("always visible - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer; | ||
298 | QTest::newRow("always visible - xdgWmBase") << Test::ShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::AlwaysVisible << true << QRect(0, 50, 1280, 974) << KWin::DockLayer; | ||||
297 | QTest::newRow("autohide - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer; | 299 | QTest::newRow("autohide - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer; | ||
298 | QTest::newRow("autohide - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer; | 300 | QTest::newRow("autohide - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer; | ||
299 | QTest::newRow("autohide - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer; | 301 | QTest::newRow("autohide - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer; | ||
302 | QTest::newRow("autohide - xdgWmBase") << Test::ShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::AutoHide << false << QRect(0, 0, 1280, 1024) << KWin::AboveLayer; | ||||
300 | QTest::newRow("windows can cover - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer; | 303 | QTest::newRow("windows can cover - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer; | ||
301 | QTest::newRow("windows can cover - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer; | 304 | QTest::newRow("windows can cover - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer; | ||
302 | QTest::newRow("windows can cover - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer; | 305 | QTest::newRow("windows can cover - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer; | ||
306 | QTest::newRow("windows can cover - xdgWmBase") << Test::ShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::WindowsCanCover << false << QRect(0, 0, 1280, 1024) << KWin::NormalLayer; | ||||
303 | QTest::newRow("windows go below - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer; | 307 | QTest::newRow("windows go below - wlShell") << Test::ShellSurfaceType::WlShell << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer; | ||
304 | QTest::newRow("windows go below - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer; | 308 | QTest::newRow("windows go below - xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer; | ||
305 | QTest::newRow("windows go below - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer; | 309 | QTest::newRow("windows go below - xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer; | ||
310 | QTest::newRow("windows go below - xdgWmBase") << Test::ShellSurfaceType::XdgShellStable << PlasmaShellSurface::PanelBehavior::WindowsGoBelow << false << QRect(0, 0, 1280, 1024) << KWin::DockLayer; | ||||
306 | } | 311 | } | ||
307 | 312 | | |||
308 | void PlasmaSurfaceTest::testPanelTypeHasStrut() | 313 | void PlasmaSurfaceTest::testPanelTypeHasStrut() | ||
309 | { | 314 | { | ||
310 | QScopedPointer<Surface> surface(Test::createSurface()); | 315 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
311 | QVERIFY(!surface.isNull()); | 316 | QVERIFY(!surface.isNull()); | ||
312 | QFETCH(Test::ShellSurfaceType, type); | 317 | QFETCH(Test::ShellSurfaceType, type); | ||
313 | QScopedPointer<QObject> shellSurface(Test::createShellSurface(type, surface.data())); | 318 | QScopedPointer<QObject> shellSurface(Test::createShellSurface(type, surface.data())); | ||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |