Index: media/cast/net/rtp/packet_storage_unittest.cc |
diff --git a/media/cast/net/rtp/packet_storage_unittest.cc b/media/cast/net/rtp/packet_storage_unittest.cc |
index 699368f32b59832d714c5e7aa2b1897fba1c2bf0..29fc415c16d5a0c82a681fbbe61107c4f220293f 100644 |
--- a/media/cast/net/rtp/packet_storage_unittest.cc |
+++ b/media/cast/net/rtp/packet_storage_unittest.cc |
@@ -22,7 +22,7 @@ static const size_t kStoredFrames = 10; |
// Generate |number_of_frames| and store into |*storage|. |
// First frame has 1 packet, second frame has 2 packets, etc. |
static void StoreFrames(size_t number_of_frames, |
- uint32 first_frame_id, |
+ uint32_t first_frame_id, |
PacketStorage* storage) { |
const int kSsrc = 1; |
for (size_t i = 0; i < number_of_frames; ++i) { |
@@ -33,7 +33,7 @@ static void StoreFrames(size_t number_of_frames, |
Packet test_packet(1, 0); |
packets.push_back(std::make_pair( |
PacedPacketSender::MakePacketKey(PacketKey::RTP, i, kSsrc, |
- base::checked_cast<uint16>(j)), |
+ base::checked_cast<uint16_t>(j)), |
new base::RefCountedData<Packet>(test_packet))); |
} |
storage->StoreFrame(first_frame_id, packets); |
@@ -44,8 +44,8 @@ static void StoreFrames(size_t number_of_frames, |
TEST(PacketStorageTest, NumberOfStoredFrames) { |
PacketStorage storage; |
- uint32 frame_id = 0; |
- frame_id = ~frame_id; // The maximum value of uint32. |
+ uint32_t frame_id = 0; |
+ frame_id = ~frame_id; // The maximum value of uint32_t. |
StoreFrames(kMaxUnackedFrames / 2, frame_id, &storage); |
EXPECT_EQ(static_cast<size_t>(kMaxUnackedFrames / 2), |
storage.GetNumberOfStoredFrames()); |
@@ -54,14 +54,14 @@ TEST(PacketStorageTest, NumberOfStoredFrames) { |
TEST(PacketStorageTest, GetFrameWrapAround8bits) { |
PacketStorage storage; |
- const uint32 kFirstFrameId = 250; |
+ const uint32_t kFirstFrameId = 250; |
StoreFrames(kStoredFrames, kFirstFrameId, &storage); |
EXPECT_EQ(std::min<size_t>(kMaxUnackedFrames, kStoredFrames), |
storage.GetNumberOfStoredFrames()); |
// Expect we get the correct frames by looking at the number of |
// packets. |
- uint32 frame_id = kFirstFrameId; |
+ uint32_t frame_id = kFirstFrameId; |
for (size_t i = 0; i < kStoredFrames; ++i) { |
ASSERT_TRUE(storage.GetFrame8(frame_id)); |
EXPECT_EQ(i + 1, storage.GetFrame8(frame_id)->size()); |
@@ -72,15 +72,15 @@ TEST(PacketStorageTest, GetFrameWrapAround8bits) { |
TEST(PacketStorageTest, GetFrameWrapAround32bits) { |
PacketStorage storage; |
- // First frame ID is close to the maximum value of uint32. |
- uint32 first_frame_id = 0xffffffff - 5; |
+ // First frame ID is close to the maximum value of uint32_t. |
+ uint32_t first_frame_id = 0xffffffff - 5; |
StoreFrames(kStoredFrames, first_frame_id, &storage); |
EXPECT_EQ(std::min<size_t>(kMaxUnackedFrames, kStoredFrames), |
storage.GetNumberOfStoredFrames()); |
// Expect we get the correct frames by looking at the number of |
// packets. |
- uint32 frame_id = first_frame_id; |
+ uint32_t frame_id = first_frame_id; |
for (size_t i = 0; i < kStoredFrames; ++i) { |
ASSERT_TRUE(storage.GetFrame8(frame_id)); |
EXPECT_EQ(i + 1, storage.GetFrame8(frame_id)->size()); |
@@ -91,12 +91,12 @@ TEST(PacketStorageTest, GetFrameWrapAround32bits) { |
TEST(PacketStorageTest, FramesReleased) { |
PacketStorage storage; |
- const uint32 kFirstFrameId = 0; |
+ const uint32_t kFirstFrameId = 0; |
StoreFrames(5, kFirstFrameId, &storage); |
EXPECT_EQ(std::min<size_t>(kMaxUnackedFrames, 5), |
storage.GetNumberOfStoredFrames()); |
- for (uint32 frame_id = kFirstFrameId; frame_id < kFirstFrameId + 5; |
+ for (uint32_t frame_id = kFirstFrameId; frame_id < kFirstFrameId + 5; |
++frame_id) { |
EXPECT_TRUE(storage.GetFrame8(frame_id)); |
} |