Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/virtual_desktop_test.cpp
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | 92 | { | |||
---|---|---|---|---|---|
128 | QCOMPARE(currentDesktop.value(0, &ok), 0); | 128 | QCOMPARE(currentDesktop.value(0, &ok), 0); | ||
129 | QVERIFY(ok); | 129 | QVERIFY(ok); | ||
130 | } | 130 | } | ||
131 | 131 | | |||
132 | void VirtualDesktopTest::testLastDesktopRemoved_data() | 132 | void VirtualDesktopTest::testLastDesktopRemoved_data() | ||
133 | { | 133 | { | ||
134 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 134 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
135 | 135 | | |||
136 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
137 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 136 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
138 | } | 137 | } | ||
139 | 138 | | |||
140 | void VirtualDesktopTest::testLastDesktopRemoved() | 139 | void VirtualDesktopTest::testLastDesktopRemoved() | ||
141 | { | 140 | { | ||
142 | // first create a new desktop | 141 | // first create a new desktop | ||
143 | QCOMPARE(VirtualDesktopManager::self()->count(), 1u); | 142 | QCOMPARE(VirtualDesktopManager::self()->count(), 1u); | ||
144 | VirtualDesktopManager::self()->setCount(2); | 143 | VirtualDesktopManager::self()->setCount(2); | ||
Show All 27 Lines | |||||
172 | QCOMPARE(client->desktops().count(), 1u); | 171 | QCOMPARE(client->desktops().count(), 1u); | ||
173 | QCOMPARE(VirtualDesktopManager::self()->currentDesktop(), client->desktops().first()); | 172 | QCOMPARE(VirtualDesktopManager::self()->currentDesktop(), client->desktops().first()); | ||
174 | } | 173 | } | ||
175 | 174 | | |||
176 | void VirtualDesktopTest::testWindowOnMultipleDesktops_data() | 175 | void VirtualDesktopTest::testWindowOnMultipleDesktops_data() | ||
177 | { | 176 | { | ||
178 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 177 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
179 | 178 | | |||
180 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
181 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 179 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
182 | } | 180 | } | ||
183 | 181 | | |||
184 | void VirtualDesktopTest::testWindowOnMultipleDesktops() | 182 | void VirtualDesktopTest::testWindowOnMultipleDesktops() | ||
185 | { | 183 | { | ||
186 | // first create two new desktops | 184 | // first create two new desktops | ||
187 | QCOMPARE(VirtualDesktopManager::self()->count(), 1u); | 185 | QCOMPARE(VirtualDesktopManager::self()->count(), 1u); | ||
188 | VirtualDesktopManager::self()->setCount(3); | 186 | VirtualDesktopManager::self()->setCount(3); | ||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | |||||
260 | QVERIFY(client->isOnDesktop(2)); | 258 | QVERIFY(client->isOnDesktop(2)); | ||
261 | QCOMPARE(client->desktops().count(), 2u); | 259 | QCOMPARE(client->desktops().count(), 2u); | ||
262 | } | 260 | } | ||
263 | 261 | | |||
264 | void VirtualDesktopTest::testRemoveDesktopWithWindow_data() | 262 | void VirtualDesktopTest::testRemoveDesktopWithWindow_data() | ||
265 | { | 263 | { | ||
266 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 264 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
267 | 265 | | |||
268 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
269 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 266 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
270 | } | 267 | } | ||
271 | 268 | | |||
272 | void VirtualDesktopTest::testRemoveDesktopWithWindow() | 269 | void VirtualDesktopTest::testRemoveDesktopWithWindow() | ||
273 | { | 270 | { | ||
274 | // first create two new desktops | 271 | // first create two new desktops | ||
275 | QCOMPARE(VirtualDesktopManager::self()->count(), 1u); | 272 | QCOMPARE(VirtualDesktopManager::self()->count(), 1u); | ||
276 | VirtualDesktopManager::self()->setCount(3); | 273 | VirtualDesktopManager::self()->setCount(3); | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |