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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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/ffmpeg_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <deque> 5 #include <deque>
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/thread.h" 8 #include "base/thread.h"
9 #include "media/base/filters.h" 9 #include "media/base/filters.h"
10 #include "media/base/mock_ffmpeg.h" 10 #include "media/base/mock_ffmpeg.h"
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 662
663 // A gmock helper method to execute the callback and deletes it. 663 // A gmock helper method to execute the callback and deletes it.
664 void RunCallback(size_t size, DataSource::ReadCallback* callback) { 664 void RunCallback(size_t size, DataSource::ReadCallback* callback) {
665 DCHECK(callback); 665 DCHECK(callback);
666 callback->RunWithParams(Tuple1<size_t>(size)); 666 callback->RunWithParams(Tuple1<size_t>(size));
667 delete callback; 667 delete callback;
668 } 668 }
669 669
670 TEST_F(FFmpegDemuxerTest, ProtocolRead) { 670 TEST_F(FFmpegDemuxerTest, ProtocolRead) {
671 // Creates a demuxer. 671 // Creates a demuxer.
672 scoped_refptr<MockFFmpegDemuxer> demuxer = new MockFFmpegDemuxer(); 672 scoped_refptr<MockFFmpegDemuxer> demuxer(new MockFFmpegDemuxer());
673 ASSERT_TRUE(demuxer); 673 ASSERT_TRUE(demuxer);
674 demuxer->set_host(&host_); 674 demuxer->set_host(&host_);
675 demuxer->set_message_loop(&message_loop_); 675 demuxer->set_message_loop(&message_loop_);
676 demuxer->data_source_ = data_source_; 676 demuxer->data_source_ = data_source_;
677 677
678 uint8 kBuffer[1]; 678 uint8 kBuffer[1];
679 InSequence s; 679 InSequence s;
680 // Actions taken in the first read. 680 // Actions taken in the first read.
681 EXPECT_CALL(*data_source_, GetSize(_)) 681 EXPECT_CALL(*data_source_, GetSize(_))
682 .WillOnce(DoAll(SetArgumentPointee<0>(1024), Return(true))); 682 .WillOnce(DoAll(SetArgumentPointee<0>(1024), Return(true)));
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 { 767 {
768 SCOPED_TRACE(""); 768 SCOPED_TRACE("");
769 InitializeDemuxer(); 769 InitializeDemuxer();
770 } 770 }
771 EXPECT_CALL(*data_source_, IsStreaming()) 771 EXPECT_CALL(*data_source_, IsStreaming())
772 .WillOnce(Return(false)); 772 .WillOnce(Return(false));
773 EXPECT_FALSE(demuxer_->IsStreaming()); 773 EXPECT_FALSE(demuxer_->IsStreaming());
774 } 774 }
775 775
776 } // namespace media 776 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698