| OLD | NEW |
| 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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 timestamps[i].video_time_ms), | 665 timestamps[i].video_time_ms), |
| 665 &video_read_done)); | 666 &video_read_done)); |
| 666 | 667 |
| 667 EXPECT_TRUE(video_read_done); | 668 EXPECT_TRUE(video_read_done); |
| 668 } | 669 } |
| 669 } | 670 } |
| 670 | 671 |
| 671 return true; | 672 return true; |
| 672 } | 673 } |
| 673 | 674 |
| 675 MessageLoop message_loop_; |
| 674 MockDemuxerHost host_; | 676 MockDemuxerHost host_; |
| 675 | 677 |
| 676 scoped_ptr<MockChunkDemuxerClient> client_; | 678 scoped_ptr<MockChunkDemuxerClient> client_; |
| 677 scoped_refptr<ChunkDemuxer> demuxer_; | 679 scoped_refptr<ChunkDemuxer> demuxer_; |
| 678 | 680 |
| 679 private: | 681 private: |
| 680 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxerTest); | 682 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxerTest); |
| 681 }; | 683 }; |
| 682 | 684 |
| 683 TEST_F(ChunkDemuxerTest, TestInit) { | 685 TEST_F(ChunkDemuxerTest, TestInit) { |
| (...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 | 2193 |
| 2192 scoped_ptr<Cluster> cluster_a(kDefaultFirstCluster()); | 2194 scoped_ptr<Cluster> cluster_a(kDefaultFirstCluster()); |
| 2193 ASSERT_TRUE(AppendData(cluster_a->data(), cluster_a->size())); | 2195 ASSERT_TRUE(AppendData(cluster_a->data(), cluster_a->size())); |
| 2194 | 2196 |
| 2195 EXPECT_CALL(host_, SetDuration( | 2197 EXPECT_CALL(host_, SetDuration( |
| 2196 base::TimeDelta::FromMilliseconds(kDefaultFirstClusterEndTimestamp))); | 2198 base::TimeDelta::FromMilliseconds(kDefaultFirstClusterEndTimestamp))); |
| 2197 demuxer_->EndOfStream(PIPELINE_OK); | 2199 demuxer_->EndOfStream(PIPELINE_OK); |
| 2198 } | 2200 } |
| 2199 | 2201 |
| 2200 } // namespace media | 2202 } // namespace media |
| OLD | NEW |