chromium/google_apis/gcm/engine/gservices_settings_unittest.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 =;  // seconds = 2 days.
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) {}

}  // namespace

class GServicesSettingsTest : public testing::Test {};

GServicesSettingsTest::GServicesSettingsTest()
    :{}

GServicesSettingsTest::~GServicesSettingsTest() {}

void GServicesSettingsTest::CheckAllSetToDefault() {}

// Verifies default values of the G-services settings and settings digest.
TEST_F(GServicesSettingsTest, DefaultSettingsAndDigest) {}

// Verifies digest calculation for the sample provided by protocol owners.
TEST_F(GServicesSettingsTest, CalculateDigest) {}

// Verifies that settings are not updated when load result is empty.
TEST_F(GServicesSettingsTest, UpdateFromEmptyLoadResult) {}

// Verifies that settings are not when digest value does not match.
TEST_F(GServicesSettingsTest, UpdateFromLoadResultWithSettingMissing) {}

// Verifies that the settings are set correctly based on the load result.
TEST_F(GServicesSettingsTest, UpdateFromLoadResult) {}

// Verifies that the checkin interval is updated to minimum if the original
// value is less than minimum.
TEST_F(GServicesSettingsTest, CheckinResponseMinimumCheckinInterval) {}

// Verifies that default checkin interval can be selectively overwritten.
TEST_F(GServicesSettingsTest, CheckinResponseUpdateCheckinInterval) {}

// Verifies that default registration URL can be selectively overwritten.
TEST_F(GServicesSettingsTest, CheckinResponseUpdateRegistrationURL) {}

// Verifies that default checkin URL can be selectively overwritten.
TEST_F(GServicesSettingsTest, CheckinResponseUpdateCheckinURL) {}

// Verifies that default MCS hostname can be selectively overwritten.
TEST_F(GServicesSettingsTest, CheckinResponseUpdateMCSHostname) {}

// Verifies that default MCS secure port can be selectively overwritten.
TEST_F(GServicesSettingsTest, CheckinResponseUpdateMCSSecurePort) {}

// Update from checkin response should also do incremental update for both cases
// where some settings are removed or added.
TEST_F(GServicesSettingsTest, UpdateFromCheckinResponseSettingsDiff) {}

}  // namespace gcm