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

Side by Side Diff: media/cast/net/rtp/cast_message_builder_unittest.cc

Issue 1905763002: Convert //media/cast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « media/cast/net/rtcp/test_rtcp_packet_builder.cc ('k') | media/cast/net/rtp/framer.h » ('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 "media/cast/net/rtp/cast_message_builder.h"
6
5 #include <stddef.h> 7 #include <stddef.h>
6 #include <stdint.h> 8 #include <stdint.h>
7 9
10 #include <memory>
11
8 #include "base/macros.h" 12 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/test/simple_test_tick_clock.h" 13 #include "base/test/simple_test_tick_clock.h"
11 #include "media/cast/net/rtcp/rtcp_defines.h" 14 #include "media/cast/net/rtcp/rtcp_defines.h"
12 #include "media/cast/net/rtp/cast_message_builder.h"
13 #include "media/cast/net/rtp/framer.h" 15 #include "media/cast/net/rtp/framer.h"
14 #include "media/cast/net/rtp/rtp_defines.h" 16 #include "media/cast/net/rtp/rtp_defines.h"
15 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
16 18
17 namespace media { 19 namespace media {
18 namespace cast { 20 namespace cast {
19 21
20 namespace { 22 namespace {
21 static const uint32_t kSsrc = 0x1234; 23 static const uint32_t kSsrc = 0x1234;
22 static const uint32_t kShortTimeIncrementMs = 10; 24 static const uint32_t kShortTimeIncrementMs = 10;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 cast_msg_builder_.reset(new CastMessageBuilder(&testing_clock_, 132 cast_msg_builder_.reset(new CastMessageBuilder(&testing_clock_,
131 &feedback_, 133 &feedback_,
132 &framer_, 134 &framer_,
133 kSsrc, 135 kSsrc,
134 false, 136 false,
135 max_unacked_frames)); 137 max_unacked_frames));
136 } 138 }
137 139
138 NackFeedbackVerification feedback_; 140 NackFeedbackVerification feedback_;
139 Framer framer_; 141 Framer framer_;
140 scoped_ptr<CastMessageBuilder> cast_msg_builder_; 142 std::unique_ptr<CastMessageBuilder> cast_msg_builder_;
141 RtpCastHeader rtp_header_; 143 RtpCastHeader rtp_header_;
142 base::SimpleTestTickClock testing_clock_; 144 base::SimpleTestTickClock testing_clock_;
143 145
144 private: 146 private:
145 DISALLOW_COPY_AND_ASSIGN(CastMessageBuilderTest); 147 DISALLOW_COPY_AND_ASSIGN(CastMessageBuilderTest);
146 }; 148 };
147 149
148 TEST_F(CastMessageBuilderTest, OneFrameNackList) { 150 TEST_F(CastMessageBuilderTest, OneFrameNackList) {
149 SetFrameIds(0, 0); 151 SetFrameIds(0, 0);
150 SetPacketId(4); 152 SetPacketId(4);
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 SetFrameIds(frame_id, frame_id - 1); 432 SetFrameIds(frame_id, frame_id - 1);
431 InsertPacket(); 433 InsertPacket();
432 testing_clock_.Advance( 434 testing_clock_.Advance(
433 base::TimeDelta::FromMilliseconds(kShortTimeIncrementMs)); 435 base::TimeDelta::FromMilliseconds(kShortTimeIncrementMs));
434 EXPECT_TRUE(feedback_.triggered()); 436 EXPECT_TRUE(feedback_.triggered());
435 EXPECT_EQ(frame_id, feedback_.last_frame_acked()); 437 EXPECT_EQ(frame_id, feedback_.last_frame_acked());
436 } 438 }
437 439
438 } // namespace cast 440 } // namespace cast
439 } // namespace media 441 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/rtcp/test_rtcp_packet_builder.cc ('k') | media/cast/net/rtp/framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698