Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: media/cdm/cenc_utils_unittest.cc

Issue 1199643002: Have GetKeyIds() return the key IDs from the first matching 'pssh' box (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to GetKeyIdsForCommonSystemId Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cdm/cenc_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/cenc_utils_unittest.cc
diff --git a/media/cdm/cenc_utils_unittest.cc b/media/cdm/cenc_utils_unittest.cc
index af6066a03f78b4af9f9bd6db02cf07944ee23779..3174e7f38bfa6da3d22625f2992eca834241041f 100644
--- a/media/cdm/cenc_utils_unittest.cc
+++ b/media/cdm/cenc_utils_unittest.cc
@@ -222,12 +222,11 @@ TEST_F(CencUtilsTest, PSSHVersion0Plus1) {
// Concatentate box1 onto end of box0.
box0.insert(box0.end(), box1.begin(), box1.end());
+ EXPECT_TRUE(ValidatePsshInput(box0));
+ // No key IDs returned as only the first 'pssh' box is processed.
KeyIdList key_ids;
- EXPECT_TRUE(ValidatePsshInput(box0));
- EXPECT_TRUE(GetKeyIdsForCommonSystemId(box0, &key_ids));
- EXPECT_EQ(1u, key_ids.size());
- EXPECT_EQ(key_ids[0], Key1());
+ EXPECT_FALSE(GetKeyIdsForCommonSystemId(box0, &key_ids));
}
TEST_F(CencUtilsTest, PSSHVersion1Plus0) {
@@ -255,15 +254,10 @@ TEST_F(CencUtilsTest, MultiplePSSHVersion1) {
KeyIdList key_ids;
EXPECT_TRUE(ValidatePsshInput(box));
- // TODO(jrummell): GetKeyIdsForCommonSystemId() returns the key IDs out of
- // all matching boxes. It should only return the key IDs from the first
- // matching box.
EXPECT_TRUE(GetKeyIdsForCommonSystemId(box, &key_ids));
- EXPECT_EQ(4u, key_ids.size());
+ EXPECT_EQ(2u, key_ids.size());
EXPECT_EQ(key_ids[0], Key1());
EXPECT_EQ(key_ids[1], Key2());
- EXPECT_EQ(key_ids[2], Key3());
- EXPECT_EQ(key_ids[3], Key4());
}
TEST_F(CencUtilsTest, PsshBoxSmallerThanSize) {
« no previous file with comments | « media/cdm/cenc_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698