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