Index: google_apis/gcm/engine/connection_factory_impl_unittest.cc |
diff --git a/google_apis/gcm/engine/connection_factory_impl_unittest.cc b/google_apis/gcm/engine/connection_factory_impl_unittest.cc |
index 82c3f18d9877c875b7622135ecd261f639945f9e..652a50defe5f1786280ce5819e5e8083d2320d93 100644 |
--- a/google_apis/gcm/engine/connection_factory_impl_unittest.cc |
+++ b/google_apis/gcm/engine/connection_factory_impl_unittest.cc |
@@ -19,6 +19,7 @@ namespace gcm { |
namespace { |
const char kMCSEndpoint[] = "http://my.server"; |
+const char kMCSEndpoint2[] = "http://my.alt.server"; |
const int kBackoffDelayMs = 1; |
const int kBackoffMultiplier = 2; |
@@ -50,6 +51,13 @@ const net::BackoffEntry::Policy kTestBackoffPolicy = { |
false, |
}; |
+std::vector<GURL> BuildEndpoints() { |
+ std::vector<GURL> endpoints; |
+ endpoints.push_back(GURL(kMCSEndpoint)); |
+ endpoints.push_back(GURL(kMCSEndpoint2)); |
+ return endpoints; |
+} |
+ |
// Helper for calculating total expected exponential backoff delay given an |
// arbitrary number of failed attempts. See BackoffEntry::CalculateReleaseTime. |
double CalculateBackoff(int num_attempts) { |
@@ -132,7 +140,7 @@ class TestConnectionFactoryImpl : public ConnectionFactoryImpl { |
TestConnectionFactoryImpl::TestConnectionFactoryImpl( |
const base::Closure& finished_callback) |
- : ConnectionFactoryImpl(GURL(kMCSEndpoint), |
+ : ConnectionFactoryImpl(BuildEndpoints(), |
jianli
2014/03/20 01:11:53
Do we have a test to verify that the 2nd endpoint
Nicolas Zea
2014/03/20 20:10:02
Done.
|
net::BackoffEntry::Policy(), |
NULL, |
NULL), |