Add unit tests to remove usage entries
[ Merge of http://go/wvgerrit/74343 ] This replicates a Netflix test that adds secure stops and removes them one at a time, while some of the sessions are still open. Usage enties will be deleted at the time, but the usage header table will not be shrunk if the last entry is in use. This happens later when sessions are closed and the last usage entry is no longer in use. Bug: 120894148 Test: WV unit/integration tests, CE CDM tests Change-Id: Ib572950afc61754fe5f3c417e650d5d08503425a
This commit is contained in:
@@ -500,7 +500,8 @@ CdmResponseType UsageTableHeader::StoreEntry(uint32_t usage_entry_number,
|
||||
CdmResponseType UsageTableHeader::Shrink(
|
||||
metrics::CryptoMetrics* metrics,
|
||||
uint32_t number_of_usage_entries_to_delete) {
|
||||
LOGI("UsageTableHeader::Shrink: %d", number_of_usage_entries_to_delete);
|
||||
LOGI("UsageTableHeader::Shrink: %d (of %d)",
|
||||
number_of_usage_entries_to_delete, usage_entry_info_.size());
|
||||
if (usage_entry_info_.empty()) {
|
||||
LOGE("UsageTableHeader::Shrink: usage entry info table unexpectedly empty");
|
||||
return NO_USAGE_ENTRIES;
|
||||
|
||||
Reference in New Issue
Block a user