Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 1 | // Signature format: 2.0 |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 2 | package android.test { |
| 3 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 4 | @Deprecated public class AndroidTestCase extends junit.framework.TestCase { |
| 5 | ctor @Deprecated public AndroidTestCase(); |
| 6 | method @Deprecated public void assertActivityRequiresPermission(String, String, String); |
| 7 | method @Deprecated public void assertReadingContentUriRequiresPermission(android.net.Uri, String); |
| 8 | method @Deprecated public void assertWritingContentUriRequiresPermission(android.net.Uri, String); |
| 9 | method @Deprecated public android.content.Context getContext(); |
Jiyong Park | 04f520d | 2020-06-01 10:56:48 +0900 | [diff] [blame] | 10 | method @Deprecated public android.content.Context getTestContext(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 11 | method @Deprecated protected void scrubClass(Class<?>) throws java.lang.IllegalAccessException; |
| 12 | method @Deprecated public void setContext(android.content.Context); |
Jiyong Park | 04f520d | 2020-06-01 10:56:48 +0900 | [diff] [blame] | 13 | method @Deprecated public void setTestContext(android.content.Context); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 14 | method @Deprecated @android.test.suitebuilder.annotation.Suppress public void testAndroidTestCaseSetupProperly(); |
| 15 | field @Deprecated protected android.content.Context mContext; |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 16 | } |
| 17 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 18 | @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface FlakyTest { |
| 19 | method @Deprecated public abstract int tolerance() default 1; |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 20 | } |
| 21 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 22 | @Deprecated public class InstrumentationTestCase extends junit.framework.TestCase { |
| 23 | ctor @Deprecated public InstrumentationTestCase(); |
| 24 | method @Deprecated public android.app.Instrumentation getInstrumentation(); |
| 25 | method @Deprecated public void injectInsrumentation(android.app.Instrumentation); |
| 26 | method @Deprecated public void injectInstrumentation(android.app.Instrumentation); |
| 27 | method @Deprecated public final <T extends android.app.Activity> T launchActivity(String, Class<T>, android.os.Bundle); |
| 28 | method @Deprecated public final <T extends android.app.Activity> T launchActivityWithIntent(String, Class<T>, android.content.Intent); |
| 29 | method @Deprecated public void runTestOnUiThread(Runnable) throws java.lang.Throwable; |
| 30 | method @Deprecated public void sendKeys(String); |
| 31 | method @Deprecated public void sendKeys(int...); |
| 32 | method @Deprecated public void sendRepeatedKeys(int...); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 33 | } |
| 34 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 35 | @Deprecated public class InstrumentationTestSuite extends junit.framework.TestSuite { |
| 36 | ctor @Deprecated public InstrumentationTestSuite(android.app.Instrumentation); |
| 37 | ctor @Deprecated public InstrumentationTestSuite(String, android.app.Instrumentation); |
| 38 | ctor @Deprecated public InstrumentationTestSuite(Class, android.app.Instrumentation); |
| 39 | method @Deprecated public void addTestSuite(Class); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 40 | } |
| 41 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 42 | @Deprecated public interface PerformanceTestCase { |
| 43 | method @Deprecated public boolean isPerformanceOnly(); |
| 44 | method @Deprecated public int startPerformance(android.test.PerformanceTestCase.Intermediates); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 45 | } |
| 46 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 47 | @Deprecated public static interface PerformanceTestCase.Intermediates { |
| 48 | method @Deprecated public void addIntermediate(String); |
| 49 | method @Deprecated public void addIntermediate(String, long); |
| 50 | method @Deprecated public void finishTiming(boolean); |
| 51 | method @Deprecated public void setInternalIterations(int); |
| 52 | method @Deprecated public void startTiming(boolean); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 53 | } |
| 54 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 55 | @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface RepetitiveTest { |
| 56 | method @Deprecated public abstract int numIterations() default 1; |
Sundong Ahn | 8b444f6 | 2019-01-16 12:19:20 +0900 | [diff] [blame] | 57 | } |
| 58 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 59 | @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface UiThreadTest { |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | } |
| 63 | |
| 64 | package android.test.suitebuilder.annotation { |
| 65 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 66 | @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface LargeTest { |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 67 | } |
| 68 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 69 | @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface MediumTest { |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 70 | } |
| 71 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 72 | @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface SmallTest { |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 73 | } |
| 74 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 75 | @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface Smoke { |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 76 | } |
| 77 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 78 | @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface Suppress { |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | } |
| 82 | |
| 83 | package com.android.internal.util { |
| 84 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 85 | @Deprecated public interface Predicate<T> { |
| 86 | method @Deprecated public boolean apply(T); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | } |
| 90 | |
| 91 | package junit.framework { |
| 92 | |
| 93 | public class Assert { |
| 94 | ctor protected Assert(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 95 | method public static void assertEquals(String, Object, Object); |
| 96 | method public static void assertEquals(Object, Object); |
| 97 | method public static void assertEquals(String, String, String); |
| 98 | method public static void assertEquals(String, String); |
| 99 | method public static void assertEquals(String, double, double, double); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 100 | method public static void assertEquals(double, double, double); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 101 | method public static void assertEquals(String, float, float, float); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 102 | method public static void assertEquals(float, float, float); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 103 | method public static void assertEquals(String, long, long); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 104 | method public static void assertEquals(long, long); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 105 | method public static void assertEquals(String, boolean, boolean); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 106 | method public static void assertEquals(boolean, boolean); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 107 | method public static void assertEquals(String, byte, byte); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 108 | method public static void assertEquals(byte, byte); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 109 | method public static void assertEquals(String, char, char); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 110 | method public static void assertEquals(char, char); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 111 | method public static void assertEquals(String, short, short); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 112 | method public static void assertEquals(short, short); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 113 | method public static void assertEquals(String, int, int); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 114 | method public static void assertEquals(int, int); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 115 | method public static void assertFalse(String, boolean); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 116 | method public static void assertFalse(boolean); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 117 | method public static void assertNotNull(Object); |
| 118 | method public static void assertNotNull(String, Object); |
| 119 | method public static void assertNotSame(String, Object, Object); |
| 120 | method public static void assertNotSame(Object, Object); |
| 121 | method public static void assertNull(Object); |
| 122 | method public static void assertNull(String, Object); |
| 123 | method public static void assertSame(String, Object, Object); |
| 124 | method public static void assertSame(Object, Object); |
| 125 | method public static void assertTrue(String, boolean); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 126 | method public static void assertTrue(boolean); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 127 | method public static void fail(String); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 128 | method public static void fail(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 129 | method public static void failNotEquals(String, Object, Object); |
| 130 | method public static void failNotSame(String, Object, Object); |
| 131 | method public static void failSame(String); |
| 132 | method public static String format(String, Object, Object); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | public class AssertionFailedError extends java.lang.AssertionError { |
| 136 | ctor public AssertionFailedError(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 137 | ctor public AssertionFailedError(String); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 138 | } |
| 139 | |
| 140 | public class ComparisonFailure extends junit.framework.AssertionFailedError { |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 141 | ctor public ComparisonFailure(String, String, String); |
| 142 | method public String getActual(); |
| 143 | method public String getExpected(); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 144 | } |
| 145 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 146 | public interface Protectable { |
| 147 | method public void protect() throws java.lang.Throwable; |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 148 | } |
| 149 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 150 | public interface Test { |
| 151 | method public int countTestCases(); |
| 152 | method public void run(junit.framework.TestResult); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 153 | } |
| 154 | |
| 155 | public abstract class TestCase extends junit.framework.Assert implements junit.framework.Test { |
| 156 | ctor public TestCase(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 157 | ctor public TestCase(String); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 158 | method public int countTestCases(); |
| 159 | method protected junit.framework.TestResult createResult(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 160 | method public String getName(); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 161 | method public junit.framework.TestResult run(); |
| 162 | method public void run(junit.framework.TestResult); |
| 163 | method public void runBare() throws java.lang.Throwable; |
| 164 | method protected void runTest() throws java.lang.Throwable; |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 165 | method public void setName(String); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 166 | method protected void setUp() throws java.lang.Exception; |
| 167 | method protected void tearDown() throws java.lang.Exception; |
| 168 | } |
| 169 | |
| 170 | public class TestFailure { |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 171 | ctor public TestFailure(junit.framework.Test, Throwable); |
| 172 | method public String exceptionMessage(); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 173 | method public junit.framework.Test failedTest(); |
| 174 | method public boolean isFailure(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 175 | method public Throwable thrownException(); |
| 176 | method public String trace(); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 177 | field protected junit.framework.Test fFailedTest; |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 178 | field protected Throwable fThrownException; |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 179 | } |
| 180 | |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 181 | public interface TestListener { |
| 182 | method public void addError(junit.framework.Test, Throwable); |
| 183 | method public void addFailure(junit.framework.Test, junit.framework.AssertionFailedError); |
| 184 | method public void endTest(junit.framework.Test); |
| 185 | method public void startTest(junit.framework.Test); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 186 | } |
| 187 | |
| 188 | public class TestResult { |
| 189 | ctor public TestResult(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 190 | method public void addError(junit.framework.Test, Throwable); |
| 191 | method public void addFailure(junit.framework.Test, junit.framework.AssertionFailedError); |
| 192 | method public void addListener(junit.framework.TestListener); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 193 | method public void endTest(junit.framework.Test); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 194 | method public int errorCount(); |
| 195 | method public java.util.Enumeration<junit.framework.TestFailure> errors(); |
| 196 | method public int failureCount(); |
| 197 | method public java.util.Enumeration<junit.framework.TestFailure> failures(); |
| 198 | method public void removeListener(junit.framework.TestListener); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 199 | method protected void run(junit.framework.TestCase); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 200 | method public int runCount(); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 201 | method public void runProtected(junit.framework.Test, junit.framework.Protectable); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 202 | method public boolean shouldStop(); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 203 | method public void startTest(junit.framework.Test); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 204 | method public void stop(); |
| 205 | method public boolean wasSuccessful(); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 206 | field protected java.util.Vector<junit.framework.TestFailure> fErrors; |
| 207 | field protected java.util.Vector<junit.framework.TestFailure> fFailures; |
| 208 | field protected java.util.Vector<junit.framework.TestListener> fListeners; |
| 209 | field protected int fRunTests; |
| 210 | } |
| 211 | |
| 212 | public class TestSuite implements junit.framework.Test { |
| 213 | ctor public TestSuite(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 214 | ctor public TestSuite(Class<?>); |
| 215 | ctor public TestSuite(Class<? extends junit.framework.TestCase>, String); |
| 216 | ctor public TestSuite(String); |
| 217 | ctor public TestSuite(Class<?>...); |
| 218 | ctor public TestSuite(Class<? extends junit.framework.TestCase>[], String); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 219 | method public void addTest(junit.framework.Test); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 220 | method public void addTestSuite(Class<? extends junit.framework.TestCase>); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 221 | method public int countTestCases(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 222 | method public static junit.framework.Test createTest(Class<?>, String); |
| 223 | method public String getName(); |
| 224 | method public static java.lang.reflect.Constructor<?> getTestConstructor(Class<?>) throws java.lang.NoSuchMethodException; |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 225 | method public void run(junit.framework.TestResult); |
| 226 | method public void runTest(junit.framework.Test, junit.framework.TestResult); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 227 | method public void setName(String); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 228 | method public junit.framework.Test testAt(int); |
| 229 | method public int testCount(); |
| 230 | method public java.util.Enumeration<junit.framework.Test> tests(); |
Tor Norbye | 8752ded | 2018-12-26 19:55:07 -0800 | [diff] [blame] | 231 | method public static junit.framework.Test warning(String); |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 232 | } |
| 233 | |
| 234 | } |
| 235 | |