diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-27 20:49:55 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-27 20:49:55 +0000 |
commit | 9c73c775a14581f1b005c30242be0354afe64bfd (patch) | |
tree | 5c3de6ed874caf93886fba43d951c56ebc7c704b /base/test_suite.h | |
parent | 467751964600388345aa537e1436b036d159ac92 (diff) | |
download | chromium_src-9c73c775a14581f1b005c30242be0354afe64bfd.zip chromium_src-9c73c775a14581f1b005c30242be0354afe64bfd.tar.gz chromium_src-9c73c775a14581f1b005c30242be0354afe64bfd.tar.bz2 |
Enable stats_tabe_unittest.cc on OS X.
Review URL: http://codereview.chromium.org/8160
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/test_suite.h')
-rw-r--r-- | base/test_suite.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/base/test_suite.h b/base/test_suite.h index 9104a54..503aeda 100644 --- a/base/test_suite.h +++ b/base/test_suite.h @@ -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 @@ class TestSuite { 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 @@ class TestSuite { 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(); |