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

Side by Side Diff: media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer_unittest.cc

Issue 219723003: Remove all uses of GG_UINT32_C. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 8 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 | Annotate | Revision Log
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 "media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer.h" 5 #include "media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer.h"
6 6
7 #include <stdint.h>
8
7 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
8 #include "base/test/simple_test_tick_clock.h" 10 #include "base/test/simple_test_tick_clock.h"
9 #include "media/cast/logging/simple_event_subscriber.h" 11 #include "media/cast/logging/simple_event_subscriber.h"
10 #include "media/cast/test/fake_single_thread_task_runner.h" 12 #include "media/cast/test/fake_single_thread_task_runner.h"
11 #include "media/cast/transport/pacing/paced_sender.h" 13 #include "media/cast/transport/pacing/paced_sender.h"
12 #include "media/cast/transport/rtp_sender/packet_storage/packet_storage.h" 14 #include "media/cast/transport/rtp_sender/packet_storage/packet_storage.h"
13 #include "media/cast/transport/rtp_sender/rtp_packetizer/test/rtp_header_parser. h" 15 #include "media/cast/transport/rtp_sender/rtp_packetizer/test/rtp_header_parser. h"
14 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
15 17
16 namespace media { 18 namespace media {
17 namespace cast { 19 namespace cast {
18 namespace transport { 20 namespace transport {
19 21
20 namespace { 22 namespace {
21 static const int kPayload = 127; 23 static const int kPayload = 127;
22 static const uint32 kTimestampMs = 10; 24 static const uint32 kTimestampMs = 10;
23 static const uint16 kSeqNum = 33; 25 static const uint16 kSeqNum = 33;
24 static const int kMaxPacketLength = 1500; 26 static const int kMaxPacketLength = 1500;
25 static const int kSsrc = 0x12345; 27 static const int kSsrc = 0x12345;
26 static const unsigned int kFrameSize = 5000; 28 static const unsigned int kFrameSize = 5000;
27 static const int kMaxPacketStorageTimeMs = 300; 29 static const int kMaxPacketStorageTimeMs = 300;
28 static const uint32 kStartFrameId = GG_UINT32_C(0xffffffff); 30 static const uint32 kStartFrameId = UINT32_C(0xffffffff);
29 } 31 }
30 32
31 class TestRtpPacketTransport : public PacketSender { 33 class TestRtpPacketTransport : public PacketSender {
32 public: 34 public:
33 explicit TestRtpPacketTransport(RtpPacketizerConfig config) 35 explicit TestRtpPacketTransport(RtpPacketizerConfig config)
34 : config_(config), 36 : config_(config),
35 sequence_number_(kSeqNum), 37 sequence_number_(kSeqNum),
36 packets_sent_(0), 38 packets_sent_(0),
37 expected_number_of_packets_(0), 39 expected_number_of_packets_(0),
38 expected_packet_id_(0), 40 expected_packet_id_(0),
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 testing_clock_.NowTicks()); 185 testing_clock_.NowTicks());
184 RunTasks(33 + 1); 186 RunTasks(33 + 1);
185 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packets_count()); 187 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packets_count());
186 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count()); 188 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count());
187 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received()); 189 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received());
188 } 190 }
189 191
190 } // namespace transport 192 } // namespace transport
191 } // namespace cast 193 } // namespace cast
192 } // namespace media 194 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/transport/rtp_sender/packet_storage/packet_storage_unittest.cc ('k') | media/cast/video_receiver/video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698