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

Unified Diff: trunk/src/ppapi/tests/test_case.h

Issue 12920003: Revert 189518 "PPAPI: Remove threading options; it's always on" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | « trunk/src/ppapi/shared_impl/var_tracker.cc ('k') | trunk/src/webkit/plugins/plugin_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ppapi/tests/test_case.h
===================================================================
--- trunk/src/ppapi/tests/test_case.h (revision 189681)
+++ trunk/src/ppapi/tests/test_case.h (working copy)
@@ -137,6 +137,7 @@
// Run the given test method on a background thread and return the result.
template <class T>
std::string RunOnThread(std::string(T::*test_to_run)()) {
+#ifdef ENABLE_PEPPER_THREADING
if (!testing_interface_) {
return "Testing blocking callbacks requires the testing interface. In "
"Chrome, use the --enable-pepper-testing flag.";
@@ -151,6 +152,10 @@
RunOnThreadInternal(&ThreadedTestRunner<T>::ThreadFunction, &runner,
testing_interface_);
return runner.result();
+#else
+ // If threading's not enabled, just treat it as success.
+ return std::string();
+#endif
}
// Pointer to the instance that owns us.
« no previous file with comments | « trunk/src/ppapi/shared_impl/var_tracker.cc ('k') | trunk/src/webkit/plugins/plugin_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698