Bug 1125449 - Removed mActivity field and all of its occurences and replaced them with getActivity(). r=mcomella

This commit is contained in:
Alexander Dimitrov 2015-02-03 11:42:00 +01:00
Родитель 58fd57de5e
Коммит 8532134fc3
2 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -71,7 +71,6 @@ public abstract class BaseRobocopTest extends ActivityInstrumentationTestCase2<A
protected Driver mDriver;
protected Actions mActions;
protected Activity mActivity;
protected String mProfile;
protected abstract Intent createActivityIntent();
@ -140,12 +139,12 @@ public abstract class BaseRobocopTest extends ActivityInstrumentationTestCase2<A
// Start the activity.
final Intent intent = createActivityIntent();
setActivityIntent(intent);
mActivity = getActivity();
// Set up Robotium.solo and Driver objects
mSolo = new Solo(getInstrumentation(), mActivity);
mDriver = new FennecNativeDriver(mActivity, mSolo, mRootPath);
mActions = new FennecNativeActions(mActivity, mSolo, getInstrumentation(), mAsserter);
Activity tempActivity = getActivity();
mSolo = new Solo(getInstrumentation(), tempActivity);
mDriver = new FennecNativeDriver(tempActivity, mSolo, mRootPath);
mActions = new FennecNativeActions(tempActivity, mSolo, getInstrumentation(), mAsserter);
}
/**

Просмотреть файл

@ -103,7 +103,7 @@ abstract class BaseTest extends BaseRobocopTest {
super.setUp();
mDevice = new Device();
mDatabaseHelper = new DatabaseHelper(mActivity, mAsserter);
mDatabaseHelper = new DatabaseHelper(getActivity(), mAsserter);
// Ensure Robocop tests have access to network, and are run with Display powered on.
throwIfHttpGetFails();
@ -732,7 +732,7 @@ abstract class BaseTest extends BaseRobocopTest {
}
public final void runOnUiThreadSync(Runnable runnable) {
RobocopUtils.runOnUiThreadSync(mActivity, runnable);
RobocopUtils.runOnUiThreadSync(getActivity(), runnable);
}
/* Tap the "star" (bookmark) button to bookmark or un-bookmark the current page */