Home
last modified time | relevance | path

Searched refs:rule (Results 1 – 25 of 558) sorted by relevance

12345678910>>...23

/cts/tests/signature/api-check/
Dandroid-test-jarjar-rules.txt2 rule android.test.AndroidTestCase** repackaged.@0
3 rule android.test.FlakyTest** repackaged.@0
4 rule android.test.InstrumentationTestCase** repackaged.@0
5 rule android.test.InstrumentationTestSuite** repackaged.@0
6 rule android.test.PerformanceTestCase** repackaged.@0
7 rule android.test.PerformanceTestCase.Intermediates** repackaged.@0
8 rule android.test.RepetitiveTest** repackaged.@0
9 rule android.test.UiThreadTest** repackaged.@0
10 rule android.test.suitebuilder.annotation.LargeTest** repackaged.@0
11 rule android.test.suitebuilder.annotation.MediumTest** repackaged.@0
[all …]
/cts/libs/helpers/core/tests/src/com/android/cts/helpers/
DDeviceInteractionHelperRuleTest.java64 DeviceInteractionHelperRule<ICtsDeviceInteractionHelper> rule = in testMissingProperty() local
67 rule.buildPackageList(null, mPackageManager); in testMissingProperty()
69 assertThat(rule.getPrefixes()).containsExactly("Prefix"); in testMissingProperty()
70 assertThat(rule.getPackageList()).containsExactly("com.android.cts.helpers.aosp"); in testMissingProperty()
71 assertThat(rule.getSourceDirs()).containsExactly("/tmp/a"); in testMissingProperty()
82 DeviceInteractionHelperRule<ICtsDeviceInteractionHelper> rule = in testEmptyProperty() local
85 rule.buildPackageList("", mPackageManager); in testEmptyProperty()
87 assertThat(rule.getPrefixes()).containsExactly("Prefix"); in testEmptyProperty()
88 assertThat(rule.getPackageList()).containsExactly("com.android.cts.helpers.aosp"); in testEmptyProperty()
89 assertThat(rule.getSourceDirs()).containsExactly("/tmp/a"); in testEmptyProperty()
[all …]
/cts/tests/fragment/src/android/fragment/cts/
DFragmentTestUtil.java33 import androidx.test.rule.ActivityTestRule;
39 public static void waitForExecution(final ActivityTestRule<? extends Activity> rule) { in waitForExecution() argument
45 rule.runOnUiThread(() -> { in waitForExecution()
47 rule.runOnUiThread(() -> { in waitForExecution()
54 private static void runOnUiThreadRethrow(ActivityTestRule<? extends Activity> rule, in runOnUiThreadRethrow() argument
60 rule.runOnUiThread(r); in runOnUiThreadRethrow()
68 final ActivityTestRule<? extends Activity> rule) { in executePendingTransactions() argument
69 return executePendingTransactions(rule, rule.getActivity().getFragmentManager()); in executePendingTransactions()
73 final ActivityTestRule<? extends Activity> rule, final FragmentManager fm) { in executePendingTransactions() argument
75 runOnUiThreadRethrow(rule, new Runnable() { in executePendingTransactions()
[all …]
DFragmentTestActivity.java26 import androidx.test.rule.ActivityTestRule;
77 public void waitForResume(ActivityTestRule<? extends Activity> rule) throws Throwable { in waitForResume() argument
84 rule.runOnUiThread(() -> { in waitForResume()
/cts/tests/tests/security/src/android/security/cts/
DCVE_2022_20456.java59 private void checkFields(AutomaticZenRule rule, boolean ownerFlag, boolean configActivityFlag, in checkFields() argument
62 if (INPUT_STRING_LENGTH <= rule.getName().length()) { in checkFields()
65 if (mLongUri.toString().length() <= rule.getConditionId().toString().length()) { in checkFields()
69 if (INPUT_STRING_LENGTH <= rule.getOwner().getPackageName().length()) { in checkFields()
72 if (INPUT_STRING_LENGTH <= rule.getOwner().getClassName().length()) { in checkFields()
77 if (INPUT_STRING_LENGTH <= rule.getConfigurationActivity().getPackageName().length()) { in checkFields()
81 if (INPUT_STRING_LENGTH <= rule.getConfigurationActivity().getClassName().length()) { in checkFields()
91 AutomaticZenRule rule = new AutomaticZenRule(mLongString, owner, configActivity, mLongUri, in checkConstructor() local
93 checkFields(rule, ownerFlag, configActivityFlag, "\ncheckConstructor (owner=" + ownerFlag in checkConstructor()
109 AutomaticZenRule rule = new AutomaticZenRule(ZEN_RULE_NAME, owner, configActivity, in checkFieldSetters() local
[all …]
/cts/common/device-side/util-axt/tests/src/com/android/compatibility/common/util/
DRetryRuleTest.java95 final RetryRule rule = new RetryRule(1); in testPassOnRetryableException() local
96 rule.apply(new RetryableStatement<RetryableException>(1, sRetryableException), mDescription) in testPassOnRetryableException()
103 final RetryRule rule = new RetryRule(2, cleaner); in testDoCleanOnRetryableException() local
105 rule.apply(new RetryableStatement<RetryableException>(2, sRetryableException, cleaner), in testDoCleanOnRetryableException()
114 final RetryRule rule = new RetryRule(2, cleaner); in testKeepLastStatusWhenFailOnRetryableException() local
117 () -> rule.apply( in testKeepLastStatusWhenFailOnRetryableException()
128 final RetryRule rule = new RetryRule(2, cleaner); in testNeverCleanWhenStatementPass() local
130 rule.apply(mMockStatement, mDescription).evaluate(); in testNeverCleanWhenStatementPass()
140 final RetryRule rule = new RetryRule(0, cleaner); in testNeverCleanWhenDisabledAndStatementThrowsRetryableException() local
144 () -> rule.apply(mMockStatement, mDescription).evaluate()); in testNeverCleanWhenDisabledAndStatementThrowsRetryableException()
[all …]
DSafeCleanerRuleTest.java69 final SafeCleanerRule rule = new SafeCleanerRule(); in testEmptyRule_testPass() local
70 rule.apply(mGoodGuyStatement, mDescription).evaluate(); in testEmptyRule_testPass()
75 final SafeCleanerRule rule = new SafeCleanerRule(); in testEmptyRule_testFails() local
77 () -> rule.apply(new FailureStatement(mRuntimeException), mDescription).evaluate()); in testEmptyRule_testFails()
83 final SafeCleanerRule rule = new SafeCleanerRule().setDumper(mDumper); in testEmptyRule_testFails_withDumper() local
85 () -> rule.apply(new FailureStatement(mRuntimeException), mDescription).evaluate()); in testEmptyRule_testFails_withDumper()
92 final SafeCleanerRule rule = new SafeCleanerRule() in testOnlyTestFails() local
96 () -> rule.apply(new FailureStatement(mRuntimeException), mDescription).evaluate()); in testOnlyTestFails()
104 final SafeCleanerRule rule = new SafeCleanerRule() in testOnlyTestFails_withDumper() local
109 () -> rule.apply(new FailureStatement(mRuntimeException), mDescription).evaluate()); in testOnlyTestFails_withDumper()
[all …]
DStateChangerRuleTest.java58 final StateChangerRule<String> rule = new StateChangerRule<>(mStateManager, in testSetAndRestoreOnSuccess() local
62 rule.apply(mStatement, mDescription).evaluate(); in testSetAndRestoreOnSuccess()
73 final StateChangerRule<String> rule = new StateChangerRule<>(mStateManager, in testDontSetIfSameValueOnSuccess() local
77 rule.apply(mStatement, mDescription).evaluate(); in testDontSetIfSameValueOnSuccess()
85 final StateChangerRule<String> rule = new StateChangerRule<>(mStateManager, in testSetButDontRestoreIfSameValueOnSuccess() local
89 rule.apply(mStatement, mDescription).evaluate(); in testSetButDontRestoreIfSameValueOnSuccess()
99 final StateChangerRule<String> rule = new StateChangerRule<>(mStateManager, in testDontSetButRestoreIfValueChangedOnSuccess() local
103 rule.apply(mStatement, mDescription).evaluate(); in testDontSetButRestoreIfValueChangedOnSuccess()
113 final StateChangerRule<String> rule = new StateChangerRule<>(mStateManager, in testSetAndRestoreOnFailure() local
119 () -> rule.apply(mStatement, mDescription).evaluate()); in testSetAndRestoreOnFailure()
[all …]
DStateKeeperRuleTest.java57 final StateKeeperRule<String> rule = new StateKeeperRule<>(mStateManager); in testRestoreOnSuccess() local
60 rule.apply(mStatement, mDescription).evaluate(); in testRestoreOnSuccess()
70 final StateKeeperRule<String> rule = new StateKeeperRule<>(mStateManager); in testRestoreOnFailure() local
75 () -> rule.apply(mStatement, mDescription).evaluate()); in testRestoreOnFailure()
85 final StateKeeperRule<String> rule = new StateKeeperRule<>(mStateManager); in testDoNotRestoreWhenNotChanged() local
88 rule.apply(mStatement, mDescription).evaluate(); in testDoNotRestoreWhenNotChanged()
96 final StateKeeperRule<String> rule = new StateKeeperRule<>(mStateManager); in testDoNotRestoreOnFailure() local
101 () -> rule.apply(mStatement, mDescription).evaluate()); in testDoNotRestoreOnFailure()
/cts/tests/tests/notification/src/android/app/notification/current/cts/
DAutomaticZenRuleTest.java62 AutomaticZenRule rule = new AutomaticZenRule(mName, mOwner, mConditionId, in testDescribeContents() local
64 assertEquals(expected, rule.describeContents()); in testDescribeContents()
69 AutomaticZenRule rule = new AutomaticZenRule(mName, mOwner, mConfigActivity, mConditionId, in testWriteToParcel() local
72 rule.setDeviceEffects( in testWriteToParcel()
76 rule.writeToParcel(parcel, 0); in testWriteToParcel()
91 rule.setName(null); in testWriteToParcel()
93 rule.writeToParcel(parcel, 0); in testWriteToParcel()
106 AutomaticZenRule rule = new AutomaticZenRule(mName, mOwner, mConfigActivity, mConditionId, in testSetConditionId() local
108 rule.setConditionId(newConditionId); in testSetConditionId()
109 assertEquals(newConditionId, rule.getConditionId()); in testSetConditionId()
[all …]
DNotificationManagerZenTest.java798 AutomaticZenRule rule = createRule("test_consolidated_policy", in testConsolidatedNotificationPolicy() local
800 rule.setZenPolicy(new ZenPolicy.Builder() in testConsolidatedNotificationPolicy()
804 String id = mNotificationManager.addAutomaticZenRule(rule); in testConsolidatedNotificationPolicy()
806 Condition condition = new Condition(rule.getConditionId(), "summary", in testConsolidatedNotificationPolicy()
820 ZenPolicy fullySpecified = mDefaultPolicy.overwrittenWith(rule.getZenPolicy()); in testConsolidatedNotificationPolicy()
949 AutomaticZenRule rule = createRule("testRule"); in testConsolidatedNotificationPolicy_broadcasts() local
950 rule.setZenPolicy(new ZenPolicy.Builder() in testConsolidatedNotificationPolicy_broadcasts()
955 String id = mNotificationManager.addAutomaticZenRule(rule); in testConsolidatedNotificationPolicy_broadcasts()
961 new Condition(rule.getConditionId(), "on", Condition.STATE_TRUE); in testConsolidatedNotificationPolicy_broadcasts()
978 new Condition(rule.getConditionId(), "on", Condition.STATE_FALSE); in testConsolidatedNotificationPolicy_broadcasts()
[all …]
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/
DBarTestUtils.java35 import androidx.test.rule.ActivityTestRule;
49 public static void assumeHasColoredStatusBar(ActivityTestRule<?> rule) { in assumeHasColoredStatusBar() argument
51 assumeHasStatusBar(rule); in assumeHasColoredStatusBar()
54 public static void assumeHasStatusBar(ActivityTestRule<?> rule) { in assumeHasStatusBar() argument
57 Insets statusBar = getInsets(rule).getInsetsIgnoringVisibility( in assumeHasStatusBar()
62 public static void assumeHasColoredNavigationBar(ActivityTestRule<?> rule) { in assumeHasColoredNavigationBar() argument
67 getInsets(rule).getStableInsetBottom() > 0); in assumeHasColoredNavigationBar()
103 private static WindowInsets getInsets(ActivityTestRule<?> rule) { in getInsets() argument
106 rule.runOnUiThread(() -> { in getInsets()
107 insets[0] = rule.getActivity().getWindow().getDecorView().getRootWindowInsets(); in getInsets()
/cts/common/device-side/util-axt/
Dprotobuf-jarjar-rules.txt1 rule com.google.protobuf.** com.google.compatibility.device.util.com.google.protobuf.@1
2 rule android.**.nano.** com.google.compatibility.device.util.android.@1.nano.@2
3 rule **.android.**.nano.** com.google.compatibility.device.util.@1.android.@2.nano.@3
/cts/common/device-side/util/
Dprotobuf-jarjar-rules.txt1 rule com.google.protobuf.** com.google.compatibility.device.util.com.google.protobuf.@1
2 rule android.**.nano.** com.google.compatibility.device.util.android.@1.nano.@2
3 rule **.android.**.nano.** com.google.compatibility.device.util.@1.android.@2.nano.@3
/cts/hostsidetests/security/src/android/security/cts/
DSELinuxNeverallowRule.java139 String rule = matcher.group(1).replace("\n", " "); in parsePolicy() local
140 if (rule.startsWith("BEGIN_")) { in parsePolicy()
141 String section = rule.substring(6); in parsePolicy()
143 } else if (rule.startsWith("END_")) { in parsePolicy()
144 String section = rule.substring(4); in parsePolicy()
146 assertTrue("Condition " + rule + " found without BEGIN", v > 0); in parsePolicy()
148 } else if (rule.startsWith("neverallow")) { in parsePolicy()
149 rules.add(new SELinuxNeverallowRule(rule, conditions)); in parsePolicy()
151 throw new Exception("Unknown rule: " + rule); in parsePolicy()
/cts/tests/inputmethod/mockspellchecker/src/com/android/cts/mockspellchecker/
DMockSpellChecker.kt102 private fun suggestionsInfo(rule: SuggestionRule): SuggestionsInfo { in suggestionsInfo()
103 return suggestionsInfo(rule, 0, 0) in suggestionsInfo()
107 rule: SuggestionRule, in suggestionsInfo()
112 val attrs = rule.attributes and supportedAttributes in suggestionsInfo()
116 rule.suggestionsList.map { prefix + it }.toTypedArray() in suggestionsInfo()
118 rule.suggestionsList.toTypedArray() in suggestionsInfo()
/cts/tests/tests/media/audio/src/android/media/audio/cts/
DAudioMixingRuleTest.java73 AudioMixingRule rule = new AudioMixingRule.Builder() in testConstructValidRule() local
81 assertEquals(rule.getTargetMixRole(), MIX_ROLE_PLAYERS); in testConstructValidRule()
82 assertThat(rule.getCriteria(), containsInAnyOrder( in testConstructValidRule()
101 AudioMixingRule rule = new AudioMixingRule.Builder() in testRuleBuilderDedupsCriteria() local
110 assertThat(rule.getCriteria(), hasSize(2)); in testRuleBuilderDedupsCriteria()
111 assertThat(rule.getCriteria(), containsInAnyOrder( in testRuleBuilderDedupsCriteria()
156 AudioMixingRule rule = new AudioMixingRule.Builder() in injectorMixTypeDeductionWithGenericRuleSucceeds() local
165 assertEquals(rule.getTargetMixRole(), MIX_ROLE_INJECTOR); in injectorMixTypeDeductionWithGenericRuleSucceeds()
166 assertThat(rule.getCriteria(), containsInAnyOrder( in injectorMixTypeDeductionWithGenericRuleSucceeds()
197 AudioMixingRule rule = new AudioMixingRule.Builder() in sessionIdRuleCompatibleWithPlayersMix() local
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DConditionProviderVerifierActivity.java290 AutomaticZenRule rule = mNm.getAutomaticZenRule(id); in test() local
291 if (rule != null && ruleToCreate.getName().equals(rule.getName()) in test()
292 && ruleToCreate.getOwner().equals(rule.getOwner()) in test()
293 && ruleToCreate.getConditionId().equals(rule.getConditionId()) in test()
294 && ruleToCreate.isEnabled() == rule.isEnabled() in test()
295 && ruleToCreate.getInterruptionFilter() == rule.getInterruptionFilter() in test()
297 rule.getConfigurationActivity()) in test()
298 && compareZenPolicies(ruleToCreate.getZenPolicy(), rule.getZenPolicy())) { in test()
693 AutomaticZenRule rule = new AutomaticZenRule(BROADCAST_RULE_NAME, null, in setUp() local
697 mId = mNm.addAutomaticZenRule(rule); in setUp()
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/other/
DEnsureBarContrastTest.java46 import androidx.test.rule.ActivityTestRule;
224 private <T extends TestActivity> T launchAndWait(ActivityTestRule<T> rule, boolean lightBars,
226 final T activity = rule.launchActivity(new Intent()
328 void checkAssumptions(ActivityTestRule<?> rule) throws AssumptionViolatedException {
329 assumeHasColoredStatusBar(rule);
347 void checkAssumptions(ActivityTestRule<?> rule) throws AssumptionViolatedException {
348 assumeHasColoredNavigationBar(rule);
364 abstract void checkAssumptions(ActivityTestRule<?> rule) throws AssumptionViolatedException;
/cts/tests/tests/security/src/android/security/cts/AutomaticZenRuleTests/
DAutomaticZenRuleTests.java101 AutomaticZenRule rule = new AutomaticZenRule(ZEN_RULE_NAME + ruleNo, owner, in testUsingAppComponents() local
104 String id = mNotificationManager.addAutomaticZenRule(rule); in testUsingAppComponents()
109 AutomaticZenRule rule = new AutomaticZenRule(ZEN_RULE_NAME + i, owner, null, in testUsingAppComponents() local
111 String id = mNotificationManager.addAutomaticZenRule(rule); in testUsingAppComponents()
/cts/tools/vm-tests-tf/
Djill-jarjar-rules.txt1 rule org.objectweb.** com.android.jill.@0
/cts/tests/input/src/android/input/cts/
DVerifyHardwareKeyEventTest.kt47 val rule = ActivityScenarioRule<CaptureEventActivity>(CaptureEventActivity::class.java) constant
54 rule.getScenario().onActivity { in setUp()
/cts/hostsidetests/jvmti/run-tests/test-1975/
Djarjar-rules.txt1 rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1975@1
/cts/hostsidetests/jvmti/run-tests/test-908/
Djarjar-rules.txt1 rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest908@1
/cts/hostsidetests/jvmti/run-tests/test-1990/
Djarjar-rules.txt1 rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1990@1

12345678910>>...23