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

Side by Side Diff: media/cast/transport/pacing/paced_sender_unittest.cc

Issue 131233007: Cast: Clean up injection of transport into PacedPacketSender (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merged Created 6 years, 10 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/test/simple_test_tick_clock.h" 5 #include "base/test/simple_test_tick_clock.h"
6 #include "media/cast/test/fake_task_runner.h" 6 #include "media/cast/test/fake_task_runner.h"
7 #include "media/cast/transport/pacing/paced_sender.h" 7 #include "media/cast/transport/pacing/paced_sender.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 29 matching lines...) Expand all
40 private: 40 private:
41 std::list<int> expected_packet_size_; 41 std::list<int> expected_packet_size_;
42 }; 42 };
43 43
44 class PacedSenderTest : public ::testing::Test { 44 class PacedSenderTest : public ::testing::Test {
45 protected: 45 protected:
46 PacedSenderTest() { 46 PacedSenderTest() {
47 testing_clock_.Advance( 47 testing_clock_.Advance(
48 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 48 base::TimeDelta::FromMilliseconds(kStartMillisecond));
49 task_runner_ = new test::FakeTaskRunner(&testing_clock_); 49 task_runner_ = new test::FakeTaskRunner(&testing_clock_);
50 paced_sender_.reset(new PacedSender( 50 paced_sender_.reset(new PacedSender(&testing_clock_,
51 &testing_clock_, 51 &mock_transport_,
52 NULL, 52 task_runner_));
53 &mock_transport_,
54 task_runner_,
55 base::Bind(&UpdateCastTransportStatus)));
56 } 53 }
57 54
58 virtual ~PacedSenderTest() {} 55 virtual ~PacedSenderTest() {}
59 56
60 static void UpdateCastTransportStatus(transport::CastTransportStatus status) { 57 static void UpdateCastTransportStatus(transport::CastTransportStatus status) {
61 NOTREACHED(); 58 NOTREACHED();
62 } 59 }
63 60
64 PacketList CreatePacketList(size_t packet_size, int num_of_packets_in_frame) { 61 PacketList CreatePacketList(size_t packet_size, int num_of_packets_in_frame) {
65 PacketList packets; 62 PacketList packets;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 testing_clock_.Advance(timeout_10ms); 242 testing_clock_.Advance(timeout_10ms);
246 task_runner_->RunTasks(); 243 task_runner_->RunTasks();
247 244
248 testing_clock_.Advance(timeout_10ms); 245 testing_clock_.Advance(timeout_10ms);
249 task_runner_->RunTasks(); 246 task_runner_->RunTasks();
250 } 247 }
251 248
252 } // namespace transport 249 } // namespace transport
253 } // namespace cast 250 } // namespace cast
254 } // namespace media 251 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/transport/pacing/paced_sender.cc ('k') | media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698