aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/indicator-sound-test-base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/indicator-sound-test-base.cpp')
-rw-r--r--tests/integration/indicator-sound-test-base.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/integration/indicator-sound-test-base.cpp b/tests/integration/indicator-sound-test-base.cpp
index 2b6b3d7..16f0bd6 100644
--- a/tests/integration/indicator-sound-test-base.cpp
+++ b/tests/integration/indicator-sound-test-base.cpp
@@ -109,6 +109,25 @@ bool IndicatorSoundTestBase::startTestMprisPlayer(QString const& playerName)
return true;
}
+bool IndicatorSoundTestBase::setTestMprisPlayerProperty(QString const &testPlayer, QString const &property, bool value)
+{
+ QProcess setProperty;
+ QString strValue;
+ strValue = value ? "true" : "false";
+
+ setProperty.start(MEDIA_PLAYER_MPRIS_UPDATE_BIN, QStringList()
+ << testPlayer
+ << property
+ << strValue);
+ if (!setProperty.waitForStarted())
+ return false;
+
+ if (!setProperty.waitForFinished())
+ return false;
+
+ return setProperty.exitCode() == 0;
+}
+
bool IndicatorSoundTestBase::startTestSound(QString const &role)
{
testSoundProcess.terminate();