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

Unified Diff: media/mojo/services/media_type_converters_unittest.cc

Issue 1227883002: media: Pass CdmConfig in mojo CDM interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase-only Created 5 years, 5 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/mojo/services/media_type_converters.cc ('k') | media/mojo/services/mojo_cdm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/media_type_converters_unittest.cc
diff --git a/media/mojo/services/media_type_converters_unittest.cc b/media/mojo/services/media_type_converters_unittest.cc
index ac05e142da25e3c7cefc202dcf3a8b58b4f093f3..ef96049559e5ccf460719e30b9833b5d0a512123 100644
--- a/media/mojo/services/media_type_converters_unittest.cc
+++ b/media/mojo/services/media_type_converters_unittest.cc
@@ -5,6 +5,7 @@
#include "media/mojo/services/media_type_converters.h"
#include "media/base/audio_decoder_config.h"
+#include "media/base/cdm_config.h"
#include "media/base/decoder_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -174,5 +175,20 @@ TEST(MediaTypeConvertersTest, ConvertAudioDecoderConfig_Encrypted) {
EXPECT_TRUE(result.Matches(config));
}
+TEST(MediaTypeConvertersTest, ConvertCdmConfig) {
+ media::CdmConfig config;
+ config.allow_distinctive_identifier = true;
+ config.allow_persistent_state = false;
+ config.use_hw_secure_codecs = true;
+
+ CdmConfigPtr ptr(CdmConfig::From(config));
+ media::CdmConfig result(ptr.To<media::CdmConfig>());
+
+ EXPECT_EQ(config.allow_distinctive_identifier,
+ result.allow_distinctive_identifier);
+ EXPECT_EQ(config.allow_persistent_state, result.allow_persistent_state);
+ EXPECT_EQ(config.use_hw_secure_codecs, result.use_hw_secure_codecs);
+}
+
} // namespace test
} // namespace mojo
« no previous file with comments | « media/mojo/services/media_type_converters.cc ('k') | media/mojo/services/mojo_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698