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

Unified Diff: ppapi/tests/testing_instance.h

Issue 8477015: Make it possible to enable/disable specific ppapi tests. Migrate PostMessage tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix license headers. Created 9 years, 1 month 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 | « ppapi/tests/test_video_decoder.cc ('k') | ppapi/tests/testing_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/testing_instance.h
diff --git a/ppapi/tests/testing_instance.h b/ppapi/tests/testing_instance.h
index 0c79923dbf83840cc5d973d812d5249b655d6ab8..8f6b7b1d201825a76e021ca70eb971e8214ca52e 100644
--- a/ppapi/tests/testing_instance.h
+++ b/ppapi/tests/testing_instance.h
@@ -87,8 +87,18 @@ pp::InstancePrivate {
void ExecuteTests(int32_t unused);
// Creates a new TestCase for the give test name, or NULL if there is no such
- // test. Ownership is passed to the caller.
- TestCase* CaseForTestName(const char* name);
+ // test. Ownership is passed to the caller. The given string is split by '_'.
+ // The test case name is the first part.
+ TestCase* CaseForTestName(const std::string& name);
+ // Returns the filter (second part) of the given string. If there is no '_',
+ // returns the empty string, which means 'run all tests for this test case'.
+ // E.g.:
+ // http://testserver/test_case.html?testcase=PostMessage
+ // Otherwise, the part of the testcase after '_' is returned, and the test
+ // whose name matches that string (if any) will be run:
+ // http://testserver/test_case.html?testcase=PostMessage_SendingData
+ // Runs 'PostMessage_SendingData.
+ std::string FilterForTestName(const std::string& name);
// Appends a list of available tests to the console in the document.
void LogAvailableTests();
@@ -109,6 +119,10 @@ pp::InstancePrivate {
// Owning pointer to the current test case. Valid after Init has been called.
TestCase* current_case_;
+ // A filter to use when running tests. This is passed to 'RunTests', which
+ // runs only tests whose name contains test_filter_ as a substring.
+ std::string test_filter_;
+
// The current step we're on starting at 0. This is incremented every time we
// report progress via a cookie. See comment above the class.
int progress_cookie_number_;
« no previous file with comments | « ppapi/tests/test_video_decoder.cc ('k') | ppapi/tests/testing_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698