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

Unified Diff: components/update_client/update_client_unittest.cc

Issue 2831473002: Add a callback parameter to UpdateClient::SendUninstallPing. (Closed)
Patch Set: Created 3 years, 8 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 | « components/update_client/update_client_internal.h ('k') | extensions/browser/updater/update_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/update_client_unittest.cc
diff --git a/components/update_client/update_client_unittest.cc b/components/update_client/update_client_unittest.cc
index dd8302e42cdb64e97b94890147933bbadb113475..20eb9c7f9f29d00d98fb0b5bf787f576ecb9fdbf 100644
--- a/components/update_client/update_client_unittest.cc
+++ b/components/update_client/update_client_unittest.cc
@@ -2233,6 +2233,13 @@ TEST_F(UpdateClientTest, EmptyIdList) {
}
TEST_F(UpdateClientTest, SendUninstallPing) {
+ class CompletionCallbackFake {
+ public:
+ static void Callback(const base::Closure& quit_closure, Error error) {
+ quit_closure.Run();
+ }
+ };
+
class FakeUpdateChecker : public UpdateChecker {
public:
static std::unique_ptr<UpdateChecker> Create(
@@ -2286,8 +2293,11 @@ TEST_F(UpdateClientTest, SendUninstallPing) {
config(), std::move(ping_manager), &FakeUpdateChecker::Create,
&FakeCrxDownloader::Create));
- update_client->SendUninstallPing("jebgalgnebhfojomionfpkfelancnnkf",
- base::Version("1.0"), 10);
+ update_client->SendUninstallPing(
+ "jebgalgnebhfojomionfpkfelancnnkf", base::Version("1.0"), 10,
+ base::Bind(&CompletionCallbackFake::Callback, quit_closure()));
+
+ RunThreads();
}
TEST_F(UpdateClientTest, RetryAfter) {
« no previous file with comments | « components/update_client/update_client_internal.h ('k') | extensions/browser/updater/update_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698