Add some policy integration tests
Cherry-pick from branch rvc-dev of http://go/wvgerrit/105824 and rvc-widevine-release http://go/ag/12561660 This adds two policy integration tests to verify that we are handling offline licenses correctly. Bug: 161023174 Bug: 129301787 Test: WV unit/integration tests Change-Id: I20f5d6a9fbfd2ff8cff361e1005e45b46c700704
This commit is contained in:
@@ -76,6 +76,27 @@ class WvCdmTestBase : public ::testing::Test {
|
||||
bool binary_provisioning_;
|
||||
};
|
||||
|
||||
// This just makes the constructor public so that we can create one with dummy
|
||||
// metrics and file system.
|
||||
class TestCdmEngine : public CdmEngine {
|
||||
public:
|
||||
TestCdmEngine(FileSystem* file_system,
|
||||
std::shared_ptr<metrics::EngineMetrics> metrics)
|
||||
: CdmEngine(file_system, metrics) {}
|
||||
};
|
||||
|
||||
class WvCdmTestBaseWithEngine : public WvCdmTestBase {
|
||||
public:
|
||||
WvCdmTestBaseWithEngine()
|
||||
: dummy_engine_metrics_(new metrics::EngineMetrics()),
|
||||
cdm_engine_(&file_system_, dummy_engine_metrics_) {}
|
||||
|
||||
protected:
|
||||
FileSystem file_system_;
|
||||
shared_ptr<metrics::EngineMetrics> dummy_engine_metrics_;
|
||||
TestCdmEngine cdm_engine_;
|
||||
};
|
||||
|
||||
class TestCryptoSession : public CryptoSession {
|
||||
public:
|
||||
explicit TestCryptoSession(metrics::CryptoMetrics* crypto_metrics);
|
||||
|
||||
Reference in New Issue
Block a user