summaryrefslogtreecommitdiffstats
path: root/net/test/remote_test_server.cc
diff options
context:
space:
mode:
authorshouqun.liu@intel.com <shouqun.liu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 13:17:28 +0000
committershouqun.liu@intel.com <shouqun.liu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 13:17:28 +0000
commitb09c0a167416c2763461e5d6a8cb540700bf12fc (patch)
tree8ce55b8c290d3e565c72b04e272bf0f7b9855f24 /net/test/remote_test_server.cc
parent32ee872fc57bfab7d14792c1bd120d5b14e39f49 (diff)
downloadchromium_src-b09c0a167416c2763461e5d6a8cb540700bf12fc.zip
chromium_src-b09c0a167416c2763461e5d6a8cb540700bf12fc.tar.gz
chromium_src-b09c0a167416c2763461e5d6a8cb540700bf12fc.tar.bz2
Fix the failed cases in URLFetcherFileTest on Android.
* Push the needed data files to target device. * Set the correct document root. BUG= TEST=net_unittests --gtest_filter=URLFetcherFileTest.* Review URL: https://chromiumcodereview.appspot.com/10986042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test/remote_test_server.cc')
-rw-r--r--net/test/remote_test_server.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/test/remote_test_server.cc b/net/test/remote_test_server.cc
index 5020ca7..45da5a5 100644
--- a/net/test/remote_test_server.cc
+++ b/net/test/remote_test_server.cc
@@ -143,6 +143,16 @@ bool RemoteTestServer::Stop() {
return stopped;
}
+// On Android, the document root in the device is not the same as the document
+// root in the host machine where the test server is launched. So prepend
+// DIR_SOURCE_ROOT here to get the actual path of document root on the Android
+// device.
+FilePath RemoteTestServer::GetDocumentRoot() const {
+ FilePath src_dir;
+ PathService::Get(base::DIR_SOURCE_ROOT, &src_dir);
+ return src_dir.Append(document_root());
+}
+
bool RemoteTestServer::Init(const FilePath& document_root) {
if (document_root.IsAbsolute())
return false;