Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8db0a4f authored by Jack Wang's avatar Jack Wang
Browse files

Fix bug 2056252: android.test.AndroidTestRunnerTest:testRunTestWithNullListener is failing

- Verify mInstrumentation is not null before calling getContext()
parent 0ef135d5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ public class AndroidTestRunner extends BaseTestRunner {
            mTestResult.addListener(testListener);
        }

        Context testContext = mInstrumentation.getContext();
        Context testContext = mInstrumentation == null ? mContext : mInstrumentation.getContext();
        for (TestCase testCase : mTestCases) {
            setContextIfAndroidTestCase(testCase, mContext, testContext);
            setInstrumentationIfInstrumentationTestCase(testCase, mInstrumentation);