Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: testing/android/native_test/native_test_launcher.cc

Issue 2043803003: 👔 Reland #2: Move side-loaded test data /sdcard -> /sdcard/gtestdata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase atop https://codereview.chromium.org/2041723006 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: testing/android/native_test/native_test_launcher.cc
diff --git a/testing/android/native_test/native_test_launcher.cc b/testing/android/native_test/native_test_launcher.cc
index 5d392891b2e04db42a70707fd80d75fc3d5b303a..3b5ee8328036995724e78db3404578468ed62cad 100644
--- a/testing/android/native_test/native_test_launcher.cc
+++ b/testing/android/native_test/native_test_launcher.cc
@@ -24,6 +24,7 @@
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/strings/stringprintf.h"
+#include "base/test/test_support_android.h"
#include "gtest/gtest.h"
#include "jni/NativeTest_jni.h"
#include "testing/android/native_test/native_test_util.h"
@@ -70,7 +71,8 @@ static void RunTests(JNIEnv* env,
const JavaParamRef<jstring>& jcommand_line_file_path,
const JavaParamRef<jstring>& jstdout_file_path,
jboolean jstdout_fifo,
- const JavaParamRef<jobject>& app_context) {
+ const JavaParamRef<jobject>& app_context,
+ const JavaParamRef<jstring>& jtest_data_dir) {
// Command line initialized basically, will be fully initialized later.
static const char* const kInitialArgv[] = { "ChromeTestActivity" };
base::CommandLine::Init(arraysize(kInitialArgv), kInitialArgv);
@@ -124,6 +126,10 @@ static void RunTests(JNIEnv* env,
base::debug::WaitForDebugger(24 * 60 * 60, false);
}
+ base::FilePath test_data_dir(
+ base::android::ConvertJavaStringToUTF8(env, jtest_data_dir));
+ base::InitAndroidTestPaths(test_data_dir);
+
ScopedMainEntryLogger scoped_main_entry_logger;
main(argc, &argv[0]);
}

Powered by Google App Engine
This is Rietveld 408576698