Chromium Code Reviews| Index: testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java |
| diff --git a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java |
| index 42befe57cb6bd84ad51c5e0d3cfbfada328b6bae..d476cbcc0198c108d28f30597a3fe6be626ac3b2 100644 |
| --- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java |
| +++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java |
| @@ -7,6 +7,7 @@ package org.chromium.native_test; |
| import android.app.Activity; |
| import android.content.Context; |
| import android.os.Bundle; |
| +import android.os.Environment; |
| import android.os.Handler; |
| import android.util.Log; |
| @@ -16,6 +17,8 @@ import org.chromium.base.PowerMonitor; |
| import org.chromium.base.ResourceExtractor; |
| import org.chromium.base.library_loader.NativeLibraries; |
| +import java.io.File; |
| + |
| /** |
| * Android's NativeActivity is mostly useful for pure-native code. |
| * Our tests need to go up to our own java classes, which is not possible using |
| @@ -75,7 +78,16 @@ public class ChromeNativeTestActivity extends Activity { |
| if (commandLineFlags == null) commandLineFlags = ""; |
| String commandLineFilePath = getIntent().getStringExtra(EXTRA_COMMAND_LINE_FILE); |
| - if (commandLineFilePath == null) commandLineFilePath = ""; |
| + if (commandLineFilePath == null) { |
| + commandLineFilePath = ""; |
| + } else { |
| + File commandLineFile = new File(commandLineFilePath); |
| + if (!commandLineFile.isAbsolute()) { |
| + commandLineFilePath = Environment.getExternalStorageDirectory() + "/" |
|
klundberg
2015/01/13 19:33:15
This line seems longer than 80 characters?
jbudorick
2015/01/13 19:38:41
It is, but the java line limit is 100 characters.
klundberg
2015/01/13 19:41:16
Sorry, I don't know what I was thinking as I revie
|
| + + commandLineFilePath; |
| + } |
| + Log.i(TAG, "command line file path: " + commandLineFilePath); |
| + } |
| // This directory is used by build/android/pylib/test_package_apk.py. |
| nativeRunTests(commandLineFlags, commandLineFilePath, getFilesDir().getAbsolutePath(), |