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

Unified Diff: components/gcm_driver/gcm_channel_status_request_unittest.cc

Issue 561943002: Reland: Add GCMChannelStatusSyncer to schedule requests and enable/disable GCM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CrOS test failures Created 6 years, 3 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: components/gcm_driver/gcm_channel_status_request_unittest.cc
diff --git a/components/gcm_driver/gcm_channel_status_request_unittest.cc b/components/gcm_driver/gcm_channel_status_request_unittest.cc
index daf812218e6b5c295dad41e1cd6797a88124a270..961ca4e7c047e812a69592389a04f8a2492abf6c 100644
--- a/components/gcm_driver/gcm_channel_status_request_unittest.cc
+++ b/components/gcm_driver/gcm_channel_status_request_unittest.cc
@@ -136,7 +136,7 @@ TEST_F(GCMChannelStatusRequestTest, ResponseWithDisabledStatus) {
EXPECT_TRUE(request_callback_invoked_);
EXPECT_FALSE(enabled_);
EXPECT_EQ(
- GCMChannelStatusRequest::default_poll_interval_seconds_for_testing(),
+ GCMChannelStatusRequest::default_poll_interval_seconds(),
poll_interval_seconds_);
}
@@ -148,7 +148,7 @@ TEST_F(GCMChannelStatusRequestTest, ResponseWithEnabledStatus) {
EXPECT_TRUE(request_callback_invoked_);
EXPECT_TRUE(enabled_);
EXPECT_EQ(
- GCMChannelStatusRequest::default_poll_interval_seconds_for_testing(),
+ GCMChannelStatusRequest::default_poll_interval_seconds(),
poll_interval_seconds_);
}
@@ -156,8 +156,7 @@ TEST_F(GCMChannelStatusRequestTest, ResponseWithPollInterval) {
// Setting a poll interval 15 minutes longer than the minimum interval we
// enforce.
int poll_interval_seconds =
- GCMChannelStatusRequest::min_poll_interval_seconds_for_testing() +
- 15 * 60;
+ GCMChannelStatusRequest::min_poll_interval_seconds() + 15 * 60;
StartRequest();
SetResponseProtoData(NOT_SPECIFIED, poll_interval_seconds);
CompleteFetch();
@@ -171,22 +170,20 @@ TEST_F(GCMChannelStatusRequestTest, ResponseWithShortPollInterval) {
// Setting a poll interval 15 minutes shorter than the minimum interval we
// enforce.
int poll_interval_seconds =
- GCMChannelStatusRequest::min_poll_interval_seconds_for_testing() -
- 15 * 60;
+ GCMChannelStatusRequest::min_poll_interval_seconds() - 15 * 60;
StartRequest();
SetResponseProtoData(NOT_SPECIFIED, poll_interval_seconds);
CompleteFetch();
EXPECT_TRUE(request_callback_invoked_);
EXPECT_TRUE(enabled_);
- EXPECT_EQ(GCMChannelStatusRequest::min_poll_interval_seconds_for_testing(),
+ EXPECT_EQ(GCMChannelStatusRequest::min_poll_interval_seconds(),
poll_interval_seconds_);
}
TEST_F(GCMChannelStatusRequestTest, ResponseWithDisabledStatusAndPollInterval) {
int poll_interval_seconds =
- GCMChannelStatusRequest::min_poll_interval_seconds_for_testing() +
- 15 * 60;
+ GCMChannelStatusRequest::min_poll_interval_seconds() + 15 * 60;
StartRequest();
SetResponseProtoData(GCM_DISABLED, poll_interval_seconds);
CompleteFetch();
« no previous file with comments | « components/gcm_driver/gcm_channel_status_request.cc ('k') | components/gcm_driver/gcm_channel_status_syncer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698