summaryrefslogtreecommitdiff
path: root/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:44:00 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:44:00 -0800
commitd24b8183b93e781080b2c16c487e60d51c12da31 (patch)
treefbb89154858984eb8e41556da7e9433040d55cd4 /tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
parentf1e484acb594a726fb57ad0ae4cfe902c7f35858 (diff)
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java')
-rwxr-xr-xtests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
index e0e535e356b1..1f37405c8e67 100755
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
@@ -21,6 +21,9 @@ import com.android.dumprendertree.LayoutTestsAutoTest;
import android.test.InstrumentationTestRunner;
import android.test.InstrumentationTestSuite;
+import android.util.Log;
+import android.content.Intent;
+import android.os.Bundle;
/**
@@ -44,5 +47,22 @@ public class LayoutTestsAutoRunner extends InstrumentationTestRunner {
public ClassLoader getLoader() {
return LayoutTestsAutoRunner.class.getClassLoader();
}
+
+ @Override
+ public void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+ String path = (String) icicle.get("path");
+ LayoutTestsAutoTest.setLayoutTestDir(path);
+ String timeout_str = (String) icicle.get("timeout");
+ int timeout = 0; // default value
+ if (timeout_str != null) {
+ try {
+ timeout = Integer.parseInt(timeout_str);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ LayoutTestsAutoTest.setTimeoutInMillis(timeout);
+ }
}