diff options
author | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 14:16:01 +0000 |
---|---|---|
committer | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 14:16:01 +0000 |
commit | 36241198b8728ad98aaf75e5b6f17e297d89773e (patch) | |
tree | 8a4eea0be52b2f98599e745b61d065484cda3e8f /base/android | |
parent | 895f67b209cc03c0657d030cf1661d74ce849ed7 (diff) | |
download | chromium_src-36241198b8728ad98aaf75e5b6f17e297d89773e.zip chromium_src-36241198b8728ad98aaf75e5b6f17e297d89773e.tar.gz chromium_src-36241198b8728ad98aaf75e5b6f17e297d89773e.tar.bz2 |
Android: Fix PathUtilsTest.TestGetNativeLibraryDirectory
Instead of checking for a specific directory, check that the returned
directory contains a the base unit tests .so file. This should allow
the test to work on recent Jelly Bean build and make it less fragile
in general.
TEST=base_unittest:PathUtilsTest.TestGetNativeLibraryDirectory
BUG=
Review URL: https://chromiumcodereview.appspot.com/11412128
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/android')
-rw-r--r-- | base/android/path_utils_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/base/android/path_utils_unittest.cc b/base/android/path_utils_unittest.cc index 92728b5..636e3fa 100644 --- a/base/android/path_utils_unittest.cc +++ b/base/android/path_utils_unittest.cc @@ -4,6 +4,7 @@ #include "base/android/path_utils.h" #include "base/file_path.h" +#include "base/file_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -34,12 +35,11 @@ TEST_F(PathUtilsTest, TestGetCacheDirectory) { TEST_F(PathUtilsTest, TestGetNativeLibraryDirectory) { // The string comes from the Java side and depends on the APK - // we are running in. Assumes that we are packaged in - // org.chromium.native_test + // we are running in. Assumes that the directory contains + // the base tests shared object. FilePath path; GetNativeLibraryDirectory(&path); - EXPECT_STREQ("/data/data/org.chromium.native_test/lib", - path.value().c_str()); + EXPECT_TRUE(file_util::PathExists(path.Append(("libbase_unittests.so")))); } } // namespace android |