Index: net/base/upload_file_element_reader_unittest.cc |
diff --git a/net/base/upload_file_element_reader_unittest.cc b/net/base/upload_file_element_reader_unittest.cc |
index 2a61dc622f5ec8306b6fffb1353089fb2d77b132..e0180d28c5cee65fc77b369507cf7fbd055118a2 100644 |
--- a/net/base/upload_file_element_reader_unittest.cc |
+++ b/net/base/upload_file_element_reader_unittest.cc |
@@ -4,6 +4,8 @@ |
#include "net/base/upload_file_element_reader.h" |
+#include <limits> |
+ |
#include "base/files/file_util.h" |
#include "base/files/scoped_temp_dir.h" |
#include "base/run_loop.h" |
@@ -34,7 +36,7 @@ class UploadFileElementReaderTest : public PlatformTest { |
reader_.reset(new UploadFileElementReader( |
base::ThreadTaskRunnerHandle::Get().get(), temp_file_path_, 0, |
- kuint64max, base::Time())); |
+ std::numeric_limits<uint64_t>::max(), base::Time())); |
mmenke
2015/12/07 16:06:51
include stdint.h
Avi (use Gerrit)
2015/12/07 16:30:06
Done.
|
TestCompletionCallback callback; |
ASSERT_EQ(ERR_IO_PENDING, reader_->Init(callback.callback())); |
EXPECT_EQ(OK, callback.WaitForResult()); |
@@ -205,8 +207,8 @@ TEST_F(UploadFileElementReaderTest, FileChanged) { |
const base::Time expected_modification_time = |
info.last_modified - base::TimeDelta::FromSeconds(1); |
reader_.reset(new UploadFileElementReader( |
- base::ThreadTaskRunnerHandle::Get().get(), temp_file_path_, 0, kuint64max, |
- expected_modification_time)); |
+ base::ThreadTaskRunnerHandle::Get().get(), temp_file_path_, 0, |
+ std::numeric_limits<uint64_t>::max(), expected_modification_time)); |
TestCompletionCallback init_callback; |
ASSERT_EQ(ERR_IO_PENDING, reader_->Init(init_callback.callback())); |
EXPECT_EQ(ERR_UPLOAD_FILE_CHANGED, init_callback.WaitForResult()); |
@@ -219,8 +221,8 @@ TEST_F(UploadFileElementReaderTest, InexactExpectedTimeStamp) { |
const base::Time expected_modification_time = |
info.last_modified - base::TimeDelta::FromMilliseconds(900); |
reader_.reset(new UploadFileElementReader( |
- base::ThreadTaskRunnerHandle::Get().get(), temp_file_path_, 0, kuint64max, |
- expected_modification_time)); |
+ base::ThreadTaskRunnerHandle::Get().get(), temp_file_path_, 0, |
+ std::numeric_limits<uint64_t>::max(), expected_modification_time)); |
TestCompletionCallback init_callback; |
ASSERT_EQ(ERR_IO_PENDING, reader_->Init(init_callback.callback())); |
EXPECT_EQ(OK, init_callback.WaitForResult()); |
@@ -228,9 +230,9 @@ TEST_F(UploadFileElementReaderTest, InexactExpectedTimeStamp) { |
TEST_F(UploadFileElementReaderTest, WrongPath) { |
const base::FilePath wrong_path(FILE_PATH_LITERAL("wrong_path")); |
- reader_.reset( |
- new UploadFileElementReader(base::ThreadTaskRunnerHandle::Get().get(), |
- wrong_path, 0, kuint64max, base::Time())); |
+ reader_.reset(new UploadFileElementReader( |
+ base::ThreadTaskRunnerHandle::Get().get(), wrong_path, 0, |
+ std::numeric_limits<uint64_t>::max(), base::Time())); |
TestCompletionCallback init_callback; |
ASSERT_EQ(ERR_IO_PENDING, reader_->Init(init_callback.callback())); |
EXPECT_EQ(ERR_FILE_NOT_FOUND, init_callback.WaitForResult()); |