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

Unified Diff: media/cast/video_receiver/video_receiver_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
Index: media/cast/video_receiver/video_receiver_unittest.cc
diff --git a/media/cast/video_receiver/video_receiver_unittest.cc b/media/cast/video_receiver/video_receiver_unittest.cc
index ef4f9ec515c4d58b277337c3c1c931b72821978a..765c85fcecefba592db1ca41a146746d13618a32 100644
--- a/media/cast/video_receiver/video_receiver_unittest.cc
+++ b/media/cast/video_receiver/video_receiver_unittest.cc
@@ -71,13 +71,15 @@ class VideoReceiverTest : public ::testing::Test {
// Configure to use vp8 software implementation.
config_.codec = transport::kVp8;
config_.use_external_decoder = false;
- task_runner_ = new test::FakeTaskRunner(&testing_clock_);
- cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_,
+ testing_clock_ = new base::SimpleTestTickClock();
+ task_runner_ = new test::FakeTaskRunner(testing_clock_);
+ cast_environment_ = new CastEnvironment(
+ scoped_ptr<base::TickClock>(testing_clock_).Pass(), task_runner_,
task_runner_, task_runner_, task_runner_, task_runner_,
task_runner_, GetDefaultCastReceiverLoggingConfig());
receiver_.reset(new
PeerVideoReceiver(cast_environment_, config_, &mock_transport_));
- testing_clock_.Advance(
+ testing_clock_->Advance(
base::TimeDelta::FromMilliseconds(kStartMillisecond));
video_receiver_callback_ = new TestVideoReceiverCallback();
}
@@ -101,7 +103,7 @@ class VideoReceiverTest : public ::testing::Test {
scoped_ptr<PeerVideoReceiver> receiver_;
std::vector<uint8> payload_;
RtpCastHeader rtp_header_;
- base::SimpleTestTickClock testing_clock_;
+ base::SimpleTestTickClock* testing_clock_; // Owned by CastEnvironment.
scoped_refptr<test::FakeTaskRunner> task_runner_;
scoped_refptr<CastEnvironment> cast_environment_;
« no previous file with comments | « media/cast/video_receiver/video_receiver.cc ('k') | media/cast/video_sender/external_video_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698