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

Side by Side Diff: content/renderer/media/rtc_video_decoder_unittest.cc

Issue 480233007: Remove implicit conversions from scoped_refptr to T* in content/renderer/media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "content/renderer/media/rtc_video_decoder.h" 9 #include "content/renderer/media/rtc_video_decoder.h"
10 #include "media/base/gmock_callback_support.h" 10 #include "media/base/gmock_callback_support.h"
(...skipping 17 matching lines...) Expand all
28 : mock_gpu_factories_(new media::MockGpuVideoAcceleratorFactories), 28 : mock_gpu_factories_(new media::MockGpuVideoAcceleratorFactories),
29 vda_thread_("vda_thread"), 29 vda_thread_("vda_thread"),
30 idle_waiter_(false, false) { 30 idle_waiter_(false, false) {
31 memset(&codec_, 0, sizeof(codec_)); 31 memset(&codec_, 0, sizeof(codec_));
32 } 32 }
33 33
34 virtual void SetUp() OVERRIDE { 34 virtual void SetUp() OVERRIDE {
35 ASSERT_TRUE(vda_thread_.Start()); 35 ASSERT_TRUE(vda_thread_.Start());
36 vda_task_runner_ = vda_thread_.message_loop_proxy(); 36 vda_task_runner_ = vda_thread_.message_loop_proxy();
37 mock_vda_ = new media::MockVideoDecodeAccelerator; 37 mock_vda_ = new media::MockVideoDecodeAccelerator;
38 EXPECT_CALL(*mock_gpu_factories_, GetTaskRunner()) 38 EXPECT_CALL(*mock_gpu_factories_.get(), GetTaskRunner())
39 .WillRepeatedly(Return(vda_task_runner_)); 39 .WillRepeatedly(Return(vda_task_runner_));
40 EXPECT_CALL(*mock_gpu_factories_, DoCreateVideoDecodeAccelerator()) 40 EXPECT_CALL(*mock_gpu_factories_.get(), DoCreateVideoDecodeAccelerator())
41 .WillRepeatedly(Return(mock_vda_)); 41 .WillRepeatedly(Return(mock_vda_));
42 EXPECT_CALL(*mock_gpu_factories_, CreateSharedMemory(_)) 42 EXPECT_CALL(*mock_gpu_factories_.get(), CreateSharedMemory(_))
43 .WillRepeatedly(Return(static_cast<base::SharedMemory*>(NULL))); 43 .WillRepeatedly(Return(static_cast<base::SharedMemory*>(NULL)));
44 EXPECT_CALL(*mock_vda_, Initialize(_, _)) 44 EXPECT_CALL(*mock_vda_, Initialize(_, _))
45 .Times(1) 45 .Times(1)
46 .WillRepeatedly(Return(true)); 46 .WillRepeatedly(Return(true));
47 EXPECT_CALL(*mock_vda_, Destroy()).Times(1); 47 EXPECT_CALL(*mock_vda_, Destroy()).Times(1);
48 } 48 }
49 49
50 virtual void TearDown() OVERRIDE { 50 virtual void TearDown() OVERRIDE {
51 VLOG(2) << "TearDown"; 51 VLOG(2) << "TearDown";
52 EXPECT_TRUE(vda_thread_.IsRunning()); 52 EXPECT_TRUE(vda_thread_.IsRunning());
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 EXPECT_FALSE(rtc_decoder_->IsFirstBufferAfterReset(RTCVideoDecoder::ID_LAST, 223 EXPECT_FALSE(rtc_decoder_->IsFirstBufferAfterReset(RTCVideoDecoder::ID_LAST,
224 RTCVideoDecoder::ID_LAST)); 224 RTCVideoDecoder::ID_LAST));
225 EXPECT_TRUE( 225 EXPECT_TRUE(
226 rtc_decoder_->IsFirstBufferAfterReset(0, RTCVideoDecoder::ID_LAST)); 226 rtc_decoder_->IsFirstBufferAfterReset(0, RTCVideoDecoder::ID_LAST));
227 EXPECT_FALSE( 227 EXPECT_FALSE(
228 rtc_decoder_->IsFirstBufferAfterReset(1, RTCVideoDecoder::ID_LAST)); 228 rtc_decoder_->IsFirstBufferAfterReset(1, RTCVideoDecoder::ID_LAST));
229 } 229 }
230 230
231 } // content 231 } // content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | content/renderer/media/rtc_video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698