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

Unified Diff: media/cast/video_receiver/video_decoder_unittest.cc

Issue 145443005: Fixes for memory and threading issues in cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/test/sender.cc ('k') | media/cast/video_receiver/video_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/video_receiver/video_decoder_unittest.cc
diff --git a/media/cast/video_receiver/video_decoder_unittest.cc b/media/cast/video_receiver/video_decoder_unittest.cc
index 32fe16b25f6a2b164b4e2da640f14c4426fb645f..76e7e27902b95541a444bb4e6d490112a691b3bd 100644
--- a/media/cast/video_receiver/video_decoder_unittest.cc
+++ b/media/cast/video_receiver/video_decoder_unittest.cc
@@ -40,16 +40,18 @@ class DecodeTestFrameCallback :
class VideoDecoderTest : public ::testing::Test {
protected:
VideoDecoderTest()
- : task_runner_(new test::FakeTaskRunner(&testing_clock_)),
- cast_environment_(new CastEnvironment(&testing_clock_, task_runner_,
- task_runner_, task_runner_, task_runner_, task_runner_,
- task_runner_, GetDefaultCastReceiverLoggingConfig())),
- test_callback_(new DecodeTestFrameCallback()) {
+ : testing_clock_(new base::SimpleTestTickClock()),
+ task_runner_(new test::FakeTaskRunner(testing_clock_)),
+ cast_environment_(new CastEnvironment(
+ scoped_ptr<base::TickClock>(testing_clock_), task_runner_,
+ task_runner_, task_runner_, task_runner_, task_runner_,
+ task_runner_, GetDefaultCastReceiverLoggingConfig())),
+ test_callback_(new DecodeTestFrameCallback()) {
// Configure to vp8.
config_.codec = transport::kVp8;
config_.use_external_decoder = false;
decoder_.reset(new VideoDecoder(config_, cast_environment_));
- testing_clock_.Advance(
+ testing_clock_->Advance(
base::TimeDelta::FromMilliseconds(kStartMillisecond));
}
@@ -57,7 +59,7 @@ class VideoDecoderTest : public ::testing::Test {
scoped_ptr<VideoDecoder> decoder_;
VideoReceiverConfig config_;
- base::SimpleTestTickClock testing_clock_;
+ base::SimpleTestTickClock* testing_clock_; // Owned by CastEnvironment.
scoped_refptr<test::FakeTaskRunner> task_runner_;
scoped_refptr<CastEnvironment> cast_environment_;
scoped_refptr<DecodeTestFrameCallback> test_callback_;
« no previous file with comments | « media/cast/test/sender.cc ('k') | media/cast/video_receiver/video_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698