Merge commit '0b12dc3acaa5e6b2b0ac05374faf65a7e212ae4f' into eclair-mr2-plus-aosp * commit '0b12dc3acaa5e6b2b0ac05374faf65a7e212ae4f': Remove the activity restart between urls.
This commit is contained in:
@@ -74,6 +74,8 @@ public class ReliabilityTest extends ActivityInstrumentationTestCase2<Reliabilit
|
|||||||
|
|
||||||
Intent intent = new Intent(runner.getContext(), ReliabilityTestActivity.class);
|
Intent intent = new Intent(runner.getContext(), ReliabilityTestActivity.class);
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
ReliabilityTestActivity activity = (ReliabilityTestActivity)runner.startActivitySync(
|
||||||
|
intent);
|
||||||
//read from BufferedReader instead of populating a list in advance,
|
//read from BufferedReader instead of populating a list in advance,
|
||||||
//this will avoid excessive memory usage in case of a large list
|
//this will avoid excessive memory usage in case of a large list
|
||||||
while((url = listReader.readLine()) != null) {
|
while((url = listReader.readLine()) != null) {
|
||||||
@@ -83,8 +85,6 @@ public class ReliabilityTest extends ActivityInstrumentationTestCase2<Reliabilit
|
|||||||
start = System.currentTimeMillis();
|
start = System.currentTimeMillis();
|
||||||
Log.v(LOGTAG, "Testing URL: " + url);
|
Log.v(LOGTAG, "Testing URL: " + url);
|
||||||
FsUtils.updateTestStatus(TEST_STATUS_FILE, url);
|
FsUtils.updateTestStatus(TEST_STATUS_FILE, url);
|
||||||
ReliabilityTestActivity activity = (ReliabilityTestActivity)runner.startActivitySync(
|
|
||||||
intent);
|
|
||||||
activity.reset();
|
activity.reset();
|
||||||
//use message to send new URL to avoid interacting with
|
//use message to send new URL to avoid interacting with
|
||||||
//WebView in non-UI thread
|
//WebView in non-UI thread
|
||||||
@@ -110,11 +110,11 @@ public class ReliabilityTest extends ActivityInstrumentationTestCase2<Reliabilit
|
|||||||
if(runner.mLogtime) {
|
if(runner.mLogtime) {
|
||||||
writeLoadTime(url, activity.getPageLoadTime());
|
writeLoadTime(url, activity.getPageLoadTime());
|
||||||
}
|
}
|
||||||
activity.finish();
|
|
||||||
System.runFinalization();
|
System.runFinalization();
|
||||||
System.gc();
|
System.gc();
|
||||||
System.gc();
|
System.gc();
|
||||||
}
|
}
|
||||||
|
activity.finish();
|
||||||
FsUtils.updateTestStatus(TEST_STATUS_FILE, TEST_DONE);
|
FsUtils.updateTestStatus(TEST_STATUS_FILE, TEST_DONE);
|
||||||
// activity.finish();
|
// activity.finish();
|
||||||
listReader.close();
|
listReader.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user