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

Side by Side Diff: media/filters/in_memory_url_protocol_unittest.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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/filters/in_memory_url_protocol.h ('k') | media/filters/ivf_parser_unittest.cc » ('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 <stdint.h>
6
5 #include "media/ffmpeg/ffmpeg_common.h" 7 #include "media/ffmpeg/ffmpeg_common.h"
6 #include "media/filters/in_memory_url_protocol.h" 8 #include "media/filters/in_memory_url_protocol.h"
7 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
8 10
9 namespace media { 11 namespace media {
10 12
11 static const uint8_t kData[] = {0x01, 0x02, 0x03, 0x04}; 13 static const uint8_t kData[] = {0x01, 0x02, 0x03, 0x04};
12 14
13 TEST(InMemoryUrlProtocolTest, ReadFromLargeBuffer) { 15 TEST(InMemoryUrlProtocolTest, ReadFromLargeBuffer) {
14 InMemoryUrlProtocol protocol(kData, std::numeric_limits<int64_t>::max(), 16 InMemoryUrlProtocol protocol(kData, std::numeric_limits<int64_t>::max(),
(...skipping 28 matching lines...) Expand all
43 EXPECT_TRUE(protocol.SetPosition(sizeof(kData))); 45 EXPECT_TRUE(protocol.SetPosition(sizeof(kData)));
44 EXPECT_EQ(0, protocol.Read(1, &out)); 46 EXPECT_EQ(0, protocol.Read(1, &out));
45 47
46 int i = sizeof(kData) / 2; 48 int i = sizeof(kData) / 2;
47 EXPECT_TRUE(protocol.SetPosition(i)); 49 EXPECT_TRUE(protocol.SetPosition(i));
48 EXPECT_EQ(1, protocol.Read(1, &out)); 50 EXPECT_EQ(1, protocol.Read(1, &out));
49 EXPECT_EQ(kData[i], out); 51 EXPECT_EQ(kData[i], out);
50 } 52 }
51 53
52 } // namespace media 54 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/in_memory_url_protocol.h ('k') | media/filters/ivf_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698