Index: webkit/support/platform_support_android.cc |
diff --git a/webkit/support/platform_support_android.cc b/webkit/support/platform_support_android.cc |
index cce355752c8b71b769bba7a8a4c43f22201de47c..4183312175e581cdf5fabcafd0759be8fdf6ece1 100644 |
--- a/webkit/support/platform_support_android.cc |
+++ b/webkit/support/platform_support_android.cc |
@@ -24,9 +24,7 @@ namespace { |
// The place where the Android layout test script will put the required tools |
// and resources. Must keep consistent with DEVICE_DRT_DIR in |
// WebKit/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py. |
-// TODO(wangxianzhu): Allow running DRT on non-rooted device by putting |
-// the tools and resources into the apk or under /data/local/tmp. |
-const char kDumpRenderTreeDir[] = "/data/drt"; |
+const char kDumpRenderTreeDir[] = "/data/local/tmp/drt"; |
} |
@@ -35,6 +33,11 @@ namespace webkit_support { |
void BeforeInitialize(bool unit_test_mode) { |
base::InitAndroidTestPaths(); |
+ // Place cache under kDumpRenderTreeDir to allow the NRWT script to clear it. |
+ FilePath path(kDumpRenderTreeDir); |
+ path = path.Append("cache"); |
+ PathService::Override(base::DIR_CACHE, path); |
+ |
// Set XML_CATALOG_FILES environment variable to blank to prevent libxml from |
// loading and complaining the non-exsistent /etc/xml/catalog file. |
setenv("XML_CATALOG_FILES", "", 0); |