/cts/common/device-side/bedstead/testapp/src/test/java/com/android/bedstead/testapp/ |
D | TestAppTest.java | 46 private static final UserReference sUser = TestApis.users().instrumented(); field in TestAppTest 47 private static final UserHandle sUserHandle = sUser.userHandle(); 66 assertThat(testApp.pkg().installedOnUser(sUser)).isTrue(); in install_noUserSpecified_installsInInstrumentedUser() 68 testApp.uninstall(sUser); in install_noUserSpecified_installsInInstrumentedUser() 76 testApp.install(sUser); in install_userReference_installs() 79 assertThat(testApp.pkg().installedOnUser(sUser)).isTrue(); in install_userReference_installs() 81 testApp.uninstall(sUser); in install_userReference_installs() 90 TestAppInstance testAppInstance = testApp.install(sUser); in install_userReference_returnsReferenceToInstance() 93 assertThat(testAppInstance.user()).isEqualTo(sUser); in install_userReference_returnsReferenceToInstance() 95 testApp.uninstall(sUser); in install_userReference_returnsReferenceToInstance() [all …]
|
D | TestAppActivityReferenceTest.java | 38 private static final UserReference sUser = TestApis.users().instrumented(); field in TestAppActivityReferenceTest 49 try (TestAppInstance testAppInstance = testApp.install(sUser)) { in start_activityIsStarted() 60 try (TestAppInstance testAppInstance = testApp.install(sUser)) { in remote_executes()
|
D | TestAppInstanceTest.java | 68 private static final UserReference sUser = TestApis.users().instrumented(); field in TestAppInstanceTest 85 TestAppInstance testAppInstance = sTestApp.instance(sUser); in user_returnsUserReference() 87 assertThat(testAppInstance.user()).isEqualTo(sUser); in user_returnsUserReference() 92 TestAppInstance testAppInstance = sTestApp.instance(sUser); in testApp_returnsTestApp() 111 .installedOnUser(sUser)).isFalse(); in uninstall_uninstalls() 121 .installedOnUser(sUser)).isFalse(); in autoclose_uninstalls() 126 TestAppInstance testAppInstance = sTestApp.instance(sUser); in keepAlive_notInstalled_throwsException() 139 Poll.forValue("running process", () -> sTestApp.pkg().runningProcess(sUser)) in killProcess_keepAlive_processIsRunningAgain() 228 assertThat(sTestApp.pkg().runningProcess(sUser)).isNotNull(); in registerReceiver_processIsRunning() 289 assertThat(sTestApp.pkg().runningProcess(sUser)).isNotNull(); in keepAlive_processIsRunning() [all …]
|
D | TestAppActivitiesTest.java | 42 private static final UserReference sUser = TestApis.users().instrumented(); field in TestAppActivitiesTest 58 sTestAppInstance = sTestApp.install(sUser); in setup() 109 TestAppInstance testAppInstance2 = sTestApp.instance(sUser); in query_matchesActivityPreviouslyReturnedByDifferentInstance_returnsActivity()
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | DelegationScopesTest.java | 78 private static final UserReference sUser = TestApis.users().instrumented(); field in DelegationScopesTest 85 try (TestAppInstance testApp = sTestApp.install(sUser)) { in getDelegatedScopes_returnsFromSetDelegatedScopes() 104 try (TestAppInstance testApp = sTestApp.install(sUser)) { in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes() 122 try (TestAppInstance testApp = sTestApp.install(sUser)) { in getDelegatedScopes_fromApp_passComponentName_throwsException() 140 try (TestAppInstance testApp = sTestApp.install(sUser); in getDelegatedScopes_fromApp_differentPackage_throwsException() 141 TestAppInstance testApp2 = sTestApp2.install(sUser)) { in getDelegatedScopes_fromApp_differentPackage_throwsException() 164 try (TestAppInstance testApp = sTestApp.install(sUser)) { in setDelegatedScopes_invalidAdmin_throwsSecurityException() 175 try (TestAppInstance testApp = sTestApp.install(sUser)) { in getDelegatedScopes_invalidAdmin_throwsSecurityException() 184 try (TestAppInstance testApp = sTestApp.install(sUser)) { in getDelegatedScopes_returnsLatestFromSetDelegatedScopes() 225 try (TestAppInstance testApp = sTestApp.install(sUser)) { in getDelegatePackages_oneApp_twoScopes_returnsFromSetDelegatedScopes() [all …]
|
/cts/common/device-side/bedstead/remotedpc/src/test/java/com/android/bedstead/remotedpc/ |
D | RemoteDpcTest.java | 71 private static final UserReference sUser = TestApis.users().instrumented(); field in RemoteDpcTest 127 TestApis.devicePolicy().setProfileOwner(sUser, NON_REMOTE_DPC_COMPONENT); in profileOwner_nonRemoteDpcProfileOwner_returnsNull() 152 .parent(sUser) in profileOwner_userHandle_noProfileOwner_returnsNull() 169 .parent(sUser) in profileOwner_userHandle_nonRemoteDpcProfileOwner_returnsNull() 189 .parent(sUser) in profileOwner_userHandle_remoteDpcProfileOwner_returnsInstance() 212 .parent(sUser) in profileOwner_userReference_noProfileOwner_returnsNull() 228 .parent(sUser) in profileOwner_userReference_nonRemoteDpcProfileOwner_returnsNull() 248 .parent(sUser) in profileOwner_userReference_remoteDpcProfileOwner_returnsInstance() 270 ProfileOwner profileOwner = TestApis.devicePolicy().setProfileOwner(sUser, in any_noDeviceOwner_nonRemoteDpcProfileOwner_returnsNull() 318 assertThat(RemoteDpc.any(sUser.userHandle())).isNull(); in any_userHandle_noDeviceOwner_noProfileOwner_returnsNull() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/devicepolicy/ |
D | DevicePolicyTest.java | 73 private static final UserReference sUser = TestApis.users().instrumented(); field in DevicePolicyTest 87 if (!sUser.equals(TestApis.users().system())) { in setupClass() 103 .parent(sUser) in setProfileOwner_profileOwnerIsSet() 124 .parent(sUser) in setProfileOwner_profileOwnerIsAlreadySet_throwsException() 144 .parent(sUser) in setProfileOwner_componentNameNotInstalled_throwsException() 161 () -> TestApis.devicePolicy().setProfileOwner(sUser, NOT_DPC_COMPONENT_NAME)); in setProfileOwner_componentNameIsNotDPC_throwsException() 179 sUser, /* profileOwnerComponent= */ null)); in setProfileOwner_nullComponentName_throwsException() 196 .parent(sUser) in getProfileOwner_returnsProfileOwner() 216 .parent(sUser) in getProfileOwner_noProfileOwner_returnsNull() 266 sTestApp.install(sUser); in setDeviceOwner_componentNameNotInstalled_throwsException() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/ |
D | PackageTest.java | 58 private static final UserReference sUser = TestApis.users().instrumented(); field in PackageTest 192 pkg.uninstall(sUser); in uninstall_packageDoesNotExist_doesNotThrowException() 198 TestApis.packages().find(sContext.getPackageName()).grantPermission(sUser, in grantPermission_installPermission_throwsException() 205 TestApis.packages().find(sContext.getPackageName()).grantPermission(sUser, in grantPermission_nonDeclaredPermission_throwsException() 237 TestApis.packages().find(NON_EXISTING_PACKAGE_NAME).grantPermission(sUser, in grantPermission_packageDoesNotExist_throwsException() 244 TestApis.packages().find(sContext.getPackageName()).grantPermission(sUser, in grantPermission_permissionDoesNotExist_throwsException() 261 pkg.denyPermission(sUser, USER_SPECIFIC_PERMISSION); in denyPermission_ownPackage_permissionIsNotGranted_doesNotThrowException() 267 pkg.grantPermission(sUser, USER_SPECIFIC_PERMISSION); in denyPermission_ownPackage_permissionIsGranted_throwsException() 270 pkg.denyPermission(sUser, USER_SPECIFIC_PERMISSION)); in denyPermission_ownPackage_permissionIsGranted_throwsException() 321 TestApis.packages().install(sUser, sTestAppApkFile); in installedOnUsers_includesUserWithPackageInstalled() [all …]
|
/cts/common/device-side/bedstead/eventlib/src/test/java/com/android/eventlib/premade/ |
D | EventLibDeviceAdminReceiverTest.java | 80 private static final UserReference sUser = TestApis.users().instrumented(); field in EventLibDeviceAdminReceiverTest 120 TestApis.devicePolicy().setProfileOwner(sUser, DEVICE_ADMIN_COMPONENT); in enableProfileOwner_logsEnabledEvent() 169 receiver.onPasswordChanged(sContext, sIntent, sUser.userHandle()); in changePasswordWithUserHandle_logsPasswordChangedEvent() 175 assertThat(event.userHandle()).isEqualTo(sUser.userHandle()); in changePasswordWithUserHandle_logsPasswordChangedEvent() 193 receiver.onPasswordFailed(sContext, sIntent, sUser.userHandle()); in failPasswordWithUserHandle_logsPasswordFailedEvent() 199 assertThat(event.userHandle()).isEqualTo(sUser.userHandle()); in failPasswordWithUserHandle_logsPasswordFailedEvent() 217 receiver.onPasswordSucceeded(sContext, sIntent, sUser.userHandle()); in succeedPasswordWithUserHandle_logsPasswordSucceededEvent() 223 assertThat(event.userHandle()).isEqualTo(sUser.userHandle()); in succeedPasswordWithUserHandle_logsPasswordSucceededEvent() 241 receiver.onPasswordExpiring(sContext, sIntent, sUser.userHandle()); in passwordExpiringWithUserHandle_logsPasswordExpiringEvent() 247 assertThat(event.user()).isEqualTo(sUser.userHandle()); in passwordExpiringWithUserHandle_logsPasswordExpiringEvent() [all …]
|
/cts/common/device-side/bedstead/modules/permissions/src/main/kotlin/com/android/bedstead/permissions/ |
D | Permissions.java | 66 private static final UserReference sUser = TestApis.users().instrumented(); field in Permissions 485 + sUser 643 sAppOpsManager.setMode(appOp, pkg.uid(sUser), 647 sAppOpsManager.setMode(appOp, pkg.uid(sUser), 717 if (!sInstrumentedPackage.hasPermission(sUser, permission)) {
|