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

Unified Diff: ppapi/tests/test_input_event.cc

Issue 12193015: PPAPI/NaCl: Make related tests run in 1 fixture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 10 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 | « ppapi/tests/test_image_data.cc ('k') | ppapi/tests/test_scrollbar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_input_event.cc
diff --git a/ppapi/tests/test_input_event.cc b/ppapi/tests/test_input_event.cc
index c55912d2046fb3687eb74ce718ed176b914d6158..8aa8340adab261159ddb3b71648f1197f6801401 100644
--- a/ppapi/tests/test_input_event.cc
+++ b/ppapi/tests/test_input_event.cc
@@ -32,20 +32,16 @@ pp::Point GetCenter(const pp::Rect& rect) {
void TestInputEvent::RunTests(const std::string& filter) {
RUN_TEST(Events, filter);
-// Like RUN_TEST, but does an exact match with the filter (which means it does
-// not run the test if filter is empty).
-#define RUN_TEST_EXACT_MATCH(name, test_filter) \
- if (test_filter == #name) { \
- set_callback_type(PP_OPTIONAL); \
- instance_->LogTest(#name, CheckResourcesAndVars(Test##name())); \
+ // The AcceptTouchEvent_N tests should not be run when the filter is empty;
+ // they can only be run one at a time.
+ // TODO(dmichael): Figure out a way to make these run in the same test fixture
+ // instance.
+ if (!ShouldRunAllTests(filter)) {
+ RUN_TEST(AcceptTouchEvent_1, filter);
+ RUN_TEST(AcceptTouchEvent_2, filter);
+ RUN_TEST(AcceptTouchEvent_3, filter);
+ RUN_TEST(AcceptTouchEvent_4, filter);
}
-
- RUN_TEST_EXACT_MATCH(AcceptTouchEvent_1, filter);
- RUN_TEST_EXACT_MATCH(AcceptTouchEvent_2, filter);
- RUN_TEST_EXACT_MATCH(AcceptTouchEvent_3, filter);
- RUN_TEST_EXACT_MATCH(AcceptTouchEvent_4, filter);
-
-#undef RUN_TEST_EXACT_MATCH
}
TestInputEvent::TestInputEvent(TestingInstance* instance)
« no previous file with comments | « ppapi/tests/test_image_data.cc ('k') | ppapi/tests/test_scrollbar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698