#include "google_apis/gcm/engine/gcm_store_impl.h"
#include <stdint.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/task_environment.h"
#include "google_apis/gcm/base/fake_encryptor.h"
#include "google_apis/gcm/base/gcm_constants.h"
#include "google_apis/gcm/base/mcs_message.h"
#include "google_apis/gcm/base/mcs_util.h"
#include "google_apis/gcm/protocol/mcs.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gcm {
namespace {
const int kNumPersistentIds = …;
const int kNumMessagesPerApp = …;
const char kAppName[] = …;
const char kAppName2[] = …;
const char kCategoryName[] = …;
const uint64_t kDeviceId = …;
const uint64_t kDeviceToken = …;
class GCMStoreImplTest : public testing::Test { … };
GCMStoreImplTest::GCMStoreImplTest()
: … { … }
GCMStoreImplTest::~GCMStoreImplTest() { … }
void GCMStoreImplTest::TearDown() { … }
std::unique_ptr<GCMStoreImpl> GCMStoreImplTest::BuildGCMStore() { … }
void GCMStoreImplTest::LoadGCMStore(
GCMStoreImpl* gcm_store,
std::unique_ptr<GCMStore::LoadResult>* result_dst) { … }
std::string GCMStoreImplTest::GetNextPersistentId() { … }
void GCMStoreImplTest::PumpLoop() { … }
void GCMStoreImplTest::LoadCallback(
std::unique_ptr<GCMStore::LoadResult>* result_dst,
std::unique_ptr<GCMStore::LoadResult> result) { … }
void GCMStoreImplTest::LoadWithoutCheckCallback(
std::unique_ptr<GCMStore::LoadResult>* result_dst,
std::unique_ptr<GCMStore::LoadResult> result) { … }
void GCMStoreImplTest::UpdateCallback(bool success) { … }
TEST_F(GCMStoreImplTest, LoadNew) { … }
TEST_F(GCMStoreImplTest, LoadWithoutCreatingNewStore) { … }
TEST_F(GCMStoreImplTest, LoadWithEmptyDirectory) { … }
TEST_F(GCMStoreImplTest, DeviceCredentials) { … }
TEST_F(GCMStoreImplTest, LastCheckinInfo) { … }
TEST_F(GCMStoreImplTest, GServicesSettings_ProtocolV2) { … }
TEST_F(GCMStoreImplTest, Registrations) { … }
TEST_F(GCMStoreImplTest, IncomingMessages) { … }
TEST_F(GCMStoreImplTest, IncomingMessages_WithTTL) { … }
TEST_F(GCMStoreImplTest, OutgoingMessages) { … }
TEST_F(GCMStoreImplTest, IncomingAndOutgoingMessages) { … }
TEST_F(GCMStoreImplTest, PerAppMessageLimits) { … }
TEST_F(GCMStoreImplTest, AccountMapping) { … }
TEST_F(GCMStoreImplTest, HeartbeatInterval) { … }
TEST_F(GCMStoreImplTest, AddMessageAfterDestroy) { … }
TEST_F(GCMStoreImplTest, ReloadAfterClose) { … }
TEST_F(GCMStoreImplTest, LastTokenFetchTime) { … }
TEST_F(GCMStoreImplTest, InstanceIDData) { … }
}
}