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

Unified Diff: base/test/test_suite.h

Issue 26883002: Introduce base::TestSuite::DisableTests(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: now works on Android Created 7 years, 2 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 | « 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 50cde8489bef85eb06638ba5ac9645efde8d33d8..8dd50263159175c2369f05b5075c39a2c6f92e38 100644
--- a/base/test/test_suite.h
+++ b/base/test/test_suite.h
@@ -35,6 +35,16 @@ class TestSuite {
void CatchMaybeTests();
+ // Disables tests that match the |filter|. This gives the test suite an
+ // opportunity to disable tests at runtime. Must be called before Run()
+ // to take effect.
+ //
+ // For example, to disable "FooTest" when IsFooSupported() is false:
+ // if (!IsFooSupported())
+ // DisableTests("FooTest.*");
+ // Run();
+ void DisableTests(const std::string& filter);
+
void ResetCommandLine();
void AddTestLauncherResultPrinter();
« no previous file with comments | « no previous file | base/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698