1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Several paths are not supported in PathService by libchrome.
--- a/base/base_paths_posix.cc
+++ b/base/base_paths_posix.cc
@@ -19,7 +19,8 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
-#include "base/nix/xdg_util.h"
+// Unused, and this file is not ported to libchrome.
+// #include "base/nix/xdg_util.h"
#include "base/path_service.h"
#include "base/process/process_metrics.h"
#include "build/build_config.h"
@@ -77,6 +78,8 @@ bool PathProviderPosix(int key, FilePath
return true;
#endif
}
+// Following paths are not supported in libchrome/libmojo.
+#if 0
case DIR_SOURCE_ROOT: {
// Allow passing this in the environment, for more flexibility in build
// tree configurations (sub-project builds, gyp --output_dir, etc.)
@@ -112,6 +115,7 @@ bool PathProviderPosix(int key, FilePath
*result = cache_dir;
return true;
}
+#endif
}
return false;
}
--- a/base/files/file_util_posix.cc
+++ b/base/files/file_util_posix.cc
@@ -533,6 +533,8 @@ bool GetTempDir(FilePath* path) {
} else {
#if defined(OS_ANDROID)
return PathService::Get(base::DIR_CACHE, path);
+#elif defined(__ANDROID__)
+ *path = FilePath("/data/local/tmp");
#else
*path = FilePath("/tmp");
#endif
--- a/base/json/json_reader_unittest.cc
+++ b/base/json/json_reader_unittest.cc
@@ -567,7 +567,7 @@ TEST(JSONReaderTest, Reading) {
}
}
-TEST(JSONReaderTest, ReadFromFile) {
+TEST(JSONReaderTest, DISABLED_ReadFromFile) {
FilePath path;
ASSERT_TRUE(PathService::Get(base::DIR_TEST_DATA, &path));
path = path.AppendASCII("json");
--- a/base/json/json_value_serializer_unittest.cc
+++ b/base/json/json_value_serializer_unittest.cc
@@ -402,7 +402,7 @@ class JSONFileValueSerializerTest : publ
ScopedTempDir temp_dir_;
};
-TEST_F(JSONFileValueSerializerTest, Roundtrip) {
+TEST_F(JSONFileValueSerializerTest, DISABLED_Roundtrip) {
FilePath original_file_path;
ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &original_file_path));
original_file_path = original_file_path.AppendASCII("serializer_test.json");
@@ -445,7 +445,7 @@ TEST_F(JSONFileValueSerializerTest, Roun
EXPECT_TRUE(DeleteFile(written_file_path, false));
}
-TEST_F(JSONFileValueSerializerTest, RoundtripNested) {
+TEST_F(JSONFileValueSerializerTest, DISABLED_RoundtripNested) {
FilePath original_file_path;
ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &original_file_path));
original_file_path =
@@ -471,7 +471,7 @@ TEST_F(JSONFileValueSerializerTest, Roun
EXPECT_TRUE(DeleteFile(written_file_path, false));
}
-TEST_F(JSONFileValueSerializerTest, NoWhitespace) {
+TEST_F(JSONFileValueSerializerTest, DISABLED_NoWhitespace) {
FilePath source_file_path;
ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &source_file_path));
source_file_path =
|