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

Unified Diff: ppapi/tests/test_url_request.cc

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ppapi_unittests win x64 Created 5 years, 10 months 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 | « ppapi/tests/test_url_loader.cc ('k') | ppapi/tests/test_websocket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_url_request.cc
diff --git a/ppapi/tests/test_url_request.cc b/ppapi/tests/test_url_request.cc
index 22b0629252ce04b7301840e74c4f92adfaa9450f..7c9847b770ff3e816264ab5968ce87a2a79d19de 100644
--- a/ppapi/tests/test_url_request.cc
+++ b/ppapi/tests/test_url_request.cc
@@ -77,7 +77,7 @@ void TestURLRequest::RunTests(const std::string& filter) {
}
PP_Var TestURLRequest::PP_MakeString(const char* s) {
- return ppb_var_interface_->VarFromUtf8(s, strlen(s));
+ return ppb_var_interface_->VarFromUtf8(s, static_cast<int32_t>(strlen(s)));
}
// Tests
@@ -357,7 +357,8 @@ std::string TestURLRequest::TestAppendDataToBody() {
// Invalid resource should fail.
ASSERT_EQ(PP_FALSE, ppb_url_request_interface_->AppendDataToBody(
- kInvalidResource, postdata.data(), postdata.length()));
+ kInvalidResource, postdata.data(),
+ static_cast<uint32_t>(postdata.length())));
// Append data and POST to echoing web server.
ASSERT_EQ(PP_TRUE, ppb_url_request_interface_->SetProperty(
@@ -367,7 +368,8 @@ std::string TestURLRequest::TestAppendDataToBody() {
// Append data to body and verify the body is what we expect.
ASSERT_EQ(PP_TRUE, ppb_url_request_interface_->AppendDataToBody(
- url_request, postdata.data(), postdata.length()));
+ url_request, postdata.data(),
+ static_cast<uint32_t>(postdata.length())));
std::string error = LoadAndCompareBody(url_request, postdata);
ppb_var_interface_->Release(post_string_var);
@@ -399,7 +401,7 @@ std::string TestURLRequest::TestAppendFileToBody() {
std::string append_data = "hello\n";
callback.WaitForResult(io.Write(0,
append_data.c_str(),
- append_data.size(),
+ static_cast<int32_t>(append_data.size()),
callback.GetCallback()));
CHECK_CALLBACK_BEHAVIOR(callback);
ASSERT_EQ(static_cast<int32_t>(append_data.size()), callback.result());
« no previous file with comments | « ppapi/tests/test_url_loader.cc ('k') | ppapi/tests/test_websocket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698