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 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace base { | 9 namespace base { |
10 namespace android { | 10 namespace android { |
11 | 11 |
12 typedef testing::Test PathUtilsTest; | 12 typedef testing::Test PathUtilsTest; |
13 | 13 |
14 TEST_F(PathUtilsTest, TestGetDataDirectory) { | 14 TEST_F(PathUtilsTest, TestGetDataDirectory) { |
15 // The string comes from the Java side and depends on the APK | 15 // The string comes from the Java side and depends on the APK |
16 // we are running in. Assumes that we are packaged in | 16 // we are running in. Assumes that we are packaged in |
17 // org.chromium.native_test | 17 // org.chromium.native_test |
18 EXPECT_STREQ("/data/data/org.chromium.native_test/app_chrome", | 18 EXPECT_STREQ("/data/data/org.chromium.native_test/app_chrome", |
19 GetDataDirectory().c_str()); | 19 GetDataDirectory().c_str()); |
20 } | 20 } |
21 | 21 |
22 TEST_F(PathUtilsTest, TestGetCacheDirectory) { | 22 TEST_F(PathUtilsTest, TestGetCacheDirectory) { |
23 // The string comes from the Java side and depends on the APK | 23 // The string comes from the Java side and depends on the APK |
24 // we are running in. Assumes that we are packaged in | 24 // we are running in. Assumes that we are packaged in |
25 // org.chromium.native_test | 25 // org.chromium.native_test |
26 EXPECT_STREQ("/data/data/org.chromium.native_test/cache", | 26 EXPECT_STREQ("/data/data/org.chromium.native_test/cache", |
27 GetCacheDirectory().c_str()); | 27 GetCacheDirectory().c_str()); |
28 } | 28 } |
29 | 29 |
| 30 TEST_F(PathUtilsTest, TestGetNativeLibraryDirectory) { |
| 31 // The string comes from the Java side and depends on the APK |
| 32 // we are running in. Assumes that we are packaged in |
| 33 // org.chromium.native_test |
| 34 EXPECT_STREQ("/data/data/org.chromium.native_test/lib", |
| 35 GetNativeLibraryDirectory().c_str()); |
| 36 } |
| 37 |
30 } // namespace android | 38 } // namespace android |
31 } // namespace base | 39 } // namespace base |
OLD | NEW |