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

Unified Diff: media/base/data_buffer_unittest.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: media/base/data_buffer_unittest.cc
diff --git a/media/base/data_buffer_unittest.cc b/media/base/data_buffer_unittest.cc
index a97ba7dca5c449faed0ad497a370e52019007213..55bc49603c507bc9742f861f572bc0fb387458e3 100644
--- a/media/base/data_buffer_unittest.cc
+++ b/media/base/data_buffer_unittest.cc
@@ -30,8 +30,8 @@ TEST(DataBufferTest, Constructor_NonZeroSize) {
TEST(DataBufferTest, Constructor_ScopedArray) {
// Data should be passed and both data and buffer size should be set.
const int kSize = 8;
- scoped_ptr<uint8[]> data(new uint8[kSize]);
- const uint8* kData = data.get();
+ scoped_ptr<uint8_t[]> data(new uint8_t[kSize]);
+ const uint8_t* kData = data.get();
scoped_refptr<DataBuffer> buffer = new DataBuffer(data.Pass(), kSize);
EXPECT_TRUE(buffer->data());
@@ -42,7 +42,7 @@ TEST(DataBufferTest, Constructor_ScopedArray) {
}
TEST(DataBufferTest, CopyFrom) {
- const uint8 kTestData[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 };
+ const uint8_t kTestData[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77};
const int kTestDataSize = arraysize(kTestData);
scoped_refptr<DataBuffer> buffer =
@@ -101,11 +101,11 @@ TEST(DataBufferTest, ReadingWriting) {
scoped_refptr<DataBuffer> buffer(new DataBuffer(kDataSize));
ASSERT_TRUE(buffer.get());
- uint8* data = buffer->writable_data();
+ uint8_t* data = buffer->writable_data();
ASSERT_TRUE(data);
memcpy(data, kData, kDataSize);
buffer->set_data_size(kDataSize);
- const uint8* read_only_data = buffer->data();
+ const uint8_t* read_only_data = buffer->data();
ASSERT_EQ(data, read_only_data);
ASSERT_EQ(0, memcmp(read_only_data, kData, kDataSize));
EXPECT_FALSE(buffer->end_of_stream());
« no previous file with comments | « media/base/data_buffer.cc ('k') | media/base/data_source.h » ('j') | media/cdm/stub/stub_cdm.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698