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

Unified Diff: media/filters/pipeline_integration_test.cc

Issue 10807003: Revert 147169 - Add support for encrypted WebM files as defined in the RFC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/webm/webm_cluster_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_integration_test.cc
===================================================================
--- media/filters/pipeline_integration_test.cc (revision 147171)
+++ media/filters/pipeline_integration_test.cc (working copy)
@@ -18,12 +18,6 @@
static const char kClearKeySystem[] = "org.w3.clearkey";
static const uint8 kInitData[] = { 0x69, 0x6e, 0x69, 0x74 };
-// Key used to encrypt video track in test file "bear-320x240-encrypted.webm".
-static const uint8 kSecretKey[] = {
- 0xfb, 0x67, 0x8a, 0x91, 0x19, 0x12, 0x7b, 0x6b,
- 0x0b, 0x63, 0x11, 0xf8, 0x6f, 0xe1, 0xc4, 0x2d
-};
-
// Helper class that emulates calls made on the ChunkDemuxer by the
// Media Source API.
class MockMediaSource : public ChunkDemuxerClient {
@@ -102,7 +96,7 @@
virtual void DemuxerNeedKey(scoped_array<uint8> init_data,
int init_data_size) {
DCHECK(init_data.get());
- DCHECK_GT(init_data_size, 0);
+ DCHECK_EQ(init_data_size, 16);
DCHECK(decryptor_client_);
decryptor_client_->NeedKey("", "", init_data.Pass(), init_data_size);
}
@@ -172,7 +166,9 @@
EXPECT_FALSE(current_key_system_.empty());
EXPECT_FALSE(current_session_id_.empty());
- decryptor_.AddKey(current_key_system_, kSecretKey, arraysize(kSecretKey),
+ // In test file bear-320x240-encrypted.webm, the decryption key is equal to
+ // |init_data|.
+ decryptor_.AddKey(current_key_system_, init_data.get(), init_data_length,
init_data.get(), init_data_length, current_session_id_);
}
@@ -284,9 +280,7 @@
Stop();
}
-// TODO(fgalligan): Enable test when encrypted test data is updated and new
-// decryption code is landed. http://crbug.com/132801
-TEST_F(PipelineIntegrationTest, DISABLED_EncryptedPlayback) {
+TEST_F(PipelineIntegrationTest, EncryptedPlayback) {
MockMediaSource source("bear-320x240-encrypted.webm", 219726, true, true);
FakeDecryptorClient encrypted_media;
StartPipelineWithEncryptedMedia(&source, &encrypted_media);
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/webm/webm_cluster_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698