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

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
« no previous file with comments | « net/url_request/url_request.cc ('k') | ppapi/proxy/websocket_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6567c6d98e45a1b709e47180db05062ffdc0ca3d..8db35a2949d6c96f31247d1b0747c6b6c94b1ea2 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);
}
@@ -814,7 +814,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());
@@ -858,7 +858,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;
@@ -903,7 +903,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;
@@ -947,7 +947,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;
@@ -5554,9 +5554,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)));
@@ -5565,7 +5565,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);
@@ -5599,7 +5599,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)));
@@ -8536,11 +8536,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;
}
@@ -8566,8 +8564,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 {
@@ -8575,7 +8573,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 */,
@@ -8610,7 +8608,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);
}
« no previous file with comments | « net/url_request/url_request.cc ('k') | ppapi/proxy/websocket_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698