| Index: base/file_util_unittest.cc
|
| diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
|
| index 8ee55ff4a7aed70857e44b3ce86a6fb610d962cf..b37865755f31eecadce58abcd41ca274ede1fbfe 100644
|
| --- a/base/file_util_unittest.cc
|
| +++ b/base/file_util_unittest.cc
|
| @@ -2449,9 +2449,9 @@ TEST_F(FileUtilTest, ValidContentUriTest) {
|
|
|
| // We should be able to read the file.
|
| char* buffer = new char[image_size];
|
| - int fd = OpenContentUriForRead(path);
|
| - EXPECT_LT(0, fd);
|
| - EXPECT_TRUE(ReadFromFD(fd, buffer, image_size));
|
| + File file = OpenContentUriForRead(path);
|
| + EXPECT_TRUE(file.IsValid());
|
| + EXPECT_TRUE(file.ReadAtCurrentPos(buffer, image_size));
|
| delete[] buffer;
|
| }
|
|
|
| @@ -2464,8 +2464,8 @@ TEST_F(FileUtilTest, NonExistentContentUriTest) {
|
| EXPECT_FALSE(GetFileSize(path, &size));
|
|
|
| // We should not be able to read the file.
|
| - int fd = OpenContentUriForRead(path);
|
| - EXPECT_EQ(-1, fd);
|
| + File file = OpenContentUriForRead(path);
|
| + EXPECT_FALSE(file.IsValid());
|
| }
|
| #endif
|
|
|
|
|