Files
android/libwvdrmengine/oemcrypto/test/oemcrypto_basic_test.h
Vicky Min 54e6b3d45d Small changes to refactored unit tests
Merge from Widevine repo of http://go/wvgerrit/169064

This CL should cleanup some minor issues that existed after the initial
CLs refactoring the unit tests went in. The issues fixed should be:
1) duplicate decrypt tests
2) decrypt tests added to be run
3) removed unecessary header files
4) refactored some provisioning tests that I had previously overlooked

Bug: 253779846
Merged from https://widevine-internal-review.googlesource.com/167537

Change-Id: Ic474fbcf69a08c0482b5e74d0c80be2cd16702d8
2023-03-28 20:30:22 +00:00

42 lines
1.2 KiB
C++

// Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine
// License Agreement.
//
// Test data for OEMCrypto unit tests.
//
#ifndef CDM_OEMCRYPTO_BASIC_TEST_
#define CDM_OEMCRYPTO_BASIC_TEST_
#include <vector>
#include <gtest/gtest.h>
#include "OEMCryptoCENC.h"
#include "oemcrypto_session_tests_helper.h"
namespace wvoec {
const char* HDCPCapabilityAsString(OEMCrypto_HDCP_Capability value);
std::string MaybeHex(const uint8_t* data, size_t length);
std::string MaybeHex(const std::vector<uint8_t>& data);
/** Tests for just basic client functionality. */
class OEMCryptoClientTest : public ::testing::Test, public SessionUtil {
protected:
OEMCryptoClientTest() {}
void SetUp() override;
void TearDown() override;
const uint8_t* find(const std::vector<uint8_t>& message,
const std::vector<uint8_t>& substring);
OEMCryptoResult CopyBuffer(
OEMCrypto_SESSION session, OEMCrypto_SharedMemory* input_buffer,
size_t input_buffer_size,
const OEMCrypto_DestBufferDesc* dest_buffer_descriptor,
uint8_t subsample_flags);
};
} // namespace wvoec
#endif // CDM_OEMCRYPTO_BASIC_TEST_