summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree
diff options
context:
space:
mode:
Diffstat (limited to 'tests/DumpRenderTree')
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/FileList.java8
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java17
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java21
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java4
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/Menu.java4
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTest.java15
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java4
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/ForwardService.java4
8 files changed, 51 insertions, 26 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/FileList.java b/tests/DumpRenderTree/src/com/android/dumprendertree/FileList.java
index e741177..73d7363 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/FileList.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/FileList.java
@@ -31,6 +31,7 @@ import android.view.View;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.os.Bundle;
+import android.os.Environment;
public abstract class FileList extends ListActivity
@@ -179,10 +180,9 @@ public abstract class FileList extends ListActivity
getListView().setSelection(mFocusIndex);
}
- protected void setupPath()
- {
- mPath = "/sdcard/android/layout_tests";
- mBaseLength = mPath.length();
+ protected void setupPath() {
+ mPath = Environment.getExternalStorageDirectory() + "/android/layout_tests";
+ mBaseLength = mPath.length();
}
protected String mPath;
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java b/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java
index 4475e92..5d34e25 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/FsUtils.java
@@ -18,6 +18,7 @@ package com.android.dumprendertree;
import com.android.dumprendertree.forwarder.ForwardService;
+import android.os.Environment;
import android.util.Log;
import java.io.BufferedOutputStream;
@@ -32,11 +33,17 @@ import java.util.regex.Pattern;
public class FsUtils {
private static final String LOGTAG = "FsUtils";
- static final String HTTP_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/";
- static final String HTTPS_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/ssl/";
- static final String HTTP_LOCAL_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/local/";
- static final String HTTP_MEDIA_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/media/";
- static final String HTTP_WML_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/wml/";
+ static final String EXTERNAL_DIR = Environment.getExternalStorageDirectory().toString();
+ static final String HTTP_TESTS_PREFIX =
+ EXTERNAL_DIR + "/android/layout_tests/http/tests/";
+ static final String HTTPS_TESTS_PREFIX =
+ EXTERNAL_DIR + "/android/layout_tests/http/tests/ssl/";
+ static final String HTTP_LOCAL_TESTS_PREFIX =
+ EXTERNAL_DIR + "/android/layout_tests/http/tests/local/";
+ static final String HTTP_MEDIA_TESTS_PREFIX =
+ EXTERNAL_DIR + "/android/layout_tests/http/tests/media/";
+ static final String HTTP_WML_TESTS_PREFIX =
+ EXTERNAL_DIR + "/android/layout_tests/http/tests/wml/";
private FsUtils() {
//no creation of instances
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
index 3618c7b..132f17a 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
@@ -21,6 +21,7 @@ import com.android.dumprendertree.forwarder.AdbUtils;
import com.android.dumprendertree.forwarder.ForwardService;
import android.content.Intent;
+import android.os.Environment;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
@@ -89,10 +90,11 @@ class MyTestRecorder {
public MyTestRecorder(boolean resume) {
try {
- File resultsPassedFile = new File("/sdcard/layout_tests_passed.txt");
- File resultsFailedFile = new File("/sdcard/layout_tests_failed.txt");
- File resultsIgnoreResultFile = new File("/sdcard/layout_tests_ignored.txt");
- File noExpectedResultFile = new File("/sdcard/layout_tests_nontext.txt");
+ File externalDir = Environment.getExternalStorageDirectory();
+ File resultsPassedFile = new File(externalDir, "layout_tests_passed.txt");
+ File resultsFailedFile = new File(externalDir, "layout_tests_failed.txt");
+ File resultsIgnoreResultFile = new File(externalDir, "layout_tests_ignored.txt");
+ File noExpectedResultFile = new File(externalDir, "layout_tests_nontext.txt");
mBufferedOutputPassedStream =
new BufferedOutputStream(new FileOutputStream(resultsPassedFile, resume));
@@ -125,11 +127,12 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh
private static final String LOGTAG = "LayoutTests";
static final int DEFAULT_TIMEOUT_IN_MILLIS = 5000;
- static final String LAYOUT_TESTS_ROOT = "/sdcard/android/layout_tests/";
- static final String LAYOUT_TESTS_RESULT_DIR = "/sdcard/android/layout_tests_results/";
- static final String ANDROID_EXPECTED_RESULT_DIR = "/sdcard/android/expected_results/";
- static final String LAYOUT_TESTS_LIST_FILE = "/sdcard/android/layout_tests_list.txt";
- static final String TEST_STATUS_FILE = "/sdcard/android/running_test.txt";
+ static final String EXTERNAL_DIR = Environment.getExternalStorageDirectory().toString();
+ static final String LAYOUT_TESTS_ROOT = EXTERNAL_DIR + "/android/layout_tests/";
+ static final String LAYOUT_TESTS_RESULT_DIR = EXTERNAL_DIR + "/android/layout_tests_results/";
+ static final String ANDROID_EXPECTED_RESULT_DIR = EXTERNAL_DIR + "/android/expected_results/";
+ static final String LAYOUT_TESTS_LIST_FILE = EXTERNAL_DIR + "/android/layout_tests_list.txt";
+ static final String TEST_STATUS_FILE = EXTERNAL_DIR + "/android/running_test.txt";
static final String LAYOUT_TESTS_RESULTS_REFERENCE_FILES[] = {
"results/layout_tests_passed.txt",
"results/layout_tests_failed.txt",
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
index 2ef342f..9352f39 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
@@ -22,6 +22,7 @@ import android.app.Instrumentation;
import android.content.Intent;
import android.os.Bundle;
import android.os.Debug;
+import android.os.Environment;
import android.os.Process;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
@@ -35,7 +36,8 @@ import java.io.PrintStream;
public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShellActivity> {
private final static String LOGTAG = "LoadTest";
- private final static String LOAD_TEST_RESULT = "/sdcard/load_test_result.txt";
+ private final static String LOAD_TEST_RESULT =
+ Environment.getExternalStorageDirectory() + "/load_test_result.txt";
private boolean mFinished;
static final String LOAD_TEST_RUNNER_FILES[] = {
"run_page_cycler.py"
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/Menu.java b/tests/DumpRenderTree/src/com/android/dumprendertree/Menu.java
index 5ffe6b0..0b00d65 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/Menu.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/Menu.java
@@ -18,6 +18,7 @@ package com.android.dumprendertree;
import android.content.Intent;
import android.os.Bundle;
+import android.os.Environment;
import android.util.Log;
import java.io.BufferedOutputStream;
@@ -28,7 +29,8 @@ public class Menu extends FileList {
private static final int MENU_START = 0x01;
private static String LOGTAG = "MenuActivity";
- static final String LAYOUT_TESTS_LIST_FILE = "/sdcard/android/layout_tests_list.txt";
+ static final String LAYOUT_TESTS_LIST_FILE =
+ Environment.getExternalStorageDirectory() + "/android/layout_tests_list.txt";
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTest.java
index 9bc0962..d146fc7 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTest.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTest.java
@@ -18,6 +18,7 @@ package com.android.dumprendertree;
import android.app.Activity;
import android.content.Intent;
+import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.test.ActivityInstrumentationTestCase2;
@@ -37,10 +38,16 @@ public class ReliabilityTest extends ActivityInstrumentationTestCase2<Reliabilit
private static final String LOGTAG = "ReliabilityTest";
private static final String PKG_NAME = "com.android.dumprendertree";
- private static final String TEST_LIST_FILE = "/sdcard/android/reliability_tests_list.txt";
- private static final String TEST_STATUS_FILE = "/sdcard/android/reliability_running_test.txt";
- private static final String TEST_TIMEOUT_FILE = "/sdcard/android/reliability_timeout_test.txt";
- private static final String TEST_LOAD_TIME_FILE = "/sdcard/android/reliability_load_time.txt";
+ private static final String EXTERNAL_DIR =
+ Environment.getExternalStorageDirectory().toString();
+ private static final String TEST_LIST_FILE = EXTERNAL_DIR +
+ "/android/reliability_tests_list.txt";
+ private static final String TEST_STATUS_FILE = EXTERNAL_DIR +
+ "/android/reliability_running_test.txt";
+ private static final String TEST_TIMEOUT_FILE = EXTERNAL_DIR +
+ "/android/reliability_timeout_test.txt";
+ private static final String TEST_LOAD_TIME_FILE = EXTERNAL_DIR +
+ "/android/reliability_load_time.txt";
private static final String TEST_DONE = "#DONE";
static final String RELIABILITY_TEST_RUNNER_FILES[] = {
"run_reliability_tests.py"
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
index ef96813..f4773b5 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
@@ -30,6 +30,7 @@ import android.graphics.Bitmap.CompressFormat;
import android.graphics.Bitmap.Config;
import android.net.http.SslError;
import android.os.Bundle;
+import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
@@ -907,7 +908,8 @@ public class TestShellActivity extends Activity implements LayoutTestController
static final String STOP_ON_REF_ERROR = "StopOnReferenceError";
static final int DRAW_RUNS = 5;
- static final String DRAW_TIME_LOG = "/sdcard/android/page_draw_time.txt";
+ static final String DRAW_TIME_LOG = Environment.getExternalStorageDirectory() +
+ "/android/page_draw_time.txt";
private boolean mGeolocationPermissionSet;
private boolean mGeolocationPermission;
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/ForwardService.java b/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/ForwardService.java
index 8b7de6e..25dd04fd 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/ForwardService.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/ForwardService.java
@@ -21,6 +21,7 @@ import java.io.File;
import java.io.FileReader;
import java.io.IOException;
+import android.os.Environment;
import android.util.Log;
public class ForwardService {
@@ -33,7 +34,8 @@ public class ForwardService {
private static final String DEFAULT_TEST_HOST = "android-browser-test.mtv.corp.google.com";
- private static final String FORWARD_HOST_CONF = "/sdcard/drt_forward_host.txt";
+ private static final String FORWARD_HOST_CONF =
+ Environment.getExternalStorageDirectory() + "/drt_forward_host.txt";
private ForwardService() {
int addr = getForwardHostAddr();