Home
last modified time | relevance | path

Searched refs:Poll (Results 1 – 25 of 62) sorted by relevance

123

/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/utils/
DPollTest.java51 assertThat(Poll.forValue("tester value", valueTester::get) in await_toBeEqualTo_alreadyEqual_returns()
60 assertThat(Poll.forValue("tester value", valueTester::get) in await_toBeEqualTo_becomesEqual_returns()
69 assertThat(Poll.forValue("tester value", valueTester::get) in await_toBeEqualTo_doesNotBecomeEqual_returnIncorrectValue()
80 Poll.forValue("tester value", valueTester::get) in await_toBeEqualTo_errorOnFailure_doesNotBecomeEqual_throwsException()
94 Poll.forValue("tester value", valueTester::get) in await_toBeEqualTo_errorOnFailure_doesNotBecomeEqual_customError_throwsException()
107 assertThat(Poll.forValue("tester value", valueTester::get) in await_toNotBeEqualTo_alreadyNotEqual_returns()
116 assertThat(Poll.forValue("tester value", valueTester::get) in await_toNotBeEqualTo_becomesNotEqual_returns()
125 assertThat(Poll.forValue("tester value", valueTester::get) in await_toNotBeEqualTo_doesNotBecomeNotEqual_returnIncorrectValue()
136 Poll.forValue("tester value", valueTester::get) in await_toNotBeEqualTo_errorOnFailure_doesNotBecomeNotEqual_throwsException()
150 Poll.forValue("tester value", valueTester::get) in await_toNotBeEqualTo_errorOnFailure_doesNotBecomeNotEqual_customError_throwsException()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/utils/
DPoll.java60 public final class Poll<E> { class
62 private static final String LOG_TAG = Poll.class.getName();
77 private Poll(String valueName, ValueSupplier<E> supplier) { in Poll() method in Poll
89 public static <E> Poll<E> forValue(ValueSupplier<E> supplier) { in forValue()
98 public static <E> Poll<E> forValue(String valueName, ValueSupplier<E> supplier) { in forValue()
99 return new Poll<>(valueName, supplier); in forValue()
104 public Poll<E> toBeNull() { in toBeNull()
113 public Poll<E> toNotBeNull() { in toNotBeNull()
122 public Poll<E> toBeEqualTo(E other) { in toBeEqualTo()
131 public Poll<E> toNotBeEqualTo(E other) { in toNotBeEqualTo()
[all …]
DRetry.java44 private final Poll<E> mPoll;
49 public static <E> Retry<E> logic(Poll.ValueSupplier<E> supplier) { in logic()
60 private Retry(Poll.ValueSupplier<E> supplier) { in Retry()
61 mPoll = Poll.forValue(supplier) in Retry()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/activities/
DActivity.java27 import com.android.bedstead.nene.utils.Poll;
65 Poll.forValue("Lock task mode state", () -> TestApis.activities().getLockTaskModeState()) in startLockTask()
82 Poll.forValue("Lock task mode state", () -> TestApis.activities().getLockTaskModeState()) in stopLockTask()
101 Poll.forValue("Foreground activity", () -> TestApis.activities().foregroundActivity()) in startActivity()
108 Poll.forValue("Foreground activity", () -> TestApis.activities().foregroundActivity()) in startActivity()
/cts/common/device-side/interactive/automation/src/main/java/com/google/android/interactive/steps/enterprise/sharesheet/
DAreThereWorkAndPersonalTabsStepAutomation.java25 import com.android.bedstead.nene.utils.Poll;
35 boolean personalTabExists = Poll.forValue("doesPersonalTabButtonExist", in automate()
40 boolean workTabExists = Poll.forValue("doesWorkTabButtonExist", in automate()
DDoesTheSelectedTabContainAMessageSayingPersonalAppsStepAutomation.java24 import com.android.bedstead.nene.utils.Poll;
32 return Poll.forValue("isNoPersonalAppsTextPresent", in automate()
/cts/common/device-side/interactive/automation/src/main/java/com/google/android/interactive/steps/enterprise/launcher/
DAreThereWorkAndPersonalTabsStepAutomation.java25 import com.android.bedstead.nene.utils.Poll;
35 boolean personalTabExists = Poll.forValue("doesPersonalTabButtonExist", in automate()
41 boolean workTabExists = Poll.forValue("doesWorkTabButtonExist", in automate()
DIsPhoneShortcutWorkBadgedStepAutomation.java23 import com.android.bedstead.nene.utils.Poll;
32 return Poll.forValue("isPhoneShortcutWorkBadgedStep", in automate()
DIsSmsAppShortcutWorkBadgedStepAutomation.java23 import com.android.bedstead.nene.utils.Poll;
32 return Poll.forValue("isSmsAppShortcutWorkBadgedStep", in automate()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DWallpaperTest.java36 import com.android.bedstead.nene.utils.Poll;
77 Poll.forValue("wallpaper bitmap", () -> TestApis.wallpaper().getBitmap()) in setBitmap_viaDpc_disallowed_canSet()
95 Poll.forValue("wallpaper bitmap", () -> TestApis.wallpaper().getBitmap()) in setBitmap_viaDpc_disallowed_cannotSet()
113 Poll.forValue("wallpaper bitmap", () -> TestApis.wallpaper().getBitmap()) in setBitmap_allowed_canSet()
131 Poll.forValue("wallpaper bitmap", () -> TestApis.wallpaper().getBitmap()) in setBitmap_disallowed_cannotSet()
146 Poll.forValue("wallpaper bitmap", () -> TestApis.wallpaper().getBitmap()) in setStream_allowed_canSet()
160 Poll.forValue("wallpaper bitmap", () -> TestApis.wallpaper().getBitmap()) in setStream_disallowed_cannotSet()
DStartActivityFromBackgroundTest.java29 import com.android.bedstead.nene.utils.Poll;
56 Poll.forValue("Start foreground activity from background", in startActivityFromBackground_dpcNotAllowed_unableToStart()
72 Poll.forValue("Start foreground activity from background", in startActivityFromBackground_dpcAllowed_ableToStart()
DInputMethodsTest.java27 import com.android.bedstead.nene.utils.Poll;
58Poll.forValue("isCurrentInputMethodSetByOwner", () -> TestApis.devicePolicy().isCurrentInputMethod… in isCurrentInputMethodSetByOwner_isSetByOwner_returnsTrue()
80Poll.forValue("isCurrentInputMethodSetByOwner", () -> TestApis.devicePolicy().isCurrentInputMethod… in isCurrentInputMethodSetByOwner_isNotSetByOwner_returnsFalse()
DPersistentIntentResolvingTest.java36 import com.android.bedstead.nene.utils.Poll;
84 Poll.forValue("Recent Activities contain resolver", in sendIntent_hasMultipleDefaultReceivers_launchesResolverActivity()
110 Poll.forValue("Recent activities contain preferred activity", in sendIntent_hasPreferredReceiver_launchesPreferredActivity()
116 Poll.forValue("Recent activities does not contain unpreferred activity", in sendIntent_hasPreferredReceiver_launchesPreferredActivity()
184 Poll.forValue("Recent Activities contain resolver", in sendIntent_clearPreferredActivity_launchesResolverActivity()
DDevicePolicyManagementRoleHolderTest.java57 import com.android.bedstead.nene.utils.Poll;
101 Poll.forValue(() -> TestApis.packages().installedForUser(profile)) in createAndProvisionManagedProfile_roleHolderIsInWorkProfile()
124 Poll.forValue(() -> TestApis.packages().installedForUser(userReference)) in createAndManageUser_roleHolderIsInManagedUser()
195 Poll.forValue("shouldAllowBypassingDevicePolicyManagementRoleQualification", () -> { in shouldAllowBypassingDevicePolicyManagementRoleQualification_noUsersAndAccounts_returnsTrue()
253 Poll.forValue("shouldAllowBypassingDevicePolicyManagementRoleQualification", () -> { in shouldAllowBypassingDevicePolicyManagementRoleQualification_withNonAllowedAccounts_returnsFalse()
271 Poll.forValue("shouldAllowBypassingDevicePolicyManagementRoleQualification", () -> { in shouldAllowBypassingDevicePolicyManagementRoleQualification_withAllowedAccounts_returnsTrue()
DEphemeralUserTest.kt26 import com.android.bedstead.nene.utils.Poll in <lambda>()
50 Poll.forValue { user.exists() } in <lambda>()
DAudioTest.java39 import com.android.bedstead.nene.utils.Poll;
108 Poll.forValue("isMicrophoneMute", sAudioManager::isMicrophoneMute) in disallowUnmuteMicrophoneIsNotSet_canUnmuteMicrophone()
124 Poll.forValue("isMicrophoneMute", sAudioManager::isMicrophoneMute) in disallowUnmuteMicrophoneIsSet_canNotUnmuteMicrophone()
DProfileOwnerTest.kt31 import com.android.bedstead.nene.utils.Poll in <lambda>()
131 Poll.forValue( in <lambda>()
166 Poll.forValue( in <lambda>()
201 Poll.forValue( in <lambda>()
256 Poll.forValue( in <lambda>()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/logcat/
DBlockingLogcatListener.java20 import com.android.bedstead.nene.utils.Poll;
34 Poll.forValue("matching lines", () -> TestApis.logcat().dump(mFilter)) in awaitMatch()
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/
DProcessReferenceTest.java23 import com.android.bedstead.nene.utils.Poll;
53 Poll.forValue("pid", in kill_killsProcess()
70 Poll.forValue("pid", in crash_crashesProcess()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/wifi/
DWifi.kt21 import com.android.bedstead.nene.utils.Poll in <lambda>()
47 Poll.forValue("Wifi enabled") { isEnabled } in <lambda>()
/cts/common/device-side/bedstead/testapp/src/testapps/main/java/com/android/bedstead/testapp/
DBaseTestAppActivity.java24 import com.android.bedstead.nene.utils.Poll;
48 return Poll.forValue("activity for className", () -> { in findActivity()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/location/
DLocations.java32 import com.android.bedstead.nene.utils.Poll;
73 Location unused = Poll.forValue("Last known location is null", in setLocationEnabled()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/
DProcessReference.java22 import com.android.bedstead.nene.utils.Poll;
96 Poll.forValue("pid", () -> { in kill()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/accounts/
DAccountBuilder.java24 import com.android.bedstead.nene.utils.Poll;
123 return Poll.forValue("created account bundle", this::addAccountOnce) in addAccount()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/bluetooth/
DBluetooth.java41 import com.android.bedstead.nene.utils.Poll;
88 Boolean unused2 = Poll.forValue("Bluetooth Enabled", this::isEnabled) in enable()
114 Boolean unused2 = Poll.forValue("Bluetooth Enabled", this::isEnabled) in disable()

123