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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 message_loop_.RunAllPending(); | 441 message_loop_.RunAllPending(); |
442 } | 442 } |
443 | 443 |
444 // A mocked callback specialization for calling Read(). Since RunWithParams() | 444 // A mocked callback specialization for calling Read(). Since RunWithParams() |
445 // is mocked we don't need to pass in object or method pointers. | 445 // is mocked we don't need to pass in object or method pointers. |
446 class MockReadCB : public base::RefCountedThreadSafe<MockReadCB> { | 446 class MockReadCB : public base::RefCountedThreadSafe<MockReadCB> { |
447 public: | 447 public: |
448 MockReadCB() {} | 448 MockReadCB() {} |
449 | 449 |
450 MOCK_METHOD0(OnDelete, void()); | 450 MOCK_METHOD0(OnDelete, void()); |
451 MOCK_METHOD1(Run, void(const scoped_refptr<Buffer>& buffer)); | 451 MOCK_METHOD1(Run, void(const scoped_refptr<DecoderBuffer>& buffer)); |
452 | 452 |
453 protected: | 453 protected: |
454 virtual ~MockReadCB() { | 454 virtual ~MockReadCB() { |
455 OnDelete(); | 455 OnDelete(); |
456 } | 456 } |
457 | 457 |
458 private: | 458 private: |
459 friend class base::RefCountedThreadSafe<MockReadCB>; | 459 friend class base::RefCountedThreadSafe<MockReadCB>; |
460 | 460 |
461 DISALLOW_COPY_AND_ASSIGN(MockReadCB); | 461 DISALLOW_COPY_AND_ASSIGN(MockReadCB); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { | 785 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { |
786 CreateDemuxer("vorbis_audio_wmv_video.mkv"); | 786 CreateDemuxer("vorbis_audio_wmv_video.mkv"); |
787 InitializeDemuxer(); | 787 InitializeDemuxer(); |
788 | 788 |
789 // Ensure the expected streams are present. | 789 // Ensure the expected streams are present. |
790 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); | 790 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); |
791 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); | 791 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); |
792 } | 792 } |
793 | 793 |
794 } // namespace media | 794 } // namespace media |
OLD | NEW |