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

Side by Side Diff: ppapi/proxy/ppp_instance_proxy_unittest.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 unified diff | Download patch
« no previous file with comments | « ppapi/proxy/ppp_content_decryptor_private_proxy.cc ('k') | ppapi/proxy/ppp_printing_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/synchronization/waitable_event.h" 5 #include "base/synchronization/waitable_event.h"
6 #include "ipc/ipc_message_utils.h" 6 #include "ipc/ipc_message_utils.h"
7 #include "ppapi/c/pp_var.h" 7 #include "ppapi/c/pp_var.h"
8 #include "ppapi/c/ppb_core.h" 8 #include "ppapi/c/ppb_core.h"
9 #include "ppapi/c/ppb_fullscreen.h" 9 #include "ppapi/c/ppb_fullscreen.h"
10 #include "ppapi/c/ppb_url_loader.h" 10 #include "ppapi/c/ppb_url_loader.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 expected_argn.push_back("Hello"); 133 expected_argn.push_back("Hello");
134 expected_argn.push_back("world."); 134 expected_argn.push_back("world.");
135 expected_argv.push_back("elloHay"); 135 expected_argv.push_back("elloHay");
136 expected_argv.push_back("orldway."); 136 expected_argv.push_back("orldway.");
137 std::vector<const char*> argn_to_pass, argv_to_pass; 137 std::vector<const char*> argn_to_pass, argv_to_pass;
138 CHECK(expected_argn.size() == expected_argv.size()); 138 CHECK(expected_argn.size() == expected_argv.size());
139 for (size_t i = 0; i < expected_argn.size(); ++i) { 139 for (size_t i = 0; i < expected_argn.size(); ++i) {
140 argn_to_pass.push_back(expected_argn[i].c_str()); 140 argn_to_pass.push_back(expected_argn[i].c_str());
141 argv_to_pass.push_back(expected_argv[i].c_str()); 141 argv_to_pass.push_back(expected_argv[i].c_str());
142 } 142 }
143 uint32_t expected_argc = expected_argn.size(); 143 uint32_t expected_argc = static_cast<uint32_t>(expected_argn.size());
144 bool_to_return = PP_TRUE; 144 bool_to_return = PP_TRUE;
145 ResetReceived(); 145 ResetReceived();
146 // Tell the host resource tracker about the instance. 146 // Tell the host resource tracker about the instance.
147 host().resource_tracker().DidCreateInstance(expected_instance); 147 host().resource_tracker().DidCreateInstance(expected_instance);
148 EXPECT_EQ(bool_to_return, ppp_instance->DidCreate(expected_instance, 148 EXPECT_EQ(bool_to_return, ppp_instance->DidCreate(expected_instance,
149 expected_argc, 149 expected_argc,
150 &argn_to_pass[0], 150 &argn_to_pass[0],
151 &argv_to_pass[0])); 151 &argv_to_pass[0]));
152 EXPECT_EQ(received_instance, expected_instance); 152 EXPECT_EQ(received_instance, expected_instance);
153 EXPECT_EQ(received_argc, expected_argc); 153 EXPECT_EQ(received_argc, expected_argc);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // TODO(dmichael): Need to mock out a resource Tracker to be able to test 188 // TODO(dmichael): Need to mock out a resource Tracker to be able to test
189 // HandleResourceLoad. It also requires 189 // HandleResourceLoad. It also requires
190 // PPB_Core.AddRefResource and for PPB_URLLoader to be 190 // PPB_Core.AddRefResource and for PPB_URLLoader to be
191 // registered. 191 // registered.
192 192
193 host().resource_tracker().DidDeleteInstance(expected_instance); 193 host().resource_tracker().DidDeleteInstance(expected_instance);
194 } 194 }
195 195
196 } // namespace proxy 196 } // namespace proxy
197 } // namespace ppapi 197 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_content_decryptor_private_proxy.cc ('k') | ppapi/proxy/ppp_printing_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698