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

Unified Diff: base/test_suite.h

Issue 8160: Enable stats_tabe_unittest.cc on OS X. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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
« base/process_util_mac.mm ('K') | « base/stats_table_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test_suite.h
===================================================================
--- base/test_suite.h (revision 4007)
+++ base/test_suite.h (working copy)
@@ -23,6 +23,8 @@
#elif defined(OS_LINUX)
#include <dlfcn.h>
#include <gtk/gtk.h>
+#elif defined(OS_MACOSX)
+#include <dlfcn.h>
#endif
class TestSuite {
@@ -39,7 +41,6 @@
int Run() {
Initialize();
-#if defined(OS_WIN) || defined(OS_LINUX)
std::wstring client_func = CommandLine().GetSwitchValue(kRunClientProcess);
// Check to see if we are being run as a client process.
if (!client_func.empty()) {
@@ -57,13 +58,16 @@
MultiProcessTest::ChildFunctionPtr func =
reinterpret_cast<MultiProcessTest::ChildFunctionPtr>(
dlsym(exobj, func_name.c_str()));
-#endif // defined(OS_LINUX)
+#elif defined(OS_MACOSX)
+ MultiProcessTest::ChildFunctionPtr func =
+ reinterpret_cast<MultiProcessTest::ChildFunctionPtr>(
+ dlsym(RTLD_SELF, func_name.c_str()));
+#endif // defined(OS_MACOSX)
if (func)
return (*func)();
return -1;
}
-#endif // defined(OS_WIN) || defined(OS_LINUX)
int result = RUN_ALL_TESTS();
Shutdown();
« base/process_util_mac.mm ('K') | « base/stats_table_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698