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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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_simple_job.cc ('k') | net/url_request/view_cache_helper.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 9892a692d1f1150229f602453dd2e03998697172..b114ecc2dfe8509e3a951d1ede8e63417f25ebd5 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -258,9 +258,9 @@ 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.
- int cipher_suite = SSLConnectionStatusToCipherSuite(
+ uint16 cipher_suite = SSLConnectionStatusToCipherSuite(
ssl_info.connection_status);
- EXPECT_NE(0, cipher_suite);
+ EXPECT_NE(0U, cipher_suite);
}
void CheckFullRequestHeaders(const HttpRequestHeaders& headers,
@@ -3763,7 +3763,7 @@ TEST_F(URLRequestTestHTTP, MAYBE_GetTest_ManyCookies) {
ASSERT_LT(upper_bound, 1000000);
}
- int tolerance = upper_bound * 0.005;
+ int tolerance = static_cast<int>(upper_bound * 0.005);
if (tolerance < 2)
tolerance = 2;
@@ -4969,8 +4969,10 @@ TEST_F(URLRequestTestHTTP, PostFileTest) {
base::RunLoop().Run();
- int64 size = 0;
- ASSERT_EQ(true, base::GetFileSize(path, &size));
+ int64 size64 = 0;
+ ASSERT_EQ(true, base::GetFileSize(path, &size64));
+ ASSERT_LE(size64, std::numeric_limits<int>::max());
+ int size = static_cast<int>(size64);
scoped_ptr<char[]> buf(new char[size]);
ASSERT_EQ(size, base::ReadFile(path, buf.get(), size));
« no previous file with comments | « net/url_request/url_request_simple_job.cc ('k') | net/url_request/view_cache_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698