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

Unified Diff: testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/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() + "/"
+ + 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(),

Powered by Google App Engine
This is Rietveld 408576698