~ubuntu-branches/ubuntu/vivid/whoopsie/vivid-proposed

« back to all changes in this revision

Viewing changes to src/tests/test_monitor.c

  • Committer: Package Import Robot
  • Author(s): Evan Dandrea, Brian Murray, John Lenton, Ted Gould
  • Date: 2014-06-02 11:10:40 UTC
  • Revision ID: package-import@ubuntu.com-20140602111040-q81ojkfwo7w6gx36
Tags: 0.2.27
[ Brian Murray ]
* Log that we are offline because we are using a network connection where
  one may have to pay for data usage.

[ John Lenton ]
* Ask ofono for the IMEI as an id source.
* Don't return null string during session start (LP: #1311571).
* Fix attempting to remove a source that has already been removed.

[ Ted Gould ]
* Don't break if whoopsie is running (i.e. developer system).

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
test_callback_not_triggered_without_upload_file (void)
187
187
{
188
188
    char template[12] = "/tmp/XXXXXX";
189
 
    int id;
190
189
    GFileMonitor* monitor = NULL;
191
190
 
192
191
    mktemp (template);
204
203
 
205
204
    g_idle_add ((GSourceFunc) _create_crash_file, template);
206
205
    loop = g_main_loop_new (NULL, FALSE);
207
 
    id = g_timeout_add_seconds (2, (GSourceFunc) g_main_loop_quit, loop);
 
206
    g_timeout_add_seconds (2, (GSourceFunc) g_main_loop_quit, loop);
208
207
 
209
208
    monitor = monitor_directory (template, _test_callback_never_triggered_callback);
210
209
    g_main_loop_run (loop);
211
210
    if (monitor)
212
211
        unmonitor_directory (monitor, _test_callback_never_triggered_callback);
213
 
    g_source_remove (id);
214
212
    g_main_loop_unref (loop);
215
213
}
216
214