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

Unified Diff: net/url_request/url_request_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/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 939a6c61b13a0417ea5b240ba90c15bae3803b6b..08456cd8fd07105b77580cf1a4414295cf306db4 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -12,8 +12,8 @@
#include <stdint.h>
#include <algorithm>
+#include <limits>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
@@ -302,8 +302,8 @@ void CheckSSLInfo(const SSLInfo& ssl_info) {
EXPECT_GT(ssl_info.security_bits, 0);
// The cipher suite TLS_NULL_WITH_NULL_NULL (0) must not be negotiated.
- uint16 cipher_suite = SSLConnectionStatusToCipherSuite(
- ssl_info.connection_status);
+ uint16_t cipher_suite =
+ SSLConnectionStatusToCipherSuite(ssl_info.connection_status);
EXPECT_NE(0U, cipher_suite);
}
@@ -813,7 +813,7 @@ TEST_F(URLRequestTest, FileTest) {
base::RunLoop().Run();
- int64 file_size = -1;
+ int64_t file_size = -1;
EXPECT_TRUE(base::GetFileSize(app_path, &file_size));
EXPECT_TRUE(!r->is_pending());
@@ -857,7 +857,7 @@ TEST_F(URLRequestTest, FileTestFullSpecifiedRange) {
GURL temp_url = FilePathToFileURL(temp_path);
EXPECT_TRUE(base::WriteFile(temp_path, buffer.get(), buffer_size));
- int64 file_size;
+ int64_t file_size;
EXPECT_TRUE(base::GetFileSize(temp_path, &file_size));
const size_t first_byte_position = 500;
@@ -902,7 +902,7 @@ TEST_F(URLRequestTest, FileTestHalfSpecifiedRange) {
GURL temp_url = FilePathToFileURL(temp_path);
EXPECT_TRUE(base::WriteFile(temp_path, buffer.get(), buffer_size));
- int64 file_size;
+ int64_t file_size;
EXPECT_TRUE(base::GetFileSize(temp_path, &file_size));
const size_t first_byte_position = 500;
@@ -946,7 +946,7 @@ TEST_F(URLRequestTest, FileTestMultipleRanges) {
GURL temp_url = FilePathToFileURL(temp_path);
EXPECT_TRUE(base::WriteFile(temp_path, buffer.get(), buffer_size));
- int64 file_size;
+ int64_t file_size;
EXPECT_TRUE(base::GetFileSize(temp_path, &file_size));
TestDelegate d;
@@ -5472,9 +5472,9 @@ TEST_F(URLRequestTestHTTP, PostFileTest) {
PathService::Get(base::DIR_SOURCE_ROOT, &path);
path = path.Append(kTestFilePath);
path = path.Append(FILE_PATH_LITERAL("with-headers.html"));
- element_readers.push_back(make_scoped_ptr(
- new UploadFileElementReader(base::ThreadTaskRunnerHandle::Get().get(),
- path, 0, kuint64max, base::Time())));
+ element_readers.push_back(make_scoped_ptr(new UploadFileElementReader(
+ base::ThreadTaskRunnerHandle::Get().get(), path, 0,
+ std::numeric_limits<uint64_t>::max(), base::Time())));
r->set_upload(make_scoped_ptr<UploadDataStream>(
new ElementsUploadDataStream(std::move(element_readers), 0)));
@@ -5483,7 +5483,7 @@ TEST_F(URLRequestTestHTTP, PostFileTest) {
base::RunLoop().Run();
- int64 size64 = 0;
+ int64_t size64 = 0;
ASSERT_EQ(true, base::GetFileSize(path, &size64));
ASSERT_LE(size64, std::numeric_limits<int>::max());
int size = static_cast<int>(size64);
@@ -5517,7 +5517,7 @@ TEST_F(URLRequestTestHTTP, PostUnreadableFileTest) {
base::ThreadTaskRunnerHandle::Get().get(),
base::FilePath(FILE_PATH_LITERAL(
"c:\\path\\to\\non\\existant\\file.randomness.12345")),
- 0, kuint64max, base::Time())));
+ 0, std::numeric_limits<uint64_t>::max(), base::Time())));
r->set_upload(make_scoped_ptr<UploadDataStream>(
new ElementsUploadDataStream(std::move(element_readers), 0)));
@@ -8454,11 +8454,9 @@ class TestSSLConfigService : public SSLConfigService {
min_version_(kDefaultSSLVersionMin),
fallback_min_version_(kDefaultSSLVersionFallbackMin) {}
- void set_min_version(uint16 version) {
- min_version_ = version;
- }
+ void set_min_version(uint16_t version) { min_version_ = version; }
- void set_fallback_min_version(uint16 version) {
+ void set_fallback_min_version(uint16_t version) {
fallback_min_version_ = version;
}
@@ -8484,8 +8482,8 @@ class TestSSLConfigService : public SSLConfigService {
const bool ev_enabled_;
const bool online_rev_checking_;
const bool rev_checking_required_local_anchors_;
- uint16 min_version_;
- uint16 fallback_min_version_;
+ uint16_t min_version_;
+ uint16_t fallback_min_version_;
};
class FallbackTestURLRequestContext : public TestURLRequestContext {
@@ -8493,7 +8491,7 @@ class FallbackTestURLRequestContext : public TestURLRequestContext {
explicit FallbackTestURLRequestContext(bool delay_initialization)
: TestURLRequestContext(delay_initialization) {}
- void set_fallback_min_version(uint16 version) {
+ void set_fallback_min_version(uint16_t version) {
TestSSLConfigService *ssl_config_service =
new TestSSLConfigService(true /* check for EV */,
false /* online revocation checking */,
@@ -8528,7 +8526,7 @@ class HTTPSFallbackTest : public testing::Test {
base::RunLoop().Run();
}
- void set_fallback_min_version(uint16 version) {
+ void set_fallback_min_version(uint16_t version) {
context_.set_fallback_min_version(version);
}

Powered by Google App Engine
This is Rietveld 408576698