Changeset View
Changeset View
Standalone View
Standalone View
autotests/client/test_wayland_windowmanagement.cpp
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 35 | private Q_SLOTS: | |||
---|---|---|---|---|---|
50 | void testKeepBelow(); | 50 | void testKeepBelow(); | ||
51 | void testShowingDesktop(); | 51 | void testShowingDesktop(); | ||
52 | void testRequestShowingDesktop_data(); | 52 | void testRequestShowingDesktop_data(); | ||
53 | void testRequestShowingDesktop(); | 53 | void testRequestShowingDesktop(); | ||
54 | void testParentWindow(); | 54 | void testParentWindow(); | ||
55 | void testGeometry(); | 55 | void testGeometry(); | ||
56 | void testIcon(); | 56 | void testIcon(); | ||
57 | void testPid(); | 57 | void testPid(); | ||
58 | void testApplicationMenu(); | ||||
58 | 59 | | |||
59 | void cleanup(); | 60 | void cleanup(); | ||
60 | 61 | | |||
61 | private: | 62 | private: | ||
62 | KWayland::Server::Display *m_display; | 63 | KWayland::Server::Display *m_display; | ||
63 | KWayland::Server::CompositorInterface *m_compositorInterface; | 64 | KWayland::Server::CompositorInterface *m_compositorInterface; | ||
64 | KWayland::Server::PlasmaWindowManagementInterface *m_windowManagementInterface; | 65 | KWayland::Server::PlasmaWindowManagementInterface *m_windowManagementInterface; | ||
65 | KWayland::Server::PlasmaWindowInterface *m_windowInterface; | 66 | KWayland::Server::PlasmaWindowInterface *m_windowInterface; | ||
▲ Show 20 Lines • Show All 567 Lines • ▼ Show 20 Line(s) | 626 | { | |||
633 | QVERIFY(windowSpy.wait()); | 634 | QVERIFY(windowSpy.wait()); | ||
634 | QScopedPointer<PlasmaWindow> newWindow( windowSpy.first().first().value<KWayland::Client::PlasmaWindow *>()); | 635 | QScopedPointer<PlasmaWindow> newWindow( windowSpy.first().first().value<KWayland::Client::PlasmaWindow *>()); | ||
635 | QVERIFY(newWindow); | 636 | QVERIFY(newWindow); | ||
636 | QVERIFY(newWindow->pid() == 0); | 637 | QVERIFY(newWindow->pid() == 0); | ||
637 | 638 | | |||
638 | 639 | | |||
639 | } | 640 | } | ||
640 | 641 | | |||
642 | void TestWindowManagement::testApplicationMenu() | ||||
643 | { | ||||
644 | using namespace KWayland::Client; | ||||
645 | | ||||
646 | const auto serviceName = QStringLiteral("org.kde.foo"); | ||||
647 | const auto objectPath = QStringLiteral("/org/kde/bar"); | ||||
648 | | ||||
649 | m_windowInterface->setApplicationMenuPaths(serviceName, objectPath); | ||||
650 | | ||||
651 | QSignalSpy applicationMenuChangedSpy(m_window, &PlasmaWindow::applicationMenuChanged); | ||||
652 | QVERIFY(applicationMenuChangedSpy.isValid()); | ||||
653 | QVERIFY(applicationMenuChangedSpy.wait()); | ||||
654 | | ||||
655 | QCOMPARE(m_window->applicationMenuServiceName(), serviceName); | ||||
656 | QCOMPARE(m_window->applicationMenuObjectPath(), objectPath); | ||||
657 | } | ||||
658 | | ||||
641 | QTEST_MAIN(TestWindowManagement) | 659 | QTEST_MAIN(TestWindowManagement) | ||
642 | #include "test_wayland_windowmanagement.moc" | 660 | #include "test_wayland_windowmanagement.moc" |