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

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

Issue 1515023002: Simplify interface for media/cast: CastTransportSenderImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « media/cast/net/pacing/paced_sender.h ('k') | media/cast/net/rtp/rtp_packetizer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/big_endian.h" 10 #include "base/big_endian.h"
(...skipping 29 matching lines...) Expand all
40 EXPECT_FALSE(expected_packet_size_.empty()); 40 EXPECT_FALSE(expected_packet_size_.empty());
41 size_t expected_packet_size = expected_packet_size_.front(); 41 size_t expected_packet_size = expected_packet_size_.front();
42 expected_packet_size_.pop_front(); 42 expected_packet_size_.pop_front();
43 EXPECT_EQ(expected_packet_size, packet->data.size()); 43 EXPECT_EQ(expected_packet_size, packet->data.size());
44 bytes_sent_ += packet->data.size(); 44 bytes_sent_ += packet->data.size();
45 return true; 45 return true;
46 } 46 }
47 47
48 int64_t GetBytesSent() final { return bytes_sent_; } 48 int64_t GetBytesSent() final { return bytes_sent_; }
49 49
50 void StartReceiving(
51 const PacketReceiverCallbackWithStatus& packet_receiver) final {}
52
53 void StopReceiving() final {}
54
50 void AddExpectedSize(int expected_packet_size, int repeat_count) { 55 void AddExpectedSize(int expected_packet_size, int repeat_count) {
51 for (int i = 0; i < repeat_count; ++i) { 56 for (int i = 0; i < repeat_count; ++i) {
52 expected_packet_size_.push_back(expected_packet_size); 57 expected_packet_size_.push_back(expected_packet_size);
53 } 58 }
54 } 59 }
55 60
56 public: 61 public:
57 std::list<int> expected_packet_size_; 62 std::list<int> expected_packet_size_;
58 int64_t bytes_sent_; 63 int64_t bytes_sent_;
59 64
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 EXPECT_TRUE(paced_sender_->ResendPackets(packets, dedup_info)); 462 EXPECT_TRUE(paced_sender_->ResendPackets(packets, dedup_info));
458 EXPECT_EQ(static_cast<int64_t>(kSize1), mock_transport_.GetBytesSent()); 463 EXPECT_EQ(static_cast<int64_t>(kSize1), mock_transport_.GetBytesSent());
459 464
460 dedup_info.resend_interval = base::TimeDelta::FromMilliseconds(5); 465 dedup_info.resend_interval = base::TimeDelta::FromMilliseconds(5);
461 EXPECT_TRUE(paced_sender_->ResendPackets(packets, dedup_info)); 466 EXPECT_TRUE(paced_sender_->ResendPackets(packets, dedup_info));
462 EXPECT_EQ(static_cast<int64_t>(2 * kSize1), mock_transport_.GetBytesSent()); 467 EXPECT_EQ(static_cast<int64_t>(2 * kSize1), mock_transport_.GetBytesSent());
463 } 468 }
464 469
465 } // namespace cast 470 } // namespace cast
466 } // namespace media 471 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/pacing/paced_sender.h ('k') | media/cast/net/rtp/rtp_packetizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698