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

Unified Diff: webkit/renderer/media/crypto/key_systems_unittest.cc

Issue 17101027: Add a function to convert key system into UUID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing ddorwin's comments Created 7 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
Index: webkit/renderer/media/crypto/key_systems_unittest.cc
diff --git a/webkit/renderer/media/crypto/key_systems_unittest.cc b/webkit/renderer/media/crypto/key_systems_unittest.cc
index efd318d79463a85d2d97af53aae431c742414924..2eb4c27c978997dae8273a135a83ce862019bcb0 100644
--- a/webkit/renderer/media/crypto/key_systems_unittest.cc
+++ b/webkit/renderer/media/crypto/key_systems_unittest.cc
@@ -753,4 +753,18 @@ TEST_F(KeySystemsTest, IsSupportedKeySystemWithMediaMimeType_Widevine_MP4) {
"audio/mp4", vorbis_codec(), kWidevineAlpha));
}
+TEST_F(KeySystemsTest, ConvertKeySystemToUUID) {
+ // Currently only widevine is supported.
ddorwin 2013/06/20 03:07:27 You probably don't need this comment, and it could
qinmin 2013/06/20 17:41:53 Done.
+ std::vector<uint8> uuid = ConvertKeySystemToAndroidUUID(kWidevineAlpha);
+ EXPECT_EQ(16u, uuid.size());
+
+ // Fail on all other key systems.
+ uuid = ConvertKeySystemToAndroidUUID(kWidevine);
+ EXPECT_EQ(0u, uuid.size());
+ uuid = ConvertKeySystemToAndroidUUID(kClearKey);
+ EXPECT_EQ(0u, uuid.size());
+ uuid = ConvertKeySystemToAndroidUUID("");
+ EXPECT_EQ(0u, uuid.size());
+}
+
} // namespace webkit_media
« webkit/renderer/media/crypto/key_systems.cc ('K') | « webkit/renderer/media/crypto/key_systems.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698