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

Unified Diff: chrome/browser/services/gcm/gcm_profile_service_unittest.cc

Issue 914693002: Push API: Fix unsubscribing from GCM on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now compiles and passes tests (and uses CHECK_EQ) Created 5 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
Index: chrome/browser/services/gcm/gcm_profile_service_unittest.cc
diff --git a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
index 2b1499a636811678df1916e2f33d7b9eb0057136..dc473183a7468837e0f05066e1f485da5e8514a3 100644
--- a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
@@ -61,7 +61,8 @@ class GCMProfileServiceTest : public testing::Test {
void CreateGCMProfileService();
void RegisterAndWaitForCompletion(const std::vector<std::string>& sender_ids);
- void UnregisterAndWaitForCompletion();
+ void UnregisterAndWaitForCompletion(
+ const std::vector<std::string>& sender_ids);
void SendAndWaitForCompletion(const GCMClient::OutgoingMessage& message);
void RegisterCompleted(const base::Closure& callback,
@@ -147,10 +148,12 @@ void GCMProfileServiceTest::RegisterAndWaitForCompletion(
run_loop.Run();
}
-void GCMProfileServiceTest::UnregisterAndWaitForCompletion() {
+void GCMProfileServiceTest::UnregisterAndWaitForCompletion(
+ const std::vector<std::string>& sender_ids) {
base::RunLoop run_loop;
gcm_profile_service_->driver()->Unregister(
kTestAppID,
+ sender_ids,
base::Bind(&GCMProfileServiceTest::UnregisterCompleted,
base::Unretained(this),
run_loop.QuitClosure()));
@@ -207,7 +210,7 @@ TEST_F(GCMProfileServiceTest, RegisterAndUnregister) {
EXPECT_EQ(expected_registration_id, registration_id());
EXPECT_EQ(GCMClient::SUCCESS, registration_result());
- UnregisterAndWaitForCompletion();
+ UnregisterAndWaitForCompletion(sender_ids);
EXPECT_EQ(GCMClient::SUCCESS, unregistration_result());
}

Powered by Google App Engine
This is Rietveld 408576698