Chromium Code Reviews

Unified Diff: base/test/test_suite.h

Issue 8947021: Destroy all Singletons and LazyInstances between each test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for realz Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | base/test/test_suite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_suite.h
diff --git a/base/test/test_suite.h b/base/test/test_suite.h
index 9f139ed0f648d0b067a7135cf98ff5878398beaa..1b18dcbdae163eae9fdda9f3f716ac86593774f1 100644
--- a/base/test/test_suite.h
+++ b/base/test/test_suite.h
@@ -59,6 +59,11 @@ class TestSuite {
virtual void Initialize();
virtual void Shutdown();
+ // Sets up a TestEventListener to shadow the at_exit_manager_ between each
+ // individual test. Broken test suites can override this method to disable
+ // this behavior until they can be fixed.
+ virtual void EnableSingletonTestIsolation();
jam 2013/05/07 18:09:57 i highly suggest not adding this method, i.e. not
Robert Sesek 2013/05/07 18:12:29 Good point. Done.
+
// Make sure that we setup an AtExitManager so Singleton objects will be
// destroyed.
scoped_ptr<base::AtExitManager> at_exit_manager_;
« no previous file with comments | « no previous file | base/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine