| 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 "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace gcm { | 10 namespace gcm { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 setting->set_value(iter->second); | 39 setting->set_value(iter->second); |
| 40 } | 40 } |
| 41 checkin_response.set_settings_diff(settings_diff); | 41 checkin_response.set_settings_diff(settings_diff); |
| 42 } | 42 } |
| 43 | 43 |
| 44 } // namespace | 44 } // namespace |
| 45 | 45 |
| 46 class GServicesSettingsTest : public testing::Test { | 46 class GServicesSettingsTest : public testing::Test { |
| 47 public: | 47 public: |
| 48 GServicesSettingsTest(); | 48 GServicesSettingsTest(); |
| 49 virtual ~GServicesSettingsTest(); | 49 ~GServicesSettingsTest() override; |
| 50 | 50 |
| 51 void CheckAllSetToDefault(); | 51 void CheckAllSetToDefault(); |
| 52 | 52 |
| 53 GServicesSettings& settings() { | 53 GServicesSettings& settings() { |
| 54 return gservices_settings_; | 54 return gservices_settings_; |
| 55 } | 55 } |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 GServicesSettings gservices_settings_; | 58 GServicesSettings gservices_settings_; |
| 59 }; | 59 }; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 checkin_response.Clear(); | 327 checkin_response.Clear(); |
| 328 AddSettingsToResponse(checkin_response, settings_diff, true); | 328 AddSettingsToResponse(checkin_response, settings_diff, true); |
| 329 EXPECT_TRUE(settings().UpdateFromCheckinResponse(checkin_response)); | 329 EXPECT_TRUE(settings().UpdateFromCheckinResponse(checkin_response)); |
| 330 EXPECT_EQ(full_settings, settings().settings_map()); | 330 EXPECT_EQ(full_settings, settings().settings_map()); |
| 331 // Default setting back to norm. | 331 // Default setting back to norm. |
| 332 EXPECT_EQ(GURL("https://mtalk.google.com:5228"), | 332 EXPECT_EQ(GURL("https://mtalk.google.com:5228"), |
| 333 settings().GetMCSMainEndpoint()); | 333 settings().GetMCSMainEndpoint()); |
| 334 } | 334 } |
| 335 | 335 |
| 336 } // namespace gcm | 336 } // namespace gcm |
| OLD | NEW |