aboutsummaryrefslogtreecommitdiff
path: root/tests/media-player-user.cc
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-05-27 13:59:34 -0500
committerTed Gould <ted@gould.cx>2015-05-27 13:59:34 -0500
commit56f4bcf07cfd06bb7a13d5bdebc6111f57b9f0b3 (patch)
tree7f87c852f5fcb57193abd502e097db4a338182d4 /tests/media-player-user.cc
parent83e25c49ed45d5e16667fe89eb2338f4c3593b52 (diff)
downloadayatana-indicator-sound-56f4bcf07cfd06bb7a13d5bdebc6111f57b9f0b3.tar.gz
ayatana-indicator-sound-56f4bcf07cfd06bb7a13d5bdebc6111f57b9f0b3.tar.bz2
ayatana-indicator-sound-56f4bcf07cfd06bb7a13d5bdebc6111f57b9f0b3.zip
Preset the value to ensure no race condition
Diffstat (limited to 'tests/media-player-user.cc')
-rw-r--r--tests/media-player-user.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/media-player-user.cc b/tests/media-player-user.cc
index 12e967e..28568d2 100644
--- a/tests/media-player-user.cc
+++ b/tests/media-player-user.cc
@@ -242,6 +242,7 @@ TEST_F(MediaPlayerUserTest, DataSet) {
/* Ensure even with the proxy we don't have anything */
bool running = false;
g_signal_connect(G_OBJECT(player), "notify::is-running", G_CALLBACK(running_update), &running);
+ running_update(G_OBJECT(player), nullptr, &running);
EXPECT_EVENTUALLY_EQ(true, running);
EXPECT_TRUE(media_player_get_can_raise(MEDIA_PLAYER(player)));
EXPECT_STREQ("user", media_player_get_id(MEDIA_PLAYER(player)));
@@ -283,6 +284,7 @@ TEST_F(MediaPlayerUserTest, TimeoutTest) {
bool running = false;
g_signal_connect(G_OBJECT(player), "notify::is-running", G_CALLBACK(running_update), &running);
+ running_update(G_OBJECT(player), nullptr, &running);
/* Ensure that we show up as not running */
EXPECT_EVENTUALLY_EQ(false, running);