Source release 16.3.0
This commit is contained in:
@@ -4,12 +4,17 @@
|
||||
#ifndef WVCDM_CDM_TEST_TEST_HOST_H_
|
||||
#define WVCDM_CDM_TEST_TEST_HOST_H_
|
||||
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cdm.h"
|
||||
#include "test_sleep.h"
|
||||
|
||||
// This provides a host environment for running CDM tests. It implements the
|
||||
// IStorage, IClock and ITimer interfaces that a host would normally implement,
|
||||
// while allowing them to be manipulated by the test.
|
||||
class TestHost : public widevine::Cdm::IStorage,
|
||||
public widevine::Cdm::IClock,
|
||||
public widevine::Cdm::ITimer,
|
||||
@@ -19,11 +24,15 @@ class TestHost : public widevine::Cdm::IStorage,
|
||||
~TestHost();
|
||||
void Reset();
|
||||
|
||||
// Used for manipulating and inspecting timer states during testing.
|
||||
void ElapseTime(int64_t milliseconds) override;
|
||||
int NumTimers() const;
|
||||
|
||||
// This should be called before trying to write the cert.bin file. This is
|
||||
// used when testing device provisioning.
|
||||
void SaveProvisioningInformation() { save_device_cert_ = true; }
|
||||
|
||||
// widevine::Cdm::IStorage
|
||||
bool read(const std::string& name, std::string* data) override;
|
||||
bool write(const std::string& name, const std::string& data) override;
|
||||
bool exists(const std::string& name) override;
|
||||
@@ -31,8 +40,10 @@ class TestHost : public widevine::Cdm::IStorage,
|
||||
int32_t size(const std::string& name) override;
|
||||
bool list(std::vector<std::string>* names) override;
|
||||
|
||||
// widevine::Cdm::IClock
|
||||
int64_t now() override;
|
||||
|
||||
// widevine::Cdm::ITimer
|
||||
void setTimeout(int64_t delay_ms, IClient* client, void* context) override;
|
||||
void cancel(IClient* client) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user