Fix CanSetServiceCertificate Test
(This is a merge of http://go/wvgerrit/14783) When validation was added to the service certificate property, it broke the associated test, which sends random data. It also did not do any testing of the new validation itself. This fix makes the validation method on WvContentDecryptionModule non-static so that it can be mocked and handled appropriately in the test. Bug: 21923281 Change-Id: Id5d2315709fce35f9347b3545f594371810349f0
This commit is contained in:
@@ -25,7 +25,6 @@ class WvContentDecryptionModule : public android::RefBase, public TimerHandler {
|
||||
static bool IsSupported(const std::string& init_data_type);
|
||||
static bool IsCenc(const std::string& init_data_type);
|
||||
static bool IsWebm(const std::string& init_data_type);
|
||||
static bool IsValidServiceCertificate(const std::string& certificate);
|
||||
|
||||
// Session related methods
|
||||
virtual CdmResponseType OpenSession(const CdmKeySystem& key_system,
|
||||
@@ -116,6 +115,9 @@ class WvContentDecryptionModule : public android::RefBase, public TimerHandler {
|
||||
virtual void NotifyResolution(const CdmSessionId& session_id, uint32_t width,
|
||||
uint32_t height);
|
||||
|
||||
// Validate a passed-in service certificate
|
||||
virtual bool IsValidServiceCertificate(const std::string& certificate);
|
||||
|
||||
private:
|
||||
uint32_t GenerateSessionSharingId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user