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

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

Issue 1178423008: Provision to start base::SimpleTestTickClock at initial ticks Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 11 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
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/test/simple_test_tick_clock.h" 8 #include "base/test/simple_test_tick_clock.h"
9 #include "media/cast/net/cast_transport_defines.h" 9 #include "media/cast/net/cast_transport_defines.h"
10 #include "media/cast/net/rtp/framer.h" 10 #include "media/cast/net/rtp/framer.h"
11 #include "media/cast/net/rtp/mock_rtp_payload_feedback.h" 11 #include "media/cast/net/rtp/mock_rtp_payload_feedback.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace media { 14 namespace media {
15 namespace cast { 15 namespace cast {
16 16
17 class FramerTest : public ::testing::Test { 17 class FramerTest : public ::testing::Test {
18 protected: 18 protected:
19 FramerTest() 19 FramerTest()
20 : mock_rtp_payload_feedback_(), 20 : mock_rtp_payload_feedback_(),
21 framer_(&testing_clock_, &mock_rtp_payload_feedback_, 0, true, 0) { 21 framer_(&testing_clock_, &mock_rtp_payload_feedback_, 0, true, 0),
22 testing_clock_(base::TimeTicks()) {
22 payload_.assign(kMaxIpPacketSize, 0); 23 payload_.assign(kMaxIpPacketSize, 0);
23 24
24 EXPECT_CALL(mock_rtp_payload_feedback_, CastFeedback(testing::_)) 25 EXPECT_CALL(mock_rtp_payload_feedback_, CastFeedback(testing::_))
25 .WillRepeatedly(testing::Return()); 26 .WillRepeatedly(testing::Return());
26 } 27 }
27 28
28 ~FramerTest() override {} 29 ~FramerTest() override {}
29 30
30 std::vector<uint8_t> payload_; 31 std::vector<uint8_t> payload_;
31 RtpCastHeader rtp_header_; 32 RtpCastHeader rtp_header_;
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 EXPECT_TRUE(next_frame); 497 EXPECT_TRUE(next_frame);
497 EXPECT_FALSE(multiple); 498 EXPECT_FALSE(multiple);
498 EXPECT_EQ(EncodedFrame::KEY, frame.dependency); 499 EXPECT_EQ(EncodedFrame::KEY, frame.dependency);
499 EXPECT_EQ(256u, frame.frame_id); 500 EXPECT_EQ(256u, frame.frame_id);
500 EXPECT_EQ(256u, frame.referenced_frame_id); 501 EXPECT_EQ(256u, frame.referenced_frame_id);
501 framer_.ReleaseFrame(frame.frame_id); 502 framer_.ReleaseFrame(frame.frame_id);
502 } 503 }
503 504
504 } // namespace cast 505 } // namespace cast
505 } // namespace media 506 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/rtp/cast_message_builder_unittest.cc ('k') | media/cast/net/rtp/receiver_stats_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698