| 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 "ppapi/tests/test_case.h" | 5 #include "ppapi/tests/test_case.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "ppapi/tests/test_utils.h" | 9 #include "ppapi/tests/test_utils.h" |
| 10 #include "ppapi/tests/testing_instance.h" | 10 #include "ppapi/tests/testing_instance.h" |
| 11 | 11 |
| 12 TestCase::TestCase(TestingInstance* instance) | 12 TestCase::TestCase(TestingInstance* instance) |
| 13 : instance_(instance), | 13 : instance_(instance), |
| 14 testing_interface_(NULL), | 14 testing_interface_(NULL), |
| 15 force_async_(false) { | 15 callback_type_(PP_REQUIRED) { |
| 16 // Get the testing_interface_ if it is available, so that we can do Resource | 16 // Get the testing_interface_ if it is available, so that we can do Resource |
| 17 // and Var checks on shutdown (see CheckResourcesAndVars). If it is not | 17 // and Var checks on shutdown (see CheckResourcesAndVars). If it is not |
| 18 // available, testing_interface_ will be NULL. Some tests do not require it. | 18 // available, testing_interface_ will be NULL. Some tests do not require it. |
| 19 testing_interface_ = GetTestingInterface(); | 19 testing_interface_ = GetTestingInterface(); |
| 20 } | 20 } |
| 21 | 21 |
| 22 TestCase::~TestCase() { | 22 TestCase::~TestCase() { |
| 23 } | 23 } |
| 24 | 24 |
| 25 bool TestCase::Init() { | 25 bool TestCase::Init() { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 for (int i = 0; i < std::min(found_vars, kVarsToPrint); ++i) { | 137 for (int i = 0; i < std::min(found_vars, kVarsToPrint); ++i) { |
| 138 pp::Var leaked_var(pp::PASS_REF, vars[i]); | 138 pp::Var leaked_var(pp::PASS_REF, vars[i]); |
| 139 if (ignored_leaked_vars_.count(leaked_var.pp_var().value.as_id) == 0) | 139 if (ignored_leaked_vars_.count(leaked_var.pp_var().value.as_id) == 0) |
| 140 errors += leaked_var.DebugString() + "<p>"; | 140 errors += leaked_var.DebugString() + "<p>"; |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 return errors; | 143 return errors; |
| 144 } | 144 } |
| 145 | 145 |
| 146 | 146 |
| OLD | NEW |