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

Unified Diff: media/filters/pipeline_integration_test.cc

Issue 11313016: Add "type" in GenerateKeyRequest() and OnNeedKey(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the DCHECK where init_data_type_ is set but NeedKey from decoder passes empty "type". Created 8 years, 2 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/filters/chunk_demuxer_unittest.cc ('k') | media/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_integration_test.cc
diff --git a/media/filters/pipeline_integration_test.cc b/media/filters/pipeline_integration_test.cc
index ffafb0e181b979f4e9a2e2add946be9cb062352d..13e95a57d24f50c1deb76d5a3bc69dcdd59699d2 100644
--- a/media/filters/pipeline_integration_test.cc
+++ b/media/filters/pipeline_integration_test.cc
@@ -120,11 +120,12 @@ class MockMediaSource {
AppendData(initial_append_size_);
}
- void DemuxerNeedKey(scoped_array<uint8> init_data, int init_data_size) {
+ void DemuxerNeedKey(const std::string& type,
+ scoped_array<uint8> init_data, int init_data_size) {
DCHECK(init_data.get());
DCHECK_GT(init_data_size, 0);
DCHECK(decryptor_client_);
- decryptor_client_->NeedKey("", "", init_data.Pass(), init_data_size);
+ decryptor_client_->NeedKey("", "", type, init_data.Pass(), init_data_size);
}
private:
@@ -175,6 +176,7 @@ class FakeDecryptorClient : public DecryptorClient {
virtual void NeedKey(const std::string& key_system,
const std::string& session_id,
+ const std::string& type,
scoped_array<uint8> init_data,
int init_data_length) {
current_key_system_ = key_system;
@@ -186,7 +188,7 @@ class FakeDecryptorClient : public DecryptorClient {
if (current_key_system_.empty()) {
DCHECK(current_session_id_.empty());
EXPECT_TRUE(decryptor_.GenerateKeyRequest(
- kClearKeySystem, kInitData, arraysize(kInitData)));
+ kClearKeySystem, type, kInitData, arraysize(kInitData)));
}
EXPECT_FALSE(current_key_system_.empty());
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698