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

Unified Diff: google_apis/gcm/engine/unregistration_request_unittest.cc

Issue 2434243002: GCM Engine: Split up reg/unreg UNKNOWN_ERROR to improve metrics (Closed)
Patch Set: Created 4 years, 2 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: google_apis/gcm/engine/unregistration_request_unittest.cc
diff --git a/google_apis/gcm/engine/unregistration_request_unittest.cc b/google_apis/gcm/engine/unregistration_request_unittest.cc
index f27d59dab0418bdb904ee9070bbef49a27bd5751..0f1a34851407d83be6a9b6ecd755fbc1866c9097 100644
--- a/google_apis/gcm/engine/unregistration_request_unittest.cc
+++ b/google_apis/gcm/engine/unregistration_request_unittest.cc
@@ -197,6 +197,17 @@ TEST_F(GCMUnregistrationRequestTest, InvalidParametersError) {
EXPECT_EQ(UnregistrationRequest::INVALID_PARAMETERS, status_);
}
+TEST_F(GCMUnregistrationRequestTest, DeviceRegistrationError) {
+ CreateRequest();
+ request_->Start();
+
+ SetResponse(net::HTTP_OK, "Error=PHONE_REGISTRATION_ERROR");
+ CompleteFetch();
+
+ EXPECT_TRUE(callback_called_);
+ EXPECT_EQ(UnregistrationRequest::DEVICE_REGISTRATION_ERROR, status_);
+}
+
TEST_F(GCMUnregistrationRequestTest, UnkwnownError) {
CreateRequest();
request_->Start();

Powered by Google App Engine
This is Rietveld 408576698