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

Unified Diff: components/gcm_driver/gcm_client_impl_unittest.cc

Issue 2471433003: [GCM] Update ResetStore histograms (Closed)
Patch Set: Mark old histo as obsolete Created 4 years, 1 month 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: components/gcm_driver/gcm_client_impl_unittest.cc
diff --git a/components/gcm_driver/gcm_client_impl_unittest.cc b/components/gcm_driver/gcm_client_impl_unittest.cc
index 2ec07f6923b0e6bd106daffd5cbd3a01fdffc037..e799f28213f6aedbc1203826e1f038146af5efd7 100644
--- a/components/gcm_driver/gcm_client_impl_unittest.cc
+++ b/components/gcm_driver/gcm_client_impl_unittest.cc
@@ -689,10 +689,14 @@ TEST_F(GCMClientImplTest, LoadingBusted) {
// Restart GCM client. The store should be reset and the loading should
// complete successfully.
+
+ base::HistogramTester histogram_tester;
reset_last_event();
BuildGCMClient(base::TimeDelta());
InitializeGCMClient();
StartGCMClient();
+ histogram_tester.ExpectUniqueSample("GCM.ResetStoreReason",
+ 0 /* Loading failed. */, 1);
ASSERT_NO_FATAL_FAILURE(
CompleteCheckin(kDeviceAndroidId2, kDeviceSecurityToken2, std::string(),
std::map<std::string, std::string>()));
@@ -1241,6 +1245,8 @@ TEST_F(GCMClientImplCheckinTest, ResetStoreWhenCheckinRejected) {
std::map<std::string, std::string> settings;
ASSERT_NO_FATAL_FAILURE(FailCheckin(net::HTTP_UNAUTHORIZED));
PumpLoopUntilIdle();
+ histogram_tester.ExpectUniqueSample("GCM.ResetStoreReason",
+ 1 /* Checkin rejected. */, 1);
// Store should have been destroyed. Restart client and verify the initial
// checkin response is persisted.

Powered by Google App Engine
This is Rietveld 408576698