am c69a8807: Merge change 22109 into eclair
Merge commit 'c69a8807f3aae255c9fe61c4f61bc1ebdd355543' into eclair-plus-aosp * commit 'c69a8807f3aae255c9fe61c4f61bc1ebdd355543': Fix bug 1546445: Correct spelling errors in API
This commit is contained in:
@@ -118540,6 +118540,19 @@
|
|||||||
>
|
>
|
||||||
</constructor>
|
</constructor>
|
||||||
<method name="addTestListener"
|
<method name="addTestListener"
|
||||||
|
return="void"
|
||||||
|
abstract="false"
|
||||||
|
native="false"
|
||||||
|
synchronized="false"
|
||||||
|
static="false"
|
||||||
|
final="false"
|
||||||
|
deprecated="deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
<parameter name="instrumentation" type="android.app.Instrumentation">
|
||||||
|
</parameter>
|
||||||
|
</method>
|
||||||
|
<method name="setInstrumentation"
|
||||||
return="void"
|
return="void"
|
||||||
abstract="false"
|
abstract="false"
|
||||||
native="false"
|
native="false"
|
||||||
@@ -118789,6 +118802,19 @@
|
|||||||
synchronized="false"
|
synchronized="false"
|
||||||
static="false"
|
static="false"
|
||||||
final="false"
|
final="false"
|
||||||
|
deprecated="deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
<parameter name="instrumentation" type="android.app.Instrumentation">
|
||||||
|
</parameter>
|
||||||
|
</method>
|
||||||
|
<method name="injectInstrumentation"
|
||||||
|
return="void"
|
||||||
|
abstract="false"
|
||||||
|
native="false"
|
||||||
|
synchronized="false"
|
||||||
|
static="false"
|
||||||
|
final="false"
|
||||||
deprecated="not deprecated"
|
deprecated="not deprecated"
|
||||||
visibility="public"
|
visibility="public"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -43,10 +43,24 @@ public class InstrumentationTestCase extends TestCase {
|
|||||||
*
|
*
|
||||||
* @param instrumentation the instrumentation to use with this instance
|
* @param instrumentation the instrumentation to use with this instance
|
||||||
*/
|
*/
|
||||||
public void injectInsrumentation(Instrumentation instrumentation) {
|
public void injectInstrumentation(Instrumentation instrumentation) {
|
||||||
mInstrumentation = instrumentation;
|
mInstrumentation = instrumentation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injects instrumentation into this test case. This method is
|
||||||
|
* called by the test runner during test setup.
|
||||||
|
*
|
||||||
|
* @param instrumentation the instrumentation to use with this instance
|
||||||
|
*
|
||||||
|
* @deprecated Incorrect spelling,
|
||||||
|
* use {@link #injectInstrumentation(android.app.Instrumentation) instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void injectInsrumentation(Instrumentation instrumentation) {
|
||||||
|
injectInstrumentation(instrumentation);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inheritors can access the instrumentation using this.
|
* Inheritors can access the instrumentation using this.
|
||||||
* @return instrumentation
|
* @return instrumentation
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class InstrumentationTestSuite extends TestSuite {
|
|||||||
public void runTest(Test test, TestResult result) {
|
public void runTest(Test test, TestResult result) {
|
||||||
|
|
||||||
if (test instanceof InstrumentationTestCase) {
|
if (test instanceof InstrumentationTestCase) {
|
||||||
((InstrumentationTestCase) test).injectInsrumentation(mInstrumentation);
|
((InstrumentationTestCase) test).injectInstrumentation(mInstrumentation);
|
||||||
}
|
}
|
||||||
|
|
||||||
// run the test as usual
|
// run the test as usual
|
||||||
|
|||||||
@@ -180,14 +180,23 @@ public class AndroidTestRunner extends BaseTestRunner {
|
|||||||
private void setInstrumentationIfInstrumentationTestCase(
|
private void setInstrumentationIfInstrumentationTestCase(
|
||||||
Test test, Instrumentation instrumentation) {
|
Test test, Instrumentation instrumentation) {
|
||||||
if (InstrumentationTestCase.class.isAssignableFrom(test.getClass())) {
|
if (InstrumentationTestCase.class.isAssignableFrom(test.getClass())) {
|
||||||
((InstrumentationTestCase) test).injectInsrumentation(instrumentation);
|
((InstrumentationTestCase) test).injectInstrumentation(instrumentation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInstrumentaiton(Instrumentation instrumentation) {
|
public void setInstrumentation(Instrumentation instrumentation) {
|
||||||
mInstrumentation = instrumentation;
|
mInstrumentation = instrumentation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Incorrect spelling,
|
||||||
|
* use {@link #setInstrumentation(android.app.Instrumentation)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void setInstrumentaiton(Instrumentation instrumentation) {
|
||||||
|
setInstrumentation(instrumentation);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Class loadSuiteClass(String suiteClassName) throws ClassNotFoundException {
|
protected Class loadSuiteClass(String suiteClassName) throws ClassNotFoundException {
|
||||||
return mContext.getClassLoader().loadClass(suiteClassName);
|
return mContext.getClassLoader().loadClass(suiteClassName);
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ public class InstrumentationTestRunner extends Instrumentation implements TestSu
|
|||||||
|
|
||||||
mTestRunner = getAndroidTestRunner();
|
mTestRunner = getAndroidTestRunner();
|
||||||
mTestRunner.setContext(getTargetContext());
|
mTestRunner.setContext(getTargetContext());
|
||||||
mTestRunner.setInstrumentaiton(this);
|
mTestRunner.setInstrumentation(this);
|
||||||
mTestRunner.setSkipExecution(logOnly);
|
mTestRunner.setSkipExecution(logOnly);
|
||||||
mTestRunner.setTest(testSuiteBuilder.build());
|
mTestRunner.setTest(testSuiteBuilder.build());
|
||||||
mTestCount = mTestRunner.getTestCases().size();
|
mTestCount = mTestRunner.getTestCases().size();
|
||||||
|
|||||||
Reference in New Issue
Block a user