OLD | NEW |
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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
11 #include "ppapi/c/ppb_var.h" | 11 #include "ppapi/c/ppb_var.h" |
12 #include "ppapi/proxy/ppapi_proxy_test.h" | 12 #include "ppapi/proxy/ppapi_proxy_test.h" |
13 #include "ppapi/shared_impl/ppb_var_shared.h" | 13 #include "ppapi/shared_impl/ppb_var_shared.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 std::string VarToString(const PP_Var& var, const PPB_Var* ppb_var) { | 16 std::string VarToString(const PP_Var& var, const PPB_Var* ppb_var) { |
17 uint32_t len = 0; | 17 uint32_t len = 0; |
18 const char* utf8 = ppb_var->VarToUtf8(var, &len); | 18 const char* utf8 = ppb_var->VarToUtf8(var, &len); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 for (size_t i = 0; i < kNumStrings; ++i) { | 232 for (size_t i = 0; i < kNumStrings; ++i) { |
233 uint32_t len = 10; | 233 uint32_t len = 10; |
234 const char* utf8 = ppb_var_->VarToUtf8(vars_[i], &len); | 234 const char* utf8 = ppb_var_->VarToUtf8(vars_[i], &len); |
235 EXPECT_EQ(NULL, utf8); | 235 EXPECT_EQ(NULL, utf8); |
236 EXPECT_EQ(0u, len); | 236 EXPECT_EQ(0u, len); |
237 } | 237 } |
238 } | 238 } |
239 | 239 |
240 } // namespace proxy | 240 } // namespace proxy |
241 } // namespace ppapi | 241 } // namespace ppapi |
OLD | NEW |