chromium/components/policy/test_support/client_storage_unittest.cc

// Copyright 2021 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/policy/test_support/client_storage.h"

#include <string_view>

#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace policy {

namespace {

constexpr const char kDeviceId1[] =;
constexpr const char kDeviceId2[] =;
constexpr const char kStateKey1[] =;
constexpr const char kStateKey2[] =;
constexpr const char kStateKey3[] =;
constexpr const char kStateKey4[] =;
constexpr const char kDeviceToken[] =;
constexpr const char kNonExistingDeviceToken[] =;
constexpr const uint64_t kModulus =;
constexpr const uint64_t kRemainder =;
// Following SHA256 hashes produce |kRemainder| when divided by |kModulus|.
constexpr std::string_view kSHA256HashForStateKey1(
    "\x3e\x74\x4b\x9d\xc3\x93\x89\xba\xf0\xc5\xa0\x66\x05\x89\xb8\x40\x2f\x3d"
    "\xbb\x49\xb8\x9b\x3e\x75\xf2\xc9\x35\x58\x52\xa3\xc6\x77",
    32);
constexpr std::string_view kSHA256HashForStateKey4(
    "\x64\xda\xa4\x4a\xd4\x93\xff\x28\xa9\x6e\xff\xab\x6e\x77\xf1\x73\x2a\x3d"
    "\x97\xd8\x32\x41\x58\x1b\x37\xdb\xd7\x0a\x7a\x49\x00\xfe",
    32);

void RegisterClient(const std::string& device_token,
                    ClientStorage* client_storage) {}

}  // namespace

TEST(ClientStorageTest, Unregister_Success) {}

TEST(ClientStorageTest, Unregister_NonExistingClient) {}

TEST(ClientStorageTest, GetMatchingStateKeyHashes) {}

}  // namespace policy