diff options
author | Guang Zhu <guangzhu@google.com> | 2011-07-11 22:26:42 -0700 |
---|---|---|
committer | Guang Zhu <guangzhu@google.com> | 2011-07-11 22:26:42 -0700 |
commit | 1608e30403d4cd4f60d14bf2263443421e85b028 (patch) | |
tree | b2ca90321ab969ce650347abb6e9e1f00b7ea233 /tests/src/com/android/browser | |
parent | cbba1f3ecd54bda183f877a4b873ac9732d77f52 (diff) | |
download | packages_apps_Browser-1608e30403d4cd4f60d14bf2263443421e85b028.tar.gz packages_apps_Browser-1608e30403d4cd4f60d14bf2263443421e85b028.tar.bz2 packages_apps_Browser-1608e30403d4cd4f60d14bf2263443421e85b028.zip |
Don't open new tab when launching new site in test
append an EXTRA_APPLICATION_ID field in the intent to navigate to
a new website, so that the browser won't open a new tab for every
new site
Change-Id: I69dddabeef83e124c43adab7bf3ed1e064b396ab
Diffstat (limited to 'tests/src/com/android/browser')
-rw-r--r-- | tests/src/com/android/browser/PopularUrlsTest.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/src/com/android/browser/PopularUrlsTest.java b/tests/src/com/android/browser/PopularUrlsTest.java index 85dc4a3e7..cbe832451 100644 --- a/tests/src/com/android/browser/PopularUrlsTest.java +++ b/tests/src/com/android/browser/PopularUrlsTest.java @@ -21,6 +21,7 @@ import android.content.Intent; import android.net.Uri; import android.net.http.SslError; import android.os.Environment; +import android.provider.Browser; import android.test.ActivityInstrumentationTestCase2; import android.text.TextUtils; import android.util.Log; @@ -467,6 +468,8 @@ public class PopularUrlsTest extends ActivityInstrumentationTestCase2<BrowserAct Log.i(TAG, "start: " + page); Uri uri = Uri.parse(page); final Intent intent = new Intent(Intent.ACTION_VIEW, uri); + intent.putExtra(Browser.EXTRA_APPLICATION_ID, + getInstrumentation().getTargetContext().getPackageName()); long startTime = System.currentTimeMillis(); resetForNewPage(); |