#include <stdint.h>
#include "base/strings/string_number_conversions.h"
#include "google_apis/gcm/engine/gservices_settings.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gcm {
namespace {
const int64_t kAlternativeCheckinInterval = …;
const char kAlternativeCheckinURL[] = …;
const char kAlternativeMCSHostname[] = …;
const int kAlternativeMCSSecurePort = …;
const char kAlternativeRegistrationURL[] = …;
const int64_t kDefaultCheckinInterval = …;
const char kDefaultCheckinURL[] = …;
const char kDefaultRegistrationURL[] = …;
const char kDefaultSettingsDigest[] = …;
const char kAlternativeSettingsDigest[] = …;
void AddSettingsToResponse(
checkin_proto::AndroidCheckinResponse& checkin_response,
const GServicesSettings::SettingsMap& settings,
bool settings_diff) { … }
}
class GServicesSettingsTest : public testing::Test { … };
GServicesSettingsTest::GServicesSettingsTest()
: … { … }
GServicesSettingsTest::~GServicesSettingsTest() { … }
void GServicesSettingsTest::CheckAllSetToDefault() { … }
TEST_F(GServicesSettingsTest, DefaultSettingsAndDigest) { … }
TEST_F(GServicesSettingsTest, CalculateDigest) { … }
TEST_F(GServicesSettingsTest, UpdateFromEmptyLoadResult) { … }
TEST_F(GServicesSettingsTest, UpdateFromLoadResultWithSettingMissing) { … }
TEST_F(GServicesSettingsTest, UpdateFromLoadResult) { … }
TEST_F(GServicesSettingsTest, CheckinResponseMinimumCheckinInterval) { … }
TEST_F(GServicesSettingsTest, CheckinResponseUpdateCheckinInterval) { … }
TEST_F(GServicesSettingsTest, CheckinResponseUpdateRegistrationURL) { … }
TEST_F(GServicesSettingsTest, CheckinResponseUpdateCheckinURL) { … }
TEST_F(GServicesSettingsTest, CheckinResponseUpdateMCSHostname) { … }
TEST_F(GServicesSettingsTest, CheckinResponseUpdateMCSSecurePort) { … }
TEST_F(GServicesSettingsTest, UpdateFromCheckinResponseSettingsDiff) { … }
}