Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: http_fetcher_unittest.cc

Issue 6516026: AU: Make proxy resolution asynchronous. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fix utils.* include paths Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « http_fetcher.cc ('k') | libcurl_http_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: http_fetcher_unittest.cc
diff --git a/http_fetcher_unittest.cc b/http_fetcher_unittest.cc
index ccda0b67e8096a4354ebcdb1cf6b111e216e3fb1..8170b7b1a4e8a51ef5733e1d83792bf4c3901aed 100644
--- a/http_fetcher_unittest.cc
+++ b/http_fetcher_unittest.cc
@@ -316,15 +316,12 @@ TYPED_TEST(HttpFetcherTest, PauseTest) {
typename TestFixture::HttpServer server;
ASSERT_TRUE(server.started_);
- GSource* timeout_source_;
- timeout_source_ = g_timeout_source_new(0); // ms
- g_source_set_callback(timeout_source_, UnpausingTimeoutCallback, &delegate,
- NULL);
- g_source_attach(timeout_source_, NULL);
+
+ guint callback_id = g_timeout_add(500, UnpausingTimeoutCallback, &delegate);
fetcher->BeginTransfer(this->BigUrl());
g_main_loop_run(loop);
- g_source_destroy(timeout_source_);
+ g_source_remove(callback_id);
}
g_main_loop_unref(loop);
}
« no previous file with comments | « http_fetcher.cc ('k') | libcurl_http_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698