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

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: nits 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
« no previous file with comments | « webkit/renderer/media/crypto/key_systems_info.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b8cb1d72d44495636be4e8491d79dff5a6208a6c 100644
--- a/webkit/renderer/media/crypto/key_systems_unittest.cc
+++ b/webkit/renderer/media/crypto/key_systems_unittest.cc
@@ -753,4 +753,22 @@ TEST_F(KeySystemsTest, IsSupportedKeySystemWithMediaMimeType_Widevine_MP4) {
"audio/mp4", vorbis_codec(), kWidevineAlpha));
}
+#if defined(OS_ANDROID)
+TEST_F(KeySystemsTest, GetUUID_Widevine) {
+ std::vector<uint8> uuid = GetUUID(kWidevineAlpha);
+#if defined(WIDEVINE_CDM_AVAILABLE)
+ EXPECT_EQ(16u, uuid.size());
+ EXPECT_EQ(0xED, uuid[15]);
+#else
+ EXPECT_TRUE(uuid.empty());
+#endif
+}
+
+TEST_F(KeySystemsTest, GetUUID_Unrecognized) {
+ EXPECT_TRUE(GetUUID(kWidevine).empty());
+ EXPECT_TRUE(GetUUID(kClearKey).empty());
+ EXPECT_TRUE(GetUUID("").empty());
+}
+#endif // defined(OS_ANDROID)
+
} // namespace webkit_media
« no previous file with comments | « webkit/renderer/media/crypto/key_systems_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698