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

Side by Side Diff: media/filters/chunk_demuxer_unittest.cc

Issue 10822026: Implement "Key Presence" step in "Encrypted Block Encounted" algorithm in EME. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix broken ChunkDemuxerTest due to null MessageLoop::Current() Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop.h"
6 #include "media/base/audio_decoder_config.h" 7 #include "media/base/audio_decoder_config.h"
7 #include "media/base/decoder_buffer.h" 8 #include "media/base/decoder_buffer.h"
8 #include "media/base/mock_callback.h" 9 #include "media/base/mock_callback.h"
9 #include "media/base/mock_demuxer_host.h" 10 #include "media/base/mock_demuxer_host.h"
10 #include "media/base/test_data_util.h" 11 #include "media/base/test_data_util.h"
11 #include "media/filters/chunk_demuxer.h" 12 #include "media/filters/chunk_demuxer.h"
12 #include "media/filters/chunk_demuxer_client.h" 13 #include "media/filters/chunk_demuxer_client.h"
13 #include "media/webm/cluster_builder.h" 14 #include "media/webm/cluster_builder.h"
14 #include "media/webm/webm_constants.h" 15 #include "media/webm/webm_constants.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 timestamps[i].video_time_ms), 663 timestamps[i].video_time_ms),
663 &video_read_done)); 664 &video_read_done));
664 665
665 EXPECT_TRUE(video_read_done); 666 EXPECT_TRUE(video_read_done);
666 } 667 }
667 } 668 }
668 669
669 return true; 670 return true;
670 } 671 }
671 672
673 MessageLoop message_loop_;
xhwang 2012/07/30 20:48:25 In the original test, since we don't have a messag
672 MockDemuxerHost host_; 674 MockDemuxerHost host_;
673 675
674 scoped_ptr<MockChunkDemuxerClient> client_; 676 scoped_ptr<MockChunkDemuxerClient> client_;
675 scoped_refptr<ChunkDemuxer> demuxer_; 677 scoped_refptr<ChunkDemuxer> demuxer_;
676 678
677 private: 679 private:
678 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxerTest); 680 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxerTest);
679 }; 681 };
680 682
681 TEST_F(ChunkDemuxerTest, TestInit) { 683 TEST_F(ChunkDemuxerTest, TestInit) {
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 ASSERT_TRUE(InitDemuxer(true, true, false)); 2126 ASSERT_TRUE(InitDemuxer(true, true, false));
2125 2127
2126 scoped_ptr<Cluster> cluster = GenerateCluster(0, 2); 2128 scoped_ptr<Cluster> cluster = GenerateCluster(0, 2);
2127 // Append only part of the cluster data. 2129 // Append only part of the cluster data.
2128 ASSERT_TRUE(AppendData(cluster->data(), cluster->size() - 13)); 2130 ASSERT_TRUE(AppendData(cluster->data(), cluster->size() - 13));
2129 2131
2130 // Setting a timestamp should fail because we're in the middle of a cluster. 2132 // Setting a timestamp should fail because we're in the middle of a cluster.
2131 ASSERT_FALSE(demuxer_->SetTimestampOffset(kSourceId, 25)); 2133 ASSERT_FALSE(demuxer_->SetTimestampOffset(kSourceId, 25));
2132 } 2134 }
2133 } // namespace media 2135 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698