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

Unified Diff: net/base/elements_upload_data_stream_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
Index: net/base/elements_upload_data_stream_unittest.cc
diff --git a/net/base/elements_upload_data_stream_unittest.cc b/net/base/elements_upload_data_stream_unittest.cc
index a395c839783b9999e312930c14c272abc16fb286..07e3dd70390106cd647c1e40e7d77a030377b586 100644
--- a/net/base/elements_upload_data_stream_unittest.cc
+++ b/net/base/elements_upload_data_stream_unittest.cc
@@ -4,7 +4,10 @@
#include "net/base/elements_upload_data_stream.h"
+#include <stdint.h>
+
#include <algorithm>
+#include <limits>
#include <vector>
#include "base/basictypes.h"
@@ -183,8 +186,8 @@ TEST_F(ElementsUploadDataStreamTest, File) {
base::WriteFile(temp_file_path, kTestData, kTestDataSize));
element_readers_.push_back(make_scoped_ptr(new UploadFileElementReader(
- base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0, kuint64max,
- base::Time())));
+ base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
+ std::numeric_limits<uint64_t>::max(), base::Time())));
TestCompletionCallback init_callback;
scoped_ptr<UploadDataStream> stream(
@@ -219,8 +222,8 @@ TEST_F(ElementsUploadDataStreamTest, FileSmallerThanLength) {
overriding_content_length(kFakeSize);
element_readers_.push_back(make_scoped_ptr(new UploadFileElementReader(
- base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0, kuint64max,
- base::Time())));
+ base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
+ std::numeric_limits<uint64_t>::max(), base::Time())));
TestCompletionCallback init_callback;
scoped_ptr<UploadDataStream> stream(
@@ -569,8 +572,8 @@ TEST_F(ElementsUploadDataStreamTest, MultipleInit) {
element_readers_.push_back(
make_scoped_ptr(new UploadBytesElementReader(kTestData, kTestDataSize)));
element_readers_.push_back(make_scoped_ptr(new UploadFileElementReader(
- base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0, kuint64max,
- base::Time())));
+ base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
+ std::numeric_limits<uint64_t>::max(), base::Time())));
scoped_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
@@ -612,8 +615,8 @@ TEST_F(ElementsUploadDataStreamTest, MultipleInitAsync) {
element_readers_.push_back(
make_scoped_ptr(new UploadBytesElementReader(kTestData, kTestDataSize)));
element_readers_.push_back(make_scoped_ptr(new UploadFileElementReader(
- base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0, kuint64max,
- base::Time())));
+ base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
+ std::numeric_limits<uint64_t>::max(), base::Time())));
scoped_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
@@ -652,8 +655,8 @@ TEST_F(ElementsUploadDataStreamTest, InitToReset) {
element_readers_.push_back(
make_scoped_ptr(new UploadBytesElementReader(kTestData, kTestDataSize)));
element_readers_.push_back(make_scoped_ptr(new UploadFileElementReader(
- base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0, kuint64max,
- base::Time())));
+ base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
+ std::numeric_limits<uint64_t>::max(), base::Time())));
scoped_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
@@ -708,8 +711,8 @@ TEST_F(ElementsUploadDataStreamTest, InitDuringAsyncInit) {
element_readers_.push_back(
make_scoped_ptr(new UploadBytesElementReader(kTestData, kTestDataSize)));
element_readers_.push_back(make_scoped_ptr(new UploadFileElementReader(
- base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0, kuint64max,
- base::Time())));
+ base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
+ std::numeric_limits<uint64_t>::max(), base::Time())));
scoped_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));
@@ -754,8 +757,8 @@ TEST_F(ElementsUploadDataStreamTest, InitDuringAsyncRead) {
element_readers_.push_back(
make_scoped_ptr(new UploadBytesElementReader(kTestData, kTestDataSize)));
element_readers_.push_back(make_scoped_ptr(new UploadFileElementReader(
- base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0, kuint64max,
- base::Time())));
+ base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
+ std::numeric_limits<uint64_t>::max(), base::Time())));
scoped_ptr<UploadDataStream> stream(
new ElementsUploadDataStream(std::move(element_readers_), 0));

Powered by Google App Engine
This is Rietveld 408576698