~ubuntu-branches/debian/sid/glib2.0/sid

« back to all changes in this revision

Viewing changes to gio/tests/gdbus-proxy-well-known-name.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 06:25:57 UTC
  • mfrom: (1.27.14) (3.1.181 experimental)
  • Revision ID: package-import@ubuntu.com-20130508062557-i7gbku66mls70gi2
Tags: 2.36.1-2
Merge experimental branch, upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
 
64
64
  session_bus_up ();
65
65
 
66
 
  /* TODO: wait a bit for the bus to come up.. ideally session_bus_up() won't return
67
 
   * until one can connect to the bus but that's not how things work right now
68
 
   */
69
 
  usleep (500 * 1000);
70
 
 
71
66
  error = NULL;
72
67
  c = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
73
68
  g_assert_no_error (error);
103
98
  g_assert (g_dbus_proxy_get_cached_property_names (ap) == NULL);
104
99
 
105
100
  /* this is safe; testserver will exit once the bus goes away */
106
 
  g_assert (g_spawn_command_line_async (SRCDIR "/gdbus-testserver.py", NULL));
 
101
  g_assert (g_spawn_command_line_async ("./gdbus-testserver", NULL));
107
102
 
108
103
  /* check that we get the notify::g-name-owner signal */
109
104
  _g_assert_property_notify (p, "g-name-owner");
229
224
   * the 'y' property should be back at 1...
230
225
   */
231
226
  /* this is safe; testserver will exit once the bus goes away */
232
 
  g_assert (g_spawn_command_line_async (SRCDIR "/gdbus-testserver.py", NULL));
 
227
  g_assert (g_spawn_command_line_async ("./gdbus-testserver", NULL));
233
228
  /* check that we get the notify::g-name-owner signal */
234
229
  _g_assert_property_notify (p, "g-name-owner");
235
230
  /* Now we should have a name owner as well as properties */
264
259
{
265
260
  gint ret;
266
261
 
267
 
  g_type_init ();
268
262
  g_test_init (&argc, &argv, NULL);
269
263
 
270
264
  /* all the tests rely on a shared main loop */
271
265
  loop = g_main_loop_new (NULL, FALSE);
272
266
 
273
 
  /* all the tests use a session bus with a well-known address that we can bring up and down
274
 
   * using session_bus_up() and session_bus_down().
275
 
   */
276
 
  g_unsetenv ("DISPLAY");
277
 
  g_setenv ("DBUS_SESSION_BUS_ADDRESS", session_bus_get_temporary_address (), TRUE);
 
267
  g_test_dbus_unset ();
278
268
 
279
269
  g_test_add_func ("/gdbus/proxy-well-known-name", test_proxy_well_known_name);
280
270