mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 774833 - Robocop: use finishOpenedActivities instead of finalize; r=jmaher
This commit is contained in:
parent
feda695c89
commit
c7a193cf28
@ -83,7 +83,7 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
mAsserter.setTestName(this.getClass().getName());
|
||||
|
||||
// Set up Robotium.solo and Driver objects
|
||||
mSolo = new Solo(getInstrumentation());
|
||||
mSolo = new Solo(getInstrumentation(), mActivity);
|
||||
mDriver = new FennecNativeDriver(mActivity, mSolo);
|
||||
mActions = new FennecNativeActions(mActivity, mSolo, getInstrumentation(), mAsserter);
|
||||
}
|
||||
@ -106,11 +106,10 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
public void tearDown() throws Exception {
|
||||
try {
|
||||
mAsserter.endTest();
|
||||
mSolo.finalize();
|
||||
mSolo.finishOpenedActivities();
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
getActivity().finish();
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
|
@ -137,8 +137,6 @@ public class testAllPagesTab extends BaseTest {
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
Uri uri = Uri.parse("content://@ANDROID_PACKAGE_NAME@.db.browser/history");
|
||||
uri = uri.buildUpon().appendQueryParameter("profile", "default")
|
||||
@ -146,5 +144,7 @@ public class testAllPagesTab extends BaseTest {
|
||||
resolver.delete(uri, "url = ?", new String[] {
|
||||
"http://mochi.test:8888/tests/robocop/robocop_big_link.html"
|
||||
});
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
}
|
||||
|
@ -212,8 +212,6 @@ public class testBookmarksTab extends BaseTest {
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
Uri uri = Uri.parse("content://@ANDROID_PACKAGE_NAME@.db.browser/bookmarks");
|
||||
uri = uri.buildUpon().appendQueryParameter("profile", "default")
|
||||
@ -221,5 +219,7 @@ public class testBookmarksTab extends BaseTest {
|
||||
resolver.delete(uri, "title = ?", new String[] {
|
||||
"BOOKMARK_TITLE"
|
||||
});
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
}
|
||||
|
@ -336,10 +336,6 @@ public class testBrowserProvider extends ContentProviderTest {
|
||||
}
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
abstract class Test implements Runnable {
|
||||
public void run() {
|
||||
try {
|
||||
|
@ -255,7 +255,4 @@ public class testBrowserProviderPerf extends ContentProviderTest {
|
||||
c.close();
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
}
|
||||
}
|
||||
|
@ -108,11 +108,15 @@ public class testFormHistory extends BaseTest {
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
|
||||
// remove the entire signons.sqlite file
|
||||
File profile = new File(mProfile);
|
||||
File db = new File(profile, "formhistory.sqlite");
|
||||
db.delete();
|
||||
if (db.delete()) {
|
||||
mAsserter.dumpLog("tearDown deleted "+db.toString());
|
||||
} else {
|
||||
mAsserter.dumpLog("tearDown did not delete "+db.toString());
|
||||
}
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,4 @@ public class testJarReader extends BaseTest {
|
||||
return new java.util.Scanner(stream).useDelimiter("\\A").next();
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
}
|
||||
}
|
||||
|
@ -346,7 +346,11 @@ public class testMigration extends ContentProviderTest {
|
||||
// remove the database file
|
||||
File profile = new File(mProfile);
|
||||
File db = new File(profile, DB_NAME);
|
||||
db.delete();
|
||||
if (db.delete()) {
|
||||
mAsserter.dumpLog("tearDown deleted "+db.toString());
|
||||
} else {
|
||||
mAsserter.dumpLog("tearDown did not delete "+db.toString());
|
||||
}
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
|
@ -147,11 +147,15 @@ public class testPasswordEncrypt extends BaseTest {
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
|
||||
// remove the entire signons.sqlite file
|
||||
File profile = new File(mProfile);
|
||||
File db = new File(profile, "signons.sqlite");
|
||||
db.delete();
|
||||
if (db.delete()) {
|
||||
mAsserter.dumpLog("tearDown deleted "+db.toString());
|
||||
} else {
|
||||
mAsserter.dumpLog("tearDown did not delete "+db.toString());
|
||||
}
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
}
|
||||
|
@ -85,11 +85,15 @@ public class testPasswordProvider extends BaseTest {
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
|
||||
// remove the entire signons.sqlite file
|
||||
File profile = new File(mProfile);
|
||||
File db = new File(profile, "signons.sqlite");
|
||||
db.delete();
|
||||
if (db.delete()) {
|
||||
mAsserter.dumpLog("tearDown deleted "+db.toString());
|
||||
} else {
|
||||
mAsserter.dumpLog("tearDown did not delete "+db.toString());
|
||||
}
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user