| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <deque> | 6 #include <deque> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 message_loop_.RunAllPending(); | 435 message_loop_.RunAllPending(); |
| 436 } | 436 } |
| 437 | 437 |
| 438 // A mocked callback specialization for calling Read(). Since RunWithParams() | 438 // A mocked callback specialization for calling Read(). Since RunWithParams() |
| 439 // is mocked we don't need to pass in object or method pointers. | 439 // is mocked we don't need to pass in object or method pointers. |
| 440 class MockReadCB : public base::RefCountedThreadSafe<MockReadCB> { | 440 class MockReadCB : public base::RefCountedThreadSafe<MockReadCB> { |
| 441 public: | 441 public: |
| 442 MockReadCB() {} | 442 MockReadCB() {} |
| 443 | 443 |
| 444 MOCK_METHOD0(OnDelete, void()); | 444 MOCK_METHOD0(OnDelete, void()); |
| 445 MOCK_METHOD1(Run, void(const scoped_refptr<Buffer>& buffer)); | 445 MOCK_METHOD1(Run, void(const scoped_refptr<DecoderBuffer>& buffer)); |
| 446 | 446 |
| 447 protected: | 447 protected: |
| 448 virtual ~MockReadCB() { | 448 virtual ~MockReadCB() { |
| 449 OnDelete(); | 449 OnDelete(); |
| 450 } | 450 } |
| 451 | 451 |
| 452 private: | 452 private: |
| 453 friend class base::RefCountedThreadSafe<MockReadCB>; | 453 friend class base::RefCountedThreadSafe<MockReadCB>; |
| 454 | 454 |
| 455 DISALLOW_COPY_AND_ASSIGN(MockReadCB); | 455 DISALLOW_COPY_AND_ASSIGN(MockReadCB); |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { | 773 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { |
| 774 CreateDemuxer("vorbis_audio_wmv_video.mkv"); | 774 CreateDemuxer("vorbis_audio_wmv_video.mkv"); |
| 775 InitializeDemuxer(); | 775 InitializeDemuxer(); |
| 776 | 776 |
| 777 // Ensure the expected streams are present. | 777 // Ensure the expected streams are present. |
| 778 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); | 778 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); |
| 779 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); | 779 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); |
| 780 } | 780 } |
| 781 | 781 |
| 782 } // namespace media | 782 } // namespace media |
| OLD | NEW |