chromium/media/cdm/cenc_decryptor_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "media/cdm/cenc_decryptor.h"

#include <stdint.h>

#include <algorithm>
#include <string>
#include <vector>

#include "base/containers/span.h"
#include "base/time/time.h"
#include "crypto/encryptor.h"
#include "crypto/symmetric_key.h"
#include "media/base/decoder_buffer.h"
#include "media/base/decrypt_config.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace media {

namespace {

// Keys and IVs have to be 128 bits.
const uint8_t kKey[] =;
static_assert;

const uint8_t kIv[] =;
static_assert;

const uint8_t kOneBlock[] =;

const uint8_t kPartialBlock[] =;

std::string MakeString(const std::vector<uint8_t>& chars) {}

// Combine multiple std::vector<uint8_t> into one.
std::vector<uint8_t> Combine(const std::vector<std::vector<uint8_t>>& inputs) {}

// Returns a std::vector<uint8_t> containing |count| copies of |input|.
std::vector<uint8_t> Repeat(const std::vector<uint8_t>& input, size_t count) {}

}  // namespace

// These tests only test decryption logic.
class CencDecryptorTest : public testing::Test {};

TEST_F(CencDecryptorTest, OneBlock) {}

TEST_F(CencDecryptorTest, ExtraData) {}

TEST_F(CencDecryptorTest, NoSubsamples) {}

TEST_F(CencDecryptorTest, BadSubsamples) {}

TEST_F(CencDecryptorTest, InvalidIv) {}

TEST_F(CencDecryptorTest, InvalidKey) {}

TEST_F(CencDecryptorTest, PartialBlock) {}

TEST_F(CencDecryptorTest, MultipleSubsamples) {}

TEST_F(CencDecryptorTest, MultipleSubsamplesWithClearBytes) {}

}  // namespace media