aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/indicator-sound-test-base.cpp
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-09-25 10:31:24 +0200
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-09-25 10:31:24 +0200
commit5d88ce9836c1d32abfd369e650354ed855ec4654 (patch)
tree89bec140f86d907b747683ab7c53b555ed0f10ff /tests/integration/indicator-sound-test-base.cpp
parent035626d4df388a10e65226a81bd380f277fb12d2 (diff)
downloadayatana-indicator-sound-5d88ce9836c1d32abfd369e650354ed855ec4654.tar.gz
ayatana-indicator-sound-5d88ce9836c1d32abfd369e650354ed855ec4654.tar.bz2
ayatana-indicator-sound-5d88ce9836c1d32abfd369e650354ed855ec4654.zip
Added attribute_not_set to gmenuharness, added tests for player control buttons
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();