diff options
author | Ted Gould <ted@gould.cx> | 2015-05-28 08:47:18 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2015-05-28 08:47:18 -0500 |
commit | 3f933e4575281846afeb1a98c258bef19f15ab11 (patch) | |
tree | 3388bdc3ab52eff49b99de1a6b1f4db447ffa85b /tests/media-player-user.cc | |
parent | b830d51de707f2b3ce4722fe6a01bf8149b26e27 (diff) | |
download | ayatana-indicator-sound-3f933e4575281846afeb1a98c258bef19f15ab11.tar.gz ayatana-indicator-sound-3f933e4575281846afeb1a98c258bef19f15ab11.tar.bz2 ayatana-indicator-sound-3f933e4575281846afeb1a98c258bef19f15ab11.zip |
Dumping the bus, old school style
Diffstat (limited to 'tests/media-player-user.cc')
-rw-r--r-- | tests/media-player-user.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/media-player-user.cc b/tests/media-player-user.cc index 28568d2..ca20b5f 100644 --- a/tests/media-player-user.cc +++ b/tests/media-player-user.cc @@ -39,6 +39,9 @@ class MediaPlayerUserTest : public ::testing::Test DbusTestService * testsession = NULL; + DbusTestProcess * systemmonitor = nullptr; + DbusTestProcess * sessionmonitor = nullptr; + GDBusConnection * system = NULL; GDBusConnection * session = NULL; GDBusProxy * proxy = NULL; @@ -50,6 +53,11 @@ class MediaPlayerUserTest : public ::testing::Test testsystem = dbus_test_service_new(NULL); dbus_test_service_set_bus(testsystem, DBUS_TEST_SERVICE_BUS_SYSTEM); + systemmonitor = dbus_test_process_new("dbus-monitor"); + dbus_test_process_append_param(systemmonitor, "--system"); + dbus_test_task_set_name(DBUS_TEST_TASK(systemmonitor), "System"); + dbus_test_service_add_task(testsystem, DBUS_TEST_TASK(systemmonitor)); + dbus_test_service_add_task(testsystem, (DbusTestTask*)service_mock); dbus_test_service_start_tasks(testsystem); @@ -62,6 +70,11 @@ class MediaPlayerUserTest : public ::testing::Test testsession = dbus_test_service_new(NULL); dbus_test_service_set_bus(testsession, DBUS_TEST_SERVICE_BUS_SESSION); + sessionmonitor = dbus_test_process_new("dbus-monitor"); + dbus_test_process_append_param(sessionmonitor, "--session"); + dbus_test_task_set_name(DBUS_TEST_TASK(sessionmonitor), "Session"); + dbus_test_service_add_task(testsession, DBUS_TEST_TASK(sessionmonitor)); + dbus_test_service_start_tasks(testsession); session = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL); @@ -81,6 +94,9 @@ class MediaPlayerUserTest : public ::testing::Test } virtual void TearDown() { + g_clear_object(&sessionmonitor); + g_clear_object(&systemmonitor); + g_clear_object(&proxy); g_clear_object(&testsystem); g_clear_object(&testsession); |