| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/android/path_utils.h" | 5 #include "base/android/path_utils.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 | 9 |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 "/data/user/0/org.chromium.native_test/cache", | 47 "/data/user/0/org.chromium.native_test/cache", |
| 48 path.value()); | 48 path.value()); |
| 49 } | 49 } |
| 50 | 50 |
| 51 TEST_F(PathUtilsTest, TestGetNativeLibraryDirectory) { | 51 TEST_F(PathUtilsTest, TestGetNativeLibraryDirectory) { |
| 52 // The string comes from the Java side and depends on the APK | 52 // The string comes from the Java side and depends on the APK |
| 53 // we are running in. Assumes that the directory contains | 53 // we are running in. Assumes that the directory contains |
| 54 // the base tests shared object. | 54 // the base tests shared object. |
| 55 FilePath path; | 55 FilePath path; |
| 56 GetNativeLibraryDirectory(&path); | 56 GetNativeLibraryDirectory(&path); |
| 57 EXPECT_TRUE(base::PathExists(path.Append(("libbase_unittests.so"))) || | 57 EXPECT_TRUE( |
| 58 base::PathExists(path.Append(("libbase_unittests.cr.so")))); | 58 base::PathExists(path.Append("libbase_unittests.so")) || |
| 59 base::PathExists(path.Append("libbase_unittests.cr.so")) || |
| 60 base::PathExists(path.Append("lib_base_unittests__library.so")) || |
| 61 base::PathExists(path.Append("lib_base_unittests__library.cr.so"))); |
| 59 } | 62 } |
| 60 | 63 |
| 61 } // namespace android | 64 } // namespace android |
| 62 } // namespace base | 65 } // namespace base |
| OLD | NEW |