Home
last modified time | relevance | path

Searched refs:TestApp (Results 1 – 25 of 67) sorted by relevance

123

/cts/libs/install/src/com/android/cts/install/lib/
DTestApp.java32 public class TestApp { class
39 public static final TestApp A1 = new TestApp("Av1", A, 1, /*isApex*/false,
41 public static final TestApp A2 = new TestApp("Av2", A, 2, /*isApex*/false,
43 public static final TestApp A3 = new TestApp("Av3", A, 3, /*isApex*/false,
45 public static final TestApp ACrashing2 = new TestApp("ACrashingV2", A, 2, /*isApex*/false,
47 public static final TestApp ASplit1 = new TestApp("ASplitV1", A, 1, /*isApex*/false,
49 public static final TestApp ASplit2 = new TestApp("ASplitV2", A, 2, /*isApex*/false,
51 public static final TestApp AIncompleteSplit = new TestApp("AIncompleteSplit", A, 1,
53 public static final TestApp AOriginal1 = new TestApp("AOriginalV1", A, 1, /*isApex*/false,
55 public static final TestApp ARotated2 = new TestApp("ARotatedV2", A, 2, /*isApex*/false,
[all …]
DInstall.java35 private final TestApp[] mTestApps;
50 private Install(boolean isMultiPackage, TestApp... testApps) { in Install()
58 mTestApps = new TestApp[0]; in Install()
65 public static Install single(TestApp testApp) { in single()
72 public static Install multi(TestApp... testApps) { in multi()
203 for (TestApp testApp : mTestApps) { in createSession()
260 private int createSingleInstallSession(TestApp app) throws IOException { in createSingleInstallSession()
/cts/hostsidetests/rollback/app/src/com/android/cts/rollback/host/app/
DHostTestHelper.java37 import com.android.cts.install.lib.TestApp;
62 private static final TestApp Apex2SignedBobRotRollback = new TestApp(
103 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(-1); in testApkOnlyStagedRollback_Phase1_Install()
105 Install.single(TestApp.A1).commit(); in testApkOnlyStagedRollback_Phase1_Install()
106 Install.single(TestApp.A2).setStaged().setEnableRollback().commit(); in testApkOnlyStagedRollback_Phase1_Install()
116 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2); in testApkOnlyStagedRollback_Phase2_RollBack()
117 InstallUtils.processUserData(TestApp.A); in testApkOnlyStagedRollback_Phase2_RollBack()
119 RollbackInfo available = RollbackUtils.getAvailableRollback(TestApp.A); in testApkOnlyStagedRollback_Phase2_RollBack()
122 Rollback.from(TestApp.A2).to(TestApp.A1)); in testApkOnlyStagedRollback_Phase2_RollBack()
123 assertThat(RollbackUtils.getCommittedRollback(TestApp.A)).isNull(); in testApkOnlyStagedRollback_Phase2_RollBack()
[all …]
/cts/tests/rollback/src/com/android/cts/rollback/
DRollbackManagerTest.java32 import com.android.cts.install.lib.TestApp;
65 Uninstall.packages(TestApp.A); in setup()
73 Uninstall.packages(TestApp.A); in teardown()
84 Install.single(TestApp.A1).commit(); in testBasic()
85 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1); in testBasic()
87 () -> getRollbackManager().getAvailableRollbacks(), TestApp.A); in testBasic()
89 () -> getRollbackManager().getRecentlyCommittedRollbacks(), TestApp.A); in testBasic()
91 Install.single(TestApp.A2).setEnableRollback().commit(); in testBasic()
92 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2); in testBasic()
93 InstallUtils.processUserData(TestApp.A); in testBasic()
[all …]
/cts/tests/tests/util/src/android/util/cts/
DInstallUtilTest.java32 import com.android.cts.install.lib.TestApp;
60 Uninstall.packages(TestApp.A, TestApp.B); in teardown()
75 Uninstall.packages(TestApp.A, TestApp.B); in setup()
81 private void assertSameResource(TestApp a, TestApp b) throws Exception { in assertSameResource()
99 Install.multi(TestApp.A1, TestApp.B2).commit(); in testNativeFilePathTestApp()
101 TestApp a1 = new TestApp(TestApp.A1.toString(), TestApp.A1.getPackageName(), in testNativeFilePathTestApp()
102 TestApp.A1.getVersionCode(), false, in testNativeFilePathTestApp()
103 new File(InstallUtils.getPackageInfo(TestApp.A).applicationInfo.sourceDir)); in testNativeFilePathTestApp()
104 TestApp b2 = new TestApp(TestApp.B2.toString(), TestApp.B2.getPackageName(), in testNativeFilePathTestApp()
105 TestApp.B2.getVersionCode(), false, in testNativeFilePathTestApp()
[all …]
/cts/tests/tests/packageinstaller/atomicinstall/src/com/android/tests/atomicinstall/
DAtomicInstallTest.java36 import com.android.cts.install.lib.TestApp;
63 private static final TestApp CORRUPT_TESTAPP = new TestApp(
78 Uninstall.packages(TestApp.A, TestApp.B, TestApp.C); in setup()
119 int sessionId = Install.single(TestApp.A1).commit(); in testSessionCleanUp_Single()
120 assertThat(getInstalledVersion(TestApp.A)).isEqualTo(1); in testSessionCleanUp_Single()
133 int sessionId = Install.multi(TestApp.A1, TestApp.B1).commit(); in testSessionCleanUp_Multi()
134 assertThat(getInstalledVersion(TestApp.A)).isEqualTo(1); in testSessionCleanUp_Multi()
135 assertThat(getInstalledVersion(TestApp.B)).isEqualTo(1); in testSessionCleanUp_Multi()
145 Install.multi(TestApp.A1, TestApp.B1).commit(); in testInstallTwoApks()
146 assertThat(getInstalledVersion(TestApp.A)).isEqualTo(1); in testInstallTwoApks()
[all …]
DSessionAbandonBehaviorTest.java42 import com.android.cts.install.lib.TestApp;
261 Uninstall.packages(TestApp.A, TestApp.B); in setUp()
267 final int sessionId = Install.single(TestApp.A1).setStaged().createSession(); in abandon_stagedSession_shouldReceiveAbandonCallBack()
281 final int sessionId = Install.single(TestApp.A1).createSession(); in abandon_nonStagedSession_shouldReceiveAbandonCallBack()
296 final int sessionId = Install.single(TestApp.A1).setStaged().createSession(); in abandon_stagedSession_openedSession_canNotGetNames()
313 final int sessionId = Install.single(TestApp.A1).createSession(); in abandon_nonStagedSession_openedSession_canNotGetNames()
330 final int sessionId = Install.single(TestApp.A1).setStaged().createSession(); in abandon_stagedSession_openForWriting_shouldFail()
348 final int sessiondId = Install.single(TestApp.A1).createSession(); in abandon_nonStagedSession_openForWriting_shouldFail()
366 final int sessionId = Install.single(TestApp.A1).setStaged().createSession(); in abandon_stagedSession_canNotOpenAgain()
382 final int sessionId = Install.single(TestApp.A1).createSession(); in abandon_nonStagedSession_canNotOpenAgain()
[all …]
/cts/hostsidetests/install/app/src/android/cts/install/
DInstallRule.java32 import com.android.cts.install.lib.TestApp;
55 private static final Table<String, Integer, TestApp> sTestAppMap = getTestAppTable();
91 Uninstall.packages(TestApp.A, TestApp.B); in cleanUp()
95 List<TestApp> getTestApps(INSTALL_TYPE installType, int versionCode) { in getTestApps()
131 return Arrays.asList(TestApp.A); in getTestPackageNames()
135 return Arrays.asList(TestApp.A, TestApp.B); in getTestPackageNames()
137 return Arrays.asList(TestApp.A, SHIM_APEX_PACKAGE_NAME); in getTestPackageNames()
143 private static TestApp getTestApp(String packageName, int version) { in getTestApp()
150 private static Table<String, Integer, TestApp> getTestAppTable() { in getTestAppTable()
151 Table<String, Integer, TestApp> testAppMap = HashBasedTable.create(); in getTestAppTable()
[all …]
/cts/hostsidetests/stagedinstall/app/src/com/android/tests/stagedinstall/
DStagedInstallTest.java52 import com.android.cts.install.lib.TestApp;
116 private static final TestApp TESTAPP_SAME_NAME_AS_APEX = new TestApp(
119 private static final TestApp Apex2DifferentCertificate = new TestApp(
122 private static final TestApp Apex2DifferentPackageName = new TestApp(
125 private static final TestApp Apex2SignedBob = new TestApp(
128 private static final TestApp Apex2SignedBobRot = new TestApp(
131 private static final TestApp Apex2SignedBobRotRollback = new TestApp(
134 private static final TestApp ApexNoHashtree2 = new TestApp(
137 private static final TestApp ApexWrongSha2 = new TestApp(
140 private static final TestApp Apex2WithoutApkInApex = new TestApp(
[all …]
DApexShimValidationTest.java33 import com.android.cts.install.lib.TestApp;
111 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWithAdditionalFile_rebootless()
123 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWithAdditionalFolder_rebootless()
135 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWithPostInstallHook_rebootless()
147 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWithPreInstallHook_rebootless()
159 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWrongSHA_rebootless()
167 TestApp apexTestApp = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in stageApex()
/cts/common/device-side/bedstead/testapp/src/test/java/com/android/bedstead/testapp/
DTestAppTest.java62 TestApp testApp = mTestAppProvider.any(); in reference_returnsNeneReference()
69 TestApp testApp = mTestAppProvider.any(); in install_noUserSpecified_installsInInstrumentedUser()
82 TestApp testApp = mTestAppProvider.any(); in install_userReference_installs()
95 TestApp testApp = mTestAppProvider.any(); in install_userReference_returnsReferenceToInstance()
109 TestApp testApp = mTestAppProvider.any(); in install_userHandle_installs()
122 TestApp testApp = mTestAppProvider.any(); in install_userHandle_returnsReferenceToInstance()
136 TestApp testApp = mTestAppProvider.any(); in install_nullUserReference_throwsException()
143 TestApp testApp = mTestAppProvider.any(); in install_nullUserHandle_throwsException()
150 TestApp testApp = mTestAppProvider.any(); in instance_userHandle_instanceIsNotInstalled_stillReturnsInstance()
160 TestApp testApp = mTestAppProvider.any(); in instance_userReference_instanceIsNotInstalled_stillReturnsInstance()
[all …]
DTestAppProviderTest.java131 TestApp firstResult = mTestAppProvider.query() in query_byFeature_returnsDifferentTestAppsForSameQuery()
134 TestApp secondResult = mTestAppProvider.query() in query_byFeature_returnsDifferentTestAppsForSameQuery()
143 TestApp testApp = mTestAppProvider.query() in query_testOnly_returnsMatching()
152 TestApp testApp = mTestAppProvider.query() in query_notTestOnly_returnsMatching()
161 TestApp testApp = mTestAppProvider.query() in query_minSdkVersion_returnsMatching()
170 TestApp testApp = mTestAppProvider.query() in query_targetSdkVersion_returnsMatching()
179 TestApp testApp = mTestAppProvider.query() in query_withPermission_returnsMatching()
188 TestApp testApp = mTestAppProvider.query() in query_withoutPermission_returnsMatching()
197 TestApp testApp = mTestAppProvider.query() in query_metadata_returnsMatching()
206 TestApp testApp = mTestAppProvider.query() in query_withExistingActivity_returnsMatching()
[all …]
/cts/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/
DBypassDatabaseOperationsTest.java48 import com.android.cts.install.lib.TestApp;
67 private static final TestApp APP_SYSTEM_GALLERY_DEFAULT = new TestApp("TestAppA",
72 private static final TestApp APP_SYSTEM_GALLERY_BYPASS_DB = new TestApp(
77 private static final TestApp APP_SYSTEM_GALLERY_30 = new TestApp("TestAppC",
82 private static final TestApp APP_SYSTEM_GALLERY_30_BYPASS_DB = new TestApp(
88 private static final TestApp APP_FM_DEFAULT = new TestApp(
93 private static final TestApp APP_FM_BYPASS_DATABASE_OPS = new TestApp(
97 private static final TestApp APP_FM_TARGETS_30 = new TestApp("TestAppC",
263 private void testAppDoesntBypassDatabaseOps(TestApp app) throws Exception { in testAppDoesntBypassDatabaseOps()
289 private void testAppBypassesDatabaseOps(TestApp app) throws Exception { in testAppBypassesDatabaseOps()
/cts/tests/tests/content/pm/SecureFrp/src/com/android/tests/securefrpinstall/
DSecureFrpInstallTest.java28 import com.android.cts.install.lib.TestApp;
67 sPackageManager.getPackageInfo(TestApp.A, 0); in assertInstalled()
72 sPackageManager.getPackageInfo(TestApp.A, 0); in assertNotInstalled()
89 Uninstall.packages(TestApp.A); in setup()
104 Install.single(TestApp.A1).commit(); in testPackageInstallApi()
116 Install.single(TestApp.A1).commit(); in testPackageInstallApiAsShell()
/cts/tests/tests/permission2/src/android/permission2/cts/
DRestrictedStoragePermissionSharedUidTest.java74 private static class TestApp { class in RestrictedStoragePermissionSharedUidTest
87 TestApp(@NonNull String apk, @NonNull String pkg, boolean isRestricted, in TestApp() method in RestrictedStoragePermissionSharedUidTest.TestApp
152 private static class NoApp extends TestApp {
184 private static final TestApp[] TEST_APPS = new TestApp[]{
185 new TestApp(APK_PATH + "CtsLegacyStorageNotIsolatedWithSharedUid.apk",
187 new TestApp(APK_PATH + "CtsLegacyStorageIsolatedWithSharedUid.apk",
189 new TestApp(APK_PATH + "CtsLegacyStorageRestrictedWithSharedUid.apk",
191 new TestApp(APK_PATH + "CtsLegacyStorageRestrictedSdk28WithSharedUid.apk",
200 public @NonNull TestApp app1;
207 public @NonNull TestApp app2;
/cts/libs/rollback/src/com/android/cts/rollback/lib/
DRollback.java22 import com.android.cts.install.lib.TestApp;
37 private Rollback(TestApp from) { in Rollback()
49 public static Rollback from(TestApp app) { in from()
65 public Rollback to(TestApp app) { in to()
DRollbackInfoSubject.java23 import com.android.cts.install.lib.TestApp;
102 public void causePackagesContainsExactly(TestApp... causes) { in causePackagesContainsExactly()
104 for (TestApp cause : causes) { in causePackagesContainsExactly()
/cts/common/device-side/bedstead/remotedpc/src/main/java/com/android/bedstead/remotedpc/
DRemoteDelegate.java24 import com.android.bedstead.testapp.TestApp;
33 public static final TestApp sTestApp = sTestAppProvider.query()
37 public RemoteDelegate(TestApp testApp, UserReference user) { in RemoteDelegate()
DRemotePolicyManager.java24 import com.android.bedstead.testapp.TestApp;
30 RemotePolicyManager(TestApp testApp, UserReference user) { in RemotePolicyManager()
/cts/hostsidetests/rollback/app2/src/com/android/cts/rollback/host/app2/
DHostTestHelper.java27 import com.android.cts.install.lib.TestApp;
65 RollbackInfo rollbackA = RollbackUtils.waitForAvailableRollback(TestApp.A); in testApkRollbackByAnotherInstaller_Phase2_SecondInstaller()
66 assertThat(rollbackA).packagesContainsExactly(Rollback.from(TestApp.A2).to(TestApp.A1)); in testApkRollbackByAnotherInstaller_Phase2_SecondInstaller()
/cts/tests/tests/security/src/android/security/cts/
DPackageInstallerTest.java26 import com.android.cts.install.lib.TestApp;
44 private static final TestApp TEST_APP = new TestApp(
61 Uninstall.packages(TestApp.A); in tearDown()
/cts/common/device-side/bedstead/testapp/src/library/main/java/com/android/bedstead/testapp/
DTestApp.java44 public final class TestApp { class
49 TestApp(TestAppDetails details) { in TestApp() method in TestApp
224 if (!(o instanceof TestApp)) return false; in equals()
225 TestApp testApp = (TestApp) o; in equals()
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/
DTestUtils.java64 import com.android.cts.install.lib.TestApp;
245 public static ArrayList<String> listAs(TestApp testApp, String dirPath) throws Exception { in listAs()
253 public static boolean canReadAndWriteAs(TestApp testApp, String path) throws Exception { in canReadAndWriteAs()
262 TestApp testApp, String filePath) throws Exception { in readExifMetadataFromTestApp()
273 public static boolean createFileAs(TestApp testApp, String path) throws Exception { in createFileAs()
284 public static boolean createImageEntryAs(TestApp testApp, String path) throws Exception { in createImageEntryAs()
293 public static boolean deleteFileAs(TestApp testApp, String path) throws Exception { in deleteFileAs()
300 public static boolean deleteFileAsNoThrow(TestApp testApp, String path) { in deleteFileAsNoThrow()
316 public static boolean canOpenFileAs(TestApp testApp, File file, boolean forWrite) in canOpenFileAs()
331 public static boolean renameFileAs(TestApp testApp, File src, File dst) throws Exception { in renameFileAs()
[all …]
/cts/common/device-side/bedstead/remotedpc/
DAndroid.bp13 "TestApp",
31 "TestApp",
/cts/hostsidetests/os/test-apps/StaticSharedLibTestApp/src/android/os/lib/app/
DStaticSharedLibsTests.java32 import com.android.cts.install.lib.TestApp;
49 private static final TestApp TESTAPP_STATIC_LIB_PROVIDER5 = new TestApp(

123