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

Unified Diff: media/cast/transport/pacing/paced_sender_unittest.cc

Issue 270493003: Cast: Deduplicate event types in cast library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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/transport/pacing/paced_sender.cc ('k') | media/cast/video_receiver/video_receiver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/transport/pacing/paced_sender_unittest.cc
diff --git a/media/cast/transport/pacing/paced_sender_unittest.cc b/media/cast/transport/pacing/paced_sender_unittest.cc
index 8c078897d8bf28ac3b7dcfeb6f50aa85a5acd33b..ef9d89b5f06d00e42786f6e8eb44baeda9daed3f 100644
--- a/media/cast/transport/pacing/paced_sender_unittest.cc
+++ b/media/cast/transport/pacing/paced_sender_unittest.cc
@@ -174,7 +174,7 @@ TEST_F(PacedSenderTest, BasicPace) {
for (std::vector<PacketEvent>::iterator it = packet_events.begin();
it != packet_events.end();
++it) {
- if (it->type == kVideoPacketSentToNetwork)
+ if (it->type == PACKET_SENT_TO_NETWORK)
sent_to_network_event_count++;
else
FAIL() << "Got unexpected event type " << CastLoggingToString(it->type);
@@ -254,14 +254,17 @@ TEST_F(PacedSenderTest, PaceWithNack) {
for (std::vector<PacketEvent>::iterator it = packet_events.begin();
it != packet_events.end();
++it) {
- if (it->type == kVideoPacketSentToNetwork)
- video_network_event_count++;
- else if (it->type == kVideoPacketRetransmitted)
- video_retransmitted_event_count++;
- else if (it->type == kAudioPacketSentToNetwork)
- audio_network_event_count++;
- else
+ if (it->type == PACKET_SENT_TO_NETWORK) {
+ if (it->media_type == VIDEO_EVENT)
+ video_network_event_count++;
+ else
+ audio_network_event_count++;
+ } else if (it->type == PACKET_RETRANSMITTED) {
+ if (it->media_type == VIDEO_EVENT)
+ video_retransmitted_event_count++;
+ } else {
FAIL() << "Got unexpected event type " << CastLoggingToString(it->type);
+ }
}
EXPECT_EQ(expected_audio_network_event_count, audio_network_event_count);
EXPECT_EQ(expected_video_network_event_count, video_network_event_count);
« no previous file with comments | « media/cast/transport/pacing/paced_sender.cc ('k') | media/cast/video_receiver/video_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698