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

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

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 9 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/ppapi_sources.gypi ('k') | ppapi/tests/test_char_set.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Don't count test_object_ as a leak. 119 // Don't count test_object_ as a leak.
120 if (test_object_.pp_var().type > PP_VARTYPE_DOUBLE) 120 if (test_object_.pp_var().type > PP_VARTYPE_DOUBLE)
121 --leaked_vars; 121 --leaked_vars;
122 #endif 122 #endif
123 if (leaked_vars) { 123 if (leaked_vars) {
124 std::ostringstream output; 124 std::ostringstream output;
125 output << "Test leaked " << leaked_vars << " vars (printing at most " 125 output << "Test leaked " << leaked_vars << " vars (printing at most "
126 << kVarsToPrint <<"):<p>"; 126 << kVarsToPrint <<"):<p>";
127 errors += output.str(); 127 errors += output.str();
128 for (uint32_t i = 0; i < std::min(tracked_vars, kVarsToPrint); ++i) { 128 for (uint32_t i = 0; i < std::min(tracked_vars, kVarsToPrint); ++i) {
129 pp::Var leaked_var(pp::Var::PassRef(), vars[i]); 129 pp::Var leaked_var(pp::PASS_REF, vars[i]);
130 #if (defined __native_client__) 130 #if (defined __native_client__)
131 errors += leaked_var.DebugString() + "<p>"; 131 errors += leaked_var.DebugString() + "<p>";
132 #else 132 #else
133 if (!(leaked_var == test_object_)) 133 if (!(leaked_var == test_object_))
134 errors += leaked_var.DebugString() + "<p>"; 134 errors += leaked_var.DebugString() + "<p>";
135 #endif 135 #endif
136 } 136 }
137 } 137 }
138 } 138 }
139 return errors; 139 return errors;
140 } 140 }
141 141
OLDNEW
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/tests/test_char_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698