OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "ppapi/tests/test_var_deprecated.h" | 5 #include "ppapi/tests/test_var_deprecated.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 result = var_interface_->VarToUtf8(PP_MakeNull(), &length); | 212 result = var_interface_->VarToUtf8(PP_MakeNull(), &length); |
213 if (length != 0) { | 213 if (length != 0) { |
214 return "Expected 0 on string conversion from Null var."; | 214 return "Expected 0 on string conversion from Null var."; |
215 } | 215 } |
216 if (result != NULL) { | 216 if (result != NULL) { |
217 return "Expected NULL on string conversion from Null var."; | 217 return "Expected NULL on string conversion from Null var."; |
218 } | 218 } |
219 | 219 |
220 length = kInvalidLength; | 220 length = kInvalidLength; |
221 result = NULL; | 221 result = NULL; |
222 result = var_interface_->VarToUtf8(PP_MakeBool(true), &length); | 222 result = var_interface_->VarToUtf8(PP_MakeBool(PP_TRUE), &length); |
223 if (length != 0) { | 223 if (length != 0) { |
224 return "Expected 0 on string conversion from Bool var."; | 224 return "Expected 0 on string conversion from Bool var."; |
225 } | 225 } |
226 if (result != NULL) { | 226 if (result != NULL) { |
227 return "Expected NULL on string conversion from Bool var."; | 227 return "Expected NULL on string conversion from Bool var."; |
228 } | 228 } |
229 | 229 |
230 length = kInvalidLength; | 230 length = kInvalidLength; |
231 result = NULL; | 231 result = NULL; |
232 result = var_interface_->VarToUtf8(PP_MakeInt32(1), &length); | 232 result = var_interface_->VarToUtf8(PP_MakeInt32(1), &length); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 ASSERT_FALSE(exception.is_undefined()); | 320 ASSERT_FALSE(exception.is_undefined()); |
321 } | 321 } |
322 | 322 |
323 // Make sure nothing leaked. | 323 // Make sure nothing leaked. |
324 ASSERT_TRUE(testing_interface_->GetLiveObjectCount( | 324 ASSERT_TRUE(testing_interface_->GetLiveObjectCount( |
325 pp::Module::Get()->pp_module()) == before_objects); | 325 pp::Module::Get()->pp_module()) == before_objects); |
326 | 326 |
327 return std::string(); | 327 return std::string(); |
328 } | 328 } |
329 | 329 |
OLD | NEW |