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

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

Issue 388663003: Cast: Reshuffle files under media/cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing includes Created 6 years, 5 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
« no previous file with comments | « media/cast/net/rtp/packet_storage.cc ('k') | media/cast/net/rtp/receiver_stats.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 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/packet_storage/packet_storage.h" 5 #include "media/cast/net/rtp/packet_storage.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/test/simple_test_tick_clock.h" 11 #include "base/test/simple_test_tick_clock.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 14
15 namespace media { 15 namespace media {
16 namespace cast { 16 namespace cast {
17 namespace transport {
18 17
19 static size_t kStoredFrames = 10; 18 static size_t kStoredFrames = 10;
20 19
21 // Generate |number_of_frames| and store into |*storage|. 20 // Generate |number_of_frames| and store into |*storage|.
22 // First frame has 1 packet, second frame has 2 packets, etc. 21 // First frame has 1 packet, second frame has 2 packets, etc.
23 static void StoreFrames(size_t number_of_frames, 22 static void StoreFrames(size_t number_of_frames,
24 uint32 first_frame_id, 23 uint32 first_frame_id,
25 PacketStorage* storage) { 24 PacketStorage* storage) {
26 const base::TimeTicks kTicks; 25 const base::TimeTicks kTicks;
27 const int kSsrc = 1; 26 const int kSsrc = 1;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 102 }
104 // Check recent frames are there. 103 // Check recent frames are there.
105 for (size_t i = 0; i < kStoredFrames; ++i) { 104 for (size_t i = 0; i < kStoredFrames; ++i) {
106 ASSERT_TRUE(storage.GetFrame8(frame_id)); 105 ASSERT_TRUE(storage.GetFrame8(frame_id));
107 EXPECT_EQ(kStoredFrames + i + 1, 106 EXPECT_EQ(kStoredFrames + i + 1,
108 storage.GetFrame8(frame_id)->size()); 107 storage.GetFrame8(frame_id)->size());
109 ++frame_id; 108 ++frame_id;
110 } 109 }
111 } 110 }
112 111
113 } // namespace transport
114 } // namespace cast 112 } // namespace cast
115 } // namespace media 113 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/rtp/packet_storage.cc ('k') | media/cast/net/rtp/receiver_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698