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 "content/renderer/media/rtc_video_decoder.h" | 5 #include "content/renderer/media/rtc_video_decoder.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 MockVideoTrack() {} | 171 MockVideoTrack() {} |
172 ~MockVideoTrack() {} | 172 ~MockVideoTrack() {} |
173 }; | 173 }; |
174 | 174 |
175 } // namespace | 175 } // namespace |
176 | 176 |
177 class RTCVideoDecoderTest : public testing::Test { | 177 class RTCVideoDecoderTest : public testing::Test { |
178 protected: | 178 protected: |
179 static const int kWidth; | 179 static const int kWidth; |
180 static const int kHeight; | 180 static const int kHeight; |
181 static const char* kUrl; | |
182 static const PipelineStatistics kStatistics; | 181 static const PipelineStatistics kStatistics; |
183 | 182 |
184 RTCVideoDecoderTest() { | 183 RTCVideoDecoderTest() { |
185 } | 184 } |
186 | 185 |
187 virtual ~RTCVideoDecoderTest() { | 186 virtual ~RTCVideoDecoderTest() { |
188 } | 187 } |
189 | 188 |
190 virtual void SetUp() OVERRIDE { | 189 virtual void SetUp() OVERRIDE { |
191 video_track_ = MockVideoTrack::Create(); | 190 video_track_ = MockVideoTrack::Create(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 296 |
298 EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk, _)).Times(2); | 297 EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk, _)).Times(2); |
299 decoder_->Read(read_cb_); | 298 decoder_->Read(read_cb_); |
300 EXPECT_FALSE(decoder_->shutting_down_); | 299 EXPECT_FALSE(decoder_->shutting_down_); |
301 decoder_->PrepareForShutdownHack(); | 300 decoder_->PrepareForShutdownHack(); |
302 EXPECT_TRUE(decoder_->shutting_down_); | 301 EXPECT_TRUE(decoder_->shutting_down_); |
303 decoder_->Read(read_cb_); | 302 decoder_->Read(read_cb_); |
304 | 303 |
305 message_loop_.RunAllPending(); | 304 message_loop_.RunAllPending(); |
306 } | 305 } |
OLD | NEW |