| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/strings/string_number_conversions.h" | 5 #include "base/strings/string_number_conversions.h" |
| 6 #include "google_apis/gcm/engine/gservices_settings.h" | 6 #include "google_apis/gcm/engine/gservices_settings.h" |
| 7 #include "google_apis/gcm/engine/registration_info.h" | 7 #include "google_apis/gcm/engine/registration_info.h" |
| 8 #include "google_apis/gcm/gcm_client.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 9 |
| 11 namespace gcm { | 10 namespace gcm { |
| 12 | 11 |
| 13 namespace { | 12 namespace { |
| 14 | 13 |
| 15 const int64 kAlternativeCheckinInterval = 16 * 60 * 60; | 14 const int64 kAlternativeCheckinInterval = 16 * 60 * 60; |
| 16 const char kAlternativeCheckinURL[] = "http://alternative.url/checkin"; | 15 const char kAlternativeCheckinURL[] = "http://alternative.url/checkin"; |
| 17 const char kAlternativeMCSHostname[] = "alternative.gcm.host"; | 16 const char kAlternativeMCSHostname[] = "alternative.gcm.host"; |
| 18 const int kAlternativeMCSSecurePort = 7777; | 17 const int kAlternativeMCSSecurePort = 7777; |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 checkin_response.Clear(); | 327 checkin_response.Clear(); |
| 329 AddSettingsToResponse(checkin_response, settings_diff, true); | 328 AddSettingsToResponse(checkin_response, settings_diff, true); |
| 330 EXPECT_TRUE(settings().UpdateFromCheckinResponse(checkin_response)); | 329 EXPECT_TRUE(settings().UpdateFromCheckinResponse(checkin_response)); |
| 331 EXPECT_EQ(full_settings, settings().settings_map()); | 330 EXPECT_EQ(full_settings, settings().settings_map()); |
| 332 // Default setting back to norm. | 331 // Default setting back to norm. |
| 333 EXPECT_EQ(GURL("https://mtalk.google.com:5228"), | 332 EXPECT_EQ(GURL("https://mtalk.google.com:5228"), |
| 334 settings().GetMCSMainEndpoint()); | 333 settings().GetMCSMainEndpoint()); |
| 335 } | 334 } |
| 336 | 335 |
| 337 } // namespace gcm | 336 } // namespace gcm |
| OLD | NEW |