// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary // source code may only be used and distributed under the Widevine Master // License Agreement. #ifndef WVCDM_CORE_TEST_BASE_H_ #define WVCDM_CORE_TEST_BASE_H_ #include #include "config_test_env.h" #include "crypto_session.h" #include "metrics_collections.h" namespace wvcdm { // This is the base class for Widevine CDM integration tests. It's main use is // to configure OEMCrypto to use a test keybox. class WvCdmTestBase : public ::testing::Test { public: WvCdmTestBase() {} virtual ~WvCdmTestBase() {} virtual void SetUp(); // Install a test keybox, if appropriate. static void InstallTestRootOfTrust(); }; class TestCryptoSession : public CryptoSession { public: explicit TestCryptoSession(metrics::CryptoMetrics* crypto_metrics); // This intercepts nonce flood errors, which is useful for tests that request // many nonces and are not time critical. bool GenerateNonce(uint32_t* nonce); }; } // namespace wvcdm #endif // WVCDM_CORE_TEST_BASE_H_