Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: base/android/path_utils_unittest.cc

Issue 11031008: Upstreaming chrome/common/chrome_* diff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "base/file_path.h"
nilesh 2012/10/01 20:38:35 Sort order.
aurimas (slooooooooow) 2012/10/01 21:06:41 Done.
10
9 namespace base { 11 namespace base {
10 namespace android { 12 namespace android {
11 13
12 typedef testing::Test PathUtilsTest; 14 typedef testing::Test PathUtilsTest;
13 15
14 TEST_F(PathUtilsTest, TestGetDataDirectory) { 16 TEST_F(PathUtilsTest, TestGetDataDirectory) {
15 // The string comes from the Java side and depends on the APK 17 // The string comes from the Java side and depends on the APK
16 // we are running in. Assumes that we are packaged in 18 // we are running in. Assumes that we are packaged in
17 // org.chromium.native_test 19 // org.chromium.native_test
20 FilePath path;
21 GetDataDirectory(&path);
18 EXPECT_STREQ("/data/data/org.chromium.native_test/app_chrome", 22 EXPECT_STREQ("/data/data/org.chromium.native_test/app_chrome",
19 GetDataDirectory().c_str()); 23 path.value().c_str());
20 } 24 }
21 25
22 TEST_F(PathUtilsTest, TestGetCacheDirectory) { 26 TEST_F(PathUtilsTest, TestGetCacheDirectory) {
23 // The string comes from the Java side and depends on the APK 27 // The string comes from the Java side and depends on the APK
24 // we are running in. Assumes that we are packaged in 28 // we are running in. Assumes that we are packaged in
25 // org.chromium.native_test 29 // org.chromium.native_test
30 FilePath path;
31 GetCacheDirectory(&path);
26 EXPECT_STREQ("/data/data/org.chromium.native_test/cache", 32 EXPECT_STREQ("/data/data/org.chromium.native_test/cache",
27 GetCacheDirectory().c_str()); 33 path.value().c_str());
28 } 34 }
29 35
30 TEST_F(PathUtilsTest, TestGetNativeLibraryDirectory) { 36 TEST_F(PathUtilsTest, TestGetNativeLibraryDirectory) {
31 // The string comes from the Java side and depends on the APK 37 // The string comes from the Java side and depends on the APK
32 // we are running in. Assumes that we are packaged in 38 // we are running in. Assumes that we are packaged in
33 // org.chromium.native_test 39 // org.chromium.native_test
40 FilePath path;
41 GetNativeLibraryDirectory(&path);
34 EXPECT_STREQ("/data/data/org.chromium.native_test/lib", 42 EXPECT_STREQ("/data/data/org.chromium.native_test/lib",
35 GetNativeLibraryDirectory().c_str()); 43 path.value().c_str());
36 } 44 }
37 45
38 } // namespace android 46 } // namespace android
39 } // namespace base 47 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698