chromium/components/gcm_driver/crypto/gcm_key_store_unittest.cc

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

#include "components/gcm_driver/crypto/gcm_key_store.h"

#include <memory>
#include <string>

#include "base/base64url.h"
#include "base/containers/span.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/gtest_util.h"
#include "base/test/task_environment.h"
#include "components/gcm_driver/crypto/p256_key_util.h"
#include "components/leveldb_proto/public/proto_database.h"
#include "crypto/random.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace gcm {

namespace {

ECPrivateKeyUniquePtr;
EncryptDataVectorUniquePtr;
EntryVectorType;

const char kFakeAppId[] =;
const char kSecondFakeAppId[] =;
const char kFakeAuthorizedEntity[] =;
const char kSecondFakeAuthorizedEntity[] =;
const char kPrivateEncrypted[] =;
const char kPrivateDecrypted[] =;
const char kPublicKey[] =;

// Number of cryptographically secure random bytes to generate as a key pair's
// authentication secret. Must be at least 16 bytes.
const size_t kAuthSecretBytes =;

}  // namespace

class GCMKeyStoreTest : public ::testing::Test {};

TEST_F(GCMKeyStoreTest, EmptyByDefault) {}

TEST_F(GCMKeyStoreTest, CreateAndGetKeys) {}

TEST_F(GCMKeyStoreTest, GetKeysFallback) {}

TEST_F(GCMKeyStoreTest, KeysPersistenceBetweenInstances) {}

TEST_F(GCMKeyStoreTest, CreateAndRemoveKeys) {}

TEST_F(GCMKeyStoreTest, CreateGetAndRemoveKeysSynchronously) {}

TEST_F(GCMKeyStoreTest, RemoveKeysWildcardAuthorizedEntity) {}

TEST_F(GCMKeyStoreTest, GetKeysMultipleAppIds) {}

TEST_F(GCMKeyStoreTest, SuccessiveCallsBeforeInitialization) {}

TEST_F(GCMKeyStoreTest, CannotShareAppIdFromGCMToInstanceID) {}

TEST_F(GCMKeyStoreTest, CannotShareAppIdFromInstanceIDToGCM) {}

TEST_F(GCMKeyStoreTest, TestUpgradePathForKeyStorageDeprecation) {}

}  // namespace gcm