diff options
author | Dan Winship <danw@gnome.org> | 2013-07-13 10:22:14 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2013-07-13 10:22:14 -0400 |
commit | 11811349f8a10ce419d980c01a518c774fe8a5e5 (patch) | |
tree | 0bce69570d1985b25cdebbd327a213118c9797c4 /tests/test-utils.c | |
parent | 75af66a37dcf564bcc9e73080e1e93f51925a7d3 (diff) | |
download | libsoup-11811349f8a10ce419d980c01a518c774fe8a5e5.tar.gz |
misc-test: add a test that preemptively cancelling a SoupRequest works
https://bugzilla.gnome.org/show_bug.cgi?id=637039
Diffstat (limited to 'tests/test-utils.c')
-rw-r--r-- | tests/test-utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test-utils.c b/tests/test-utils.c index b528b786..248f2fe8 100644 --- a/tests/test-utils.c +++ b/tests/test-utils.c @@ -468,6 +468,8 @@ soup_test_request_send (SoupRequest *req, guint interval = flags & SOUP_TEST_REQUEST_CANCEL_SOON ? 100 : 0; g_timeout_add_full (G_PRIORITY_HIGH, interval, cancel_request_timeout, cancel_data, NULL); } + if (cancel_data && (flags & SOUP_TEST_REQUEST_CANCEL_PREEMPTIVE)) + g_cancellable_cancel (cancellable); soup_request_send_async (req, cancellable, async_as_sync_callback, &data); g_main_loop_run (data.loop); |