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

Side by Side Diff: ppapi/tests/test_case.cc

Issue 9937001: PPAPI: Refactor ppapi test callbacks to ease testing blocking callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/tests/test_case.h ('k') | ppapi/tests/test_file_system.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 "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
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
OLDNEW
« no previous file with comments | « ppapi/tests/test_case.h ('k') | ppapi/tests/test_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698