From 14107b7a9857444a8cc7e418ae3bb9526f38e641 Mon Sep 17 00:00:00 2001 From: Guang Zhu Date: Fri, 3 Dec 2010 14:34:32 -0800 Subject: popular url test should load website list from external file There are two reasons to use hardcoded external path as website list: 1) the InstrumentationTestRunner did not provide a mechanism for passing extra parameters down to test class, so it's hard to provide test class with a location of test list file in a parameter 2) if we include the test list file as part of the asset and loaded via context during test, then it become hard for test harness to inject a list at test execution time because test list file is essentially compiled in when the apk is generated. So I'm reverting the test list loading part back to previous approach. Change-Id: I5532de8d153172771dba160d6ad89092f81ec6e4 --- tests/src/com/android/browser/PopularUrlsTest.java | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'tests') diff --git a/tests/src/com/android/browser/PopularUrlsTest.java b/tests/src/com/android/browser/PopularUrlsTest.java index ad1fe4f..ac9a90e 100644 --- a/tests/src/com/android/browser/PopularUrlsTest.java +++ b/tests/src/com/android/browser/PopularUrlsTest.java @@ -19,9 +19,9 @@ package com.android.browser; import android.app.Instrumentation; import android.content.Context; import android.content.Intent; -import android.content.res.AssetManager; import android.net.Uri; import android.net.http.SslError; +import android.os.Environment; import android.test.ActivityInstrumentationTestCase2; import android.text.TextUtils; import android.util.Log; @@ -37,7 +37,6 @@ import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; -import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.Iterator; import java.util.LinkedList; @@ -56,6 +55,7 @@ public class PopularUrlsTest extends ActivityInstrumentationTestCase2