Add test for application menu in PWM interface
Test Plan: See that the test works as expected. Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D28164
This commit is contained in:
parent
a20f5db598
commit
53a0c4faec
1 changed files with 18 additions and 0 deletions
|
@ -55,6 +55,7 @@ private Q_SLOTS:
|
|||
void testGeometry();
|
||||
void testIcon();
|
||||
void testPid();
|
||||
void testApplicationMenu();
|
||||
|
||||
void cleanup();
|
||||
|
||||
|
@ -638,5 +639,22 @@ void TestWindowManagement::testPid()
|
|||
|
||||
}
|
||||
|
||||
void TestWindowManagement::testApplicationMenu()
|
||||
{
|
||||
using namespace KWayland::Client;
|
||||
|
||||
const auto serviceName = QStringLiteral("org.kde.foo");
|
||||
const auto objectPath = QStringLiteral("/org/kde/bar");
|
||||
|
||||
m_windowInterface->setApplicationMenuPaths(serviceName, objectPath);
|
||||
|
||||
QSignalSpy applicationMenuChangedSpy(m_window, &PlasmaWindow::applicationMenuChanged);
|
||||
QVERIFY(applicationMenuChangedSpy.isValid());
|
||||
QVERIFY(applicationMenuChangedSpy.wait());
|
||||
|
||||
QCOMPARE(m_window->applicationMenuServiceName(), serviceName);
|
||||
QCOMPARE(m_window->applicationMenuObjectPath(), objectPath);
|
||||
}
|
||||
|
||||
QTEST_MAIN(TestWindowManagement)
|
||||
#include "test_wayland_windowmanagement.moc"
|
||||
|
|
Loading…
Reference in a new issue