From 108c2a1d2780d49121e16b18a29580ef4d28c790 Mon Sep 17 00:00:00 2001 From: "jcampan@chromium.org" Date: Fri, 5 Jun 2009 22:18:09 +0000 Subject: Porting the browser tests to Unix. The browser tests are an alternative to UI tests. They provide a way to exercise the browser from within the test (without having the test and the browser running in different processes). In order to ensure atexit hanlders are run after each tests and static initializers start fresh for each test, each test is run in a new process (on Linux and Mac). On Windows, a DLL containing the test is loaded/unloaded for each tests. BUG=None TEST=Run the browser tests. Review URL: http://codereview.chromium.org/115896 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17781 0039d316-1c4b-4281-b951-d872f2087c98 --- base/native_library_linux.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'base/native_library_linux.cc') diff --git a/base/native_library_linux.cc b/base/native_library_linux.cc index f103bba..39221c1 100644 --- a/base/native_library_linux.cc +++ b/base/native_library_linux.cc @@ -8,6 +8,7 @@ #include "base/file_path.h" #include "base/logging.h" +#include "base/string_util.h" namespace base { @@ -29,8 +30,13 @@ void UnloadNativeLibrary(NativeLibrary library) { // static void* GetFunctionPointerFromNativeLibrary(NativeLibrary library, - NativeLibraryFunctionNameType name) { + const char* name) { return dlsym(library, name); } +// static +string16 GetNativeLibraryName(const string16& name) { + return ASCIIToUTF16("lib") + name + ASCIIToUTF16(".so"); +} + } // namespace base -- cgit v1.1