Cherry-pick bug fixes from CDM main branch.

* Split device cert declaration from definition.
* Fix and rename CdmApi?Test.TimeTest.
* Fix max HDCP setting.

Change-Id: Idf0aea5c953a08c38a8beb20ec8ccc210e33f67a
This commit is contained in:
Joey Parrish
2015-02-17 10:59:19 -08:00
parent f4dbc2acd2
commit bd448c6252
7 changed files with 358 additions and 335 deletions

View File

@@ -199,7 +199,7 @@ class CdmApi4Test : public testing::Test {
// Load the device cert that was already "saved" to the device.
std::string cert(reinterpret_cast<const char*>(kDeviceCert),
sizeof(kDeviceCert));
kDeviceCertSize);
host_->file_store[kCertFilename] = cert;
// Initialize the CDM module before creating a CDM instance.
@@ -675,7 +675,8 @@ TEST_F(CdmApi4Test, DecryptReturnsSizedBuffer) {
ReleaseSession(kSessionId1);
}
TEST_F(CdmApi4Test, TimeTest) {
// This exercises both timers and renewal.
TEST_F(CdmApi4Test, RenewalTest) {
CreateSession(kSessionId1, g_key_id, cdm::kTemporary);
ProcessKeyResponse(false);
ASSERT_FALSE(SessionErrorPresent(kSessionId1));
@@ -687,6 +688,8 @@ TEST_F(CdmApi4Test, TimeTest) {
// When the timer expired, we should have sent a renewal, so we can
// add this renewed key now, assuming things are working as expected.
ProcessKeyResponse(true);
// And the key should have been added.
ASSERT_FALSE(SessionErrorPresent(kSessionId1));
ReleaseSession(kSessionId1);
}