Merge change 21589 into eclair
* changes: Fix bug 2056252: android.test.AndroidTestRunnerTest:testRunTestWithNullListener is failing - Verify mInstrumentation is not null before calling getContext()
This commit is contained in:
@@ -158,7 +158,7 @@ public class AndroidTestRunner extends BaseTestRunner {
|
|||||||
mTestResult.addListener(testListener);
|
mTestResult.addListener(testListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
Context testContext = mInstrumentation.getContext();
|
Context testContext = mInstrumentation == null ? mContext : mInstrumentation.getContext();
|
||||||
for (TestCase testCase : mTestCases) {
|
for (TestCase testCase : mTestCases) {
|
||||||
setContextIfAndroidTestCase(testCase, mContext, testContext);
|
setContextIfAndroidTestCase(testCase, mContext, testContext);
|
||||||
setInstrumentationIfInstrumentationTestCase(testCase, mInstrumentation);
|
setInstrumentationIfInstrumentationTestCase(testCase, mInstrumentation);
|
||||||
|
|||||||
Reference in New Issue
Block a user