chromium/components/payments/content/payment_method_manifest_table_unittest.cc

// Copyright 2017 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/payments/content/payment_method_manifest_table.h"

#include <stdint.h>

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/containers/contains.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "components/payments/core/secure_payment_confirmation_credential.h"
#include "components/webdata/common/web_database.h"
#include "content/public/common/content_features.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace payments {
namespace {

// Creates one identifier (for a credential or user) for testing.
std::vector<uint8_t> CreateIdentifier(uint8_t first_byte) {}

// Creates one credential identifier for testing. Equivalent to calling
// CreateIdentifier, used for test readability.
std::vector<uint8_t> CreateCredentialId(uint8_t first_byte = 0) {}

// Creates a list of one credential identifier for testing.
std::vector<std::vector<uint8_t>> CreateCredentialIdList(
    uint8_t first_byte = 0) {}

// Creates one user identifier for testing. Equivalent to calling
// CreateIdentifier, used for test readability.
std::vector<uint8_t> CreateUserId(uint8_t first_byte = 4) {}

void ExpectOneValidCredential(
    const std::vector<uint8_t>& credential_id,
    const std::string& relying_party_id,
    const std::vector<uint8_t>& user_id,
    std::vector<std::unique_ptr<SecurePaymentConfirmationCredential>>
        credentials) {}

class PaymentMethodManifestTableTest : public testing::Test {};

TEST_F(PaymentMethodManifestTableTest, GetNonExistManifest) {}

TEST_F(PaymentMethodManifestTableTest, AddAndGetSingleManifest) {}

TEST_F(PaymentMethodManifestTableTest, AddAndGetMultipleManifest) {}

TEST_F(PaymentMethodManifestTableTest, GetNonExistingCredential) {}

TEST_F(PaymentMethodManifestTableTest, AddAndGetOneValidCredential) {}

TEST_F(PaymentMethodManifestTableTest, AddingInvalidCredentialReturnsFalse) {}

TEST_F(PaymentMethodManifestTableTest, UpdatingCredentialReturnsTrue) {}

TEST_F(PaymentMethodManifestTableTest,
       DifferentRelyingPartiesCannotUseSameCredentialIdentifier) {}

TEST_F(PaymentMethodManifestTableTest, RelyingPartyCanHaveMultipleCredentials) {}

TEST_F(PaymentMethodManifestTableTest,
       SameRelyingPartyAndUserIdOverwritesCredential) {}

TEST_F(PaymentMethodManifestTableTest, ClearCredentials) {}

TEST_F(PaymentMethodManifestTableTest,
       ClearCredentials_NotDeleteOutOfTimeRange) {}

TEST_F(PaymentMethodManifestTableTest,
       CredentialTableAddDateCreatedAndUserIdColumn) {}

// Test migrating an existing credential table that didn't have the user ID.
TEST_F(PaymentMethodManifestTableTest, CredentialTableUserIdMigration) {}

}  // namespace
}  // namespace payments