Index: net/test/embedded_test_server/android/embedded_test_server_android.cc |
diff --git a/net/test/embedded_test_server/android/embedded_test_server_android.cc b/net/test/embedded_test_server/android/embedded_test_server_android.cc |
index f3f301241e4b31507a39010ce88fe9408f187257..3a43e497f6728ba7a9fd38440be7f3376026a5f0 100644 |
--- a/net/test/embedded_test_server/android/embedded_test_server_android.cc |
+++ b/net/test/embedded_test_server/android/embedded_test_server_android.cc |
@@ -8,6 +8,7 @@ |
#include "base/android/scoped_java_ref.h" |
#include "base/bind.h" |
#include "base/files/file_path.h" |
+#include "base/test/test_support_android.h" |
#include "base/trace_event/trace_event.h" |
#include "net/test/jni/EmbeddedTestServerImpl_jni.h" |
@@ -69,8 +70,13 @@ void EmbeddedTestServerAndroid::Destroy(JNIEnv* env, |
delete this; |
} |
-static void Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) { |
+static void Init(JNIEnv* env, |
+ const JavaParamRef<jobject>& jobj, |
+ const JavaParamRef<jstring>& jtest_data_dir) { |
TRACE_EVENT0("native", "EmbeddedTestServerAndroid::Init"); |
+ base::FilePath test_data_dir( |
+ base::android::ConvertJavaStringToUTF8(env, jtest_data_dir)); |
+ base::InitAndroidTestPaths(test_data_dir); |
new EmbeddedTestServerAndroid(env, jobj); |
} |