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

Unified Diff: ppapi/tests/test_case.h

Issue 9564024: Re-land http://codereview.chromium.org/9403039/, r124106 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary change to ppapi_uitest.cc timer_ 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/tests/test_case.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_case.h
diff --git a/ppapi/tests/test_case.h b/ppapi/tests/test_case.h
index abd6c62a9584d5d9e938d352b955123920ceaafa..b4815a1a9dc54c36f82bc519a1ab80c654a4a355 100644
--- a/ppapi/tests/test_case.h
+++ b/ppapi/tests/test_case.h
@@ -7,6 +7,7 @@
#include <cmath>
#include <limits>
+#include <set>
#include <string>
#include "ppapi/c/pp_resource.h"
@@ -70,10 +71,16 @@ class TestCase {
// that want to handle view changes should override this method.
virtual bool HandleInputEvent(const pp::InputEvent& event);
+ void IgnoreLeakedVar(int64_t id);
+
+ TestingInstance* instance() { return instance_; }
+
+ const PPB_Testing_Dev* testing_interface() { return testing_interface_; }
+
protected:
#if !(defined __native_client__)
// Overridden by each test to supply a ScriptableObject corresponding to the
- // test. There can only be one object created for all test in a given class
+ // test. There can only be one object created for all tests in a given class,
// so be sure your object is designed to be re-used.
//
// This object should be created on the heap. Ownership will be passed to the
@@ -108,6 +115,9 @@ class TestCase {
bool force_async_;
private:
+ // Var ids that should be ignored when checking for leaks on shutdown.
+ std::set<int64_t> ignored_leaked_vars_;
+
#if !(defined __native_client__)
// Holds the test object, if any was retrieved from CreateTestObject.
pp::VarPrivate test_object_;
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/tests/test_case.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698