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

Unified Diff: net/base/upload_file_element_reader_unittest.cc

Issue 1502503004: Remove kuint64max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint8
Patch Set: rebase 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
« no previous file with comments | « net/base/int128_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..abffc2a6e76568cb741c3a226ac96c4217d8b572 100644
--- a/net/base/upload_file_element_reader_unittest.cc
+++ b/net/base/upload_file_element_reader_unittest.cc
@@ -4,6 +4,10 @@
#include "net/base/upload_file_element_reader.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
@@ -34,7 +38,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()));
TestCompletionCallback callback;
ASSERT_EQ(ERR_IO_PENDING, reader_->Init(callback.callback()));
EXPECT_EQ(OK, callback.WaitForResult());
@@ -205,8 +209,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 +223,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 +232,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());
« no previous file with comments | « net/base/int128_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698