diff options
author | Guang Zhu <guangzhu@google.com> | 2010-04-02 13:05:08 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-04-02 13:05:08 -0700 |
commit | 1087c1135d91523991ff5965d8800663e79cf030 (patch) | |
tree | 74efbaaa270b3fe281001f459873135e3fa89d30 | |
parent | 9f677bc4f0c396ba2cb867e9a1b03fc654c14533 (diff) | |
parent | 3ab2162efc89b085341c35f8b2376863d5d36754 (diff) | |
download | packages_apps_Browser-1087c1135d91523991ff5965d8800663e79cf030.zip packages_apps_Browser-1087c1135d91523991ff5965d8800663e79cf030.tar.gz packages_apps_Browser-1087c1135d91523991ff5965d8800663e79cf030.tar.bz2 |
Merge "add launch performance test for browser" into froyo
-rw-r--r-- | tests/AndroidManifest.xml | 5 | ||||
-rw-r--r-- | tests/src/com/android/browser/BrowserLaunchPerformance.java | 26 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml index 51715a9..cb1ffc7 100644 --- a/tests/AndroidManifest.xml +++ b/tests/AndroidManifest.xml @@ -34,4 +34,9 @@ android:targetPackage="com.android.browser" android:label="Tests for Browser."/> + <instrumentation android:name="com.android.browser.BrowserLaunchPerformance" + android:targetPackage="com.android.browser" + android:label="Browser Launch Performance"> + </instrumentation> + </manifest> diff --git a/tests/src/com/android/browser/BrowserLaunchPerformance.java b/tests/src/com/android/browser/BrowserLaunchPerformance.java new file mode 100644 index 0000000..c5d4279 --- /dev/null +++ b/tests/src/com/android/browser/BrowserLaunchPerformance.java @@ -0,0 +1,26 @@ +package com.android.browser; + +import android.app.Activity; +import android.os.Bundle; +import android.test.LaunchPerformanceBase; + +public class BrowserLaunchPerformance extends LaunchPerformanceBase { + + @Override + public void onCreate(Bundle arguments) { + super.onCreate(arguments); + + mIntent.setClassName(getTargetContext(), "com.android.browser.BrowserActivity"); + start(); + } + + /** + * Calls LaunchApp and finish. + */ + @Override + public void onStart() { + super.onStart(); + LaunchApp(); + finish(Activity.RESULT_OK, mResults); + } +} |