Home
last modified time | relevance | path

Searched refs:mActivityTestRule (Results 1 – 25 of 81) sorted by relevance

1234

/frameworks/support/lifecycle/integration-tests/testapp/src/androidTest/java/androidx/lifecycle/
DLiveDataOnSaveInstanceStateTest.java46 public ActivityTestRule<CollectingSupportActivity> mActivityTestRule = field in LiveDataOnSaveInstanceStateTest
52 CollectingSupportActivity activity = mActivityTestRule.getActivity(); in liveData_partiallyObscuredActivity_maxSdkM()
60 CollectingSupportActivity activity = mActivityTestRule.getActivity(); in liveData_partiallyObscuredActivityWithFragment_maxSdkM()
62 mActivityTestRule.runOnUiThread(() -> activity.replaceFragment(fragment)); in liveData_partiallyObscuredActivityWithFragment_maxSdkM()
70 CollectingSupportActivity activity = mActivityTestRule.getActivity(); in liveData_partiallyObscuredActivityFragmentInFragment_maxSdkM()
73 mActivityTestRule.runOnUiThread(() -> { in liveData_partiallyObscuredActivityFragmentInFragment_maxSdkM()
84 CollectingSupportActivity activity = mActivityTestRule.getActivity(); in liveData_partiallyObscuredActivity_minSdkN()
92 CollectingSupportActivity activity = mActivityTestRule.getActivity(); in liveData_partiallyObscuredActivityWithFragment_minSdkN()
94 mActivityTestRule.runOnUiThread(() -> activity.replaceFragment(fragment)); in liveData_partiallyObscuredActivityWithFragment_minSdkN()
102 CollectingSupportActivity activity = mActivityTestRule.getActivity(); in liveData_partiallyObscuredActivityFragmentInFragment_minSdkN()
[all …]
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/widget/picker/
DTimePickerTest.java57 public ActivityTestRule<TimePickerActivity> mActivityTestRule = field in TimePickerTest
68 mActivity = mActivityTestRule.launchActivity(intent); in initActivity()
94 mActivityTestRule.runOnUiThread(new Runnable() { in initActivity()
111 mActivityTestRule.runOnUiThread(new Runnable() { in testSetHourIn24hFormat()
121 mActivityTestRule.runOnUiThread(new Runnable() { in testSetHourIn24hFormat()
131 mActivityTestRule.runOnUiThread(new Runnable() { in testSetHourIn24hFormat()
141 mActivityTestRule.runOnUiThread(new Runnable() { in testSetHourIn24hFormat()
151 mActivityTestRule.runOnUiThread(new Runnable() { in testSetHourIn24hFormat()
168 mActivityTestRule.runOnUiThread(new Runnable() { in testSetHourIn12hFormat()
178 mActivityTestRule.runOnUiThread(new Runnable() { in testSetHourIn12hFormat()
[all …]
/frameworks/support/coordinatorlayout/src/androidTest/java/androidx/coordinatorlayout/widget/
DCoordinatorLayoutTest.java75 public final ActivityTestRule<CoordinatorLayoutActivity> mActivityTestRule; field in CoordinatorLayoutTest
80 mActivityTestRule = new ActivityTestRule<>(CoordinatorLayoutActivity.class); in CoordinatorLayoutTest()
92 final CoordinatorLayout col = mActivityTestRule.getActivity().mCoordinatorLayout; in testSetFitSystemWindows()
106 mActivityTestRule.runOnUiThread(new Runnable() { in testSetFitSystemWindows()
117 mActivityTestRule.runOnUiThread(new Runnable() { in testSetFitSystemWindows()
130 mActivityTestRule.runOnUiThread(new Runnable() { in testSetFitSystemWindows()
146 final CoordinatorLayout col = mActivityTestRule.getActivity().mCoordinatorLayout; in testLayoutChildren()
148 mActivityTestRule.runOnUiThread(new Runnable() { in testLayoutChildren()
175 mActivityTestRule.runOnUiThread(new Runnable() { in testLayoutChildren()
185 mActivityTestRule.runOnUiThread(new Runnable() { in testLayoutChildren()
[all …]
DCoordinatorLayoutSortTest.java43 public final ActivityTestRule<CoordinatorLayoutActivity> mActivityTestRule; field in CoordinatorLayoutSortTest
67 mActivityTestRule = new ActivityTestRule<>(CoordinatorLayoutActivity.class); in CoordinatorLayoutSortTest()
76 final CoordinatorLayout col = mActivityTestRule.getActivity().mCoordinatorLayout; in testDependencySortingOrder()
119 mActivityTestRule.runOnUiThread(new Runnable() { in addViewsAndAssertOrdering()
133 mActivityTestRule.runOnUiThread(new Runnable() { in addViewsAndAssertOrdering()
/frameworks/support/v7/appcompat/src/androidTest/java/androidx/appcompat/app/
DKeyEventsTestCaseWithToolbar.java48 Toolbar toolbar = mActivityTestRule.getActivity().getToolbar(); in testMenuKeyOpensToolbarMenu()
63 if (!mActivityTestRule.getActivity().getWindow().hasFeature(Window.FEATURE_OPTIONS_PANEL)) { in testOpenMenuOpensToolbarMenu()
66 Toolbar toolbar = mActivityTestRule.getActivity().getToolbar(); in testOpenMenuOpensToolbarMenu()
69 mActivityTestRule.runOnUiThread(new Runnable() { in testOpenMenuOpensToolbarMenu()
72 mActivityTestRule.getActivity().openOptionsMenu(); in testOpenMenuOpensToolbarMenu()
78 mActivityTestRule.runOnUiThread(new Runnable() { in testOpenMenuOpensToolbarMenu()
81 mActivityTestRule.getActivity().closeOptionsMenu(); in testOpenMenuOpensToolbarMenu()
DBaseBasicsTestCase.java65 public final ActivityTestRule<A> mActivityTestRule; field in BaseBasicsTestCase
69 mActivityTestRule = new ActivityTestRule<>(activityClass); in BaseBasicsTestCase()
75 mActivityTestRule.getActivity().getSupportActionBar()); in testActionBarExists()
80 assertEquals(mActivityTestRule.getActivity().getTitle(), in testDefaultActionBarTitle()
81 mActivityTestRule.getActivity().getSupportActionBar().getTitle()); in testDefaultActionBarTitle()
88 mActivityTestRule.getActivity().setTitle(newTitle); in testSetActionBarTitle()
90 newTitle, mActivityTestRule.getActivity().getSupportActionBar().getTitle()); in testSetActionBarTitle()
98 mActivityTestRule.getActivity().findViewById(R.id.test_content); in testFitSystemWindowsReachesContent()
101 if (!canShowSystemUi(mActivityTestRule.getActivity())) { in testFitSystemWindowsReachesContent()
117 final View content = mActivityTestRule.getActivity().findViewById(R.id.test_content); in testOnApplyWindowInsetsReachesContent()
[all …]
DNightModeTestCase.java52 public final ActivityTestRule<NightModeActivity> mActivityTestRule; field in NightModeTestCase
58 mActivityTestRule = new ActivityTestRule<>(NightModeActivity.class); in NightModeTestCase()
75 mActivityTestRule.getActivity(), AppCompatDelegate.MODE_NIGHT_YES); in testLocalDayNightModeRecreatesActivity()
83 final NightModeActivity activity = mActivityTestRule.getActivity(); in testColorConvertedDrawableChangesWithNightMode()
109 final NightModeActivity activity = mActivityTestRule.getActivity(); in testNightModeAutoRecreatesOnTimeChange()
121 mActivityTestRule.runOnUiThread(new Runnable() { in testNightModeAutoRecreatesOnTimeChange()
144 NightModeActivity activity = mActivityTestRule.getActivity(); in testNightModeAutoRecreatesOnResume()
153 mActivityTestRule.runOnUiThread(new Runnable() { in testNightModeAutoRecreatesOnResume()
196 mActivityTestRule.runOnUiThread(new Runnable() { in setLocalNightModeAndWaitForRecreate()
203 AppCompatActivityUtils.recreateActivity(mActivityTestRule, activity); in setLocalNightModeAndWaitForRecreate()
[all …]
DKeyboardShortcutsTestCaseWithToolbar.java44 public final ActivityTestRule<ToolbarAppCompatActivity> mActivityTestRule = field in KeyboardShortcutsTestCaseWithToolbar
54 final BaseTestActivity activity = mActivityTestRule.getActivity(); in testAccessActionBar()
57 mActivityTestRule.runOnUiThread(new Runnable() { in testAccessActionBar()
68 mActivityTestRule.runOnUiThread(new Runnable() { in testAccessActionBar()
83 mActivityTestRule.runOnUiThread(new Runnable() { in testAccessActionBar()
94 final ToolbarAppCompatActivity activity = mActivityTestRule.getActivity(); in testKeyShortcuts()
99 mActivityTestRule.runOnUiThread(new Runnable() { in testKeyShortcuts()
122 mActivityTestRule.runOnUiThread(new Runnable() { in testKeyShortcuts()
134 mActivityTestRule.runOnUiThread(new Runnable() { in testKeyShortcuts()
DAlertDialogTest.java103 public final ActivityTestRule<AlertDialogTestActivity> mActivityTestRule; field in AlertDialogTest
110 mActivityTestRule = new ActivityTestRule<>(AlertDialogTestActivity.class); in AlertDialogTest()
115 final AlertDialogTestActivity activity = mActivityTestRule.getActivity(); in setUp()
122 mActivityTestRule.runOnUiThread(new Runnable() { in tearDown()
144 final Context context = mActivityTestRule.getActivity(); in testBuilderTheme()
158 final Context context = mActivityTestRule.getActivity(); in testBasicContent()
190 AlertDialog.Builder builder = new AlertDialog.Builder(mActivityTestRule.getActivity()) in testMessageString()
204 AlertDialog.Builder builder = new AlertDialog.Builder(mActivityTestRule.getActivity()) in testMessageStringPostCreation()
214 mActivityTestRule.runOnUiThread(new Runnable() { in testMessageStringPostCreation()
233 final Context context = mActivityTestRule.getActivity(); in verifyCustomTitle()
[all …]
DLayoutInflaterFactoryTestCase.java56 public final ActivityTestRule<LayoutInflaterFactoryTestActivity> mActivityTestRule = field in LayoutInflaterFactoryTestCase
69 final LayoutInflater inflater = LayoutInflater.from(mActivityTestRule.getActivity()); in testAndroidThemeInflation()
77 final LayoutInflater inflater = LayoutInflater.from(mActivityTestRule.getActivity()); in testAppThemeInflation()
86 LayoutInflater inflater = LayoutInflater.from(mActivityTestRule.getActivity()); in testAndroidThemeWithChildrenInflation()
96 final Context activity = mActivityTestRule.getActivity(); in testThemedInflationWithUnattachedParent()
198 LayoutInflater inflater = LayoutInflater.from(mActivityTestRule.getActivity()); in testDeclarativeOnClickWithContextWrapper()
202 assertTrue(mActivityTestRule.getActivity().wasDeclarativeOnClickCalled()); in testDeclarativeOnClickWithContextWrapper()
206 LayoutInflater inflater = LayoutInflater.from(mActivityTestRule.getActivity()); in verifyAppCompatWidgetInflation()
DFragmentContentIdTest.java38 public final ActivityTestRule<FragmentContentIdActivity> mActivityTestRule = field in FragmentContentIdTest
44 mActivityTestRule.runOnUiThread(new Runnable() { in testFragmentAddedToAndroidContentIdCanBeRemoved()
47 mActivityTestRule.getActivity().replaceWithFragmentB(); in testFragmentAddedToAndroidContentIdCanBeRemoved()
/frameworks/support/v7/appcompat/src/androidTest/java/androidx/appcompat/widget/
DAppCompatBaseAutoSizeTest.java65 public final ActivityTestRule<A> mActivityTestRule; field in AppCompatBaseAutoSizeTest
72 mActivityTestRule = new ActivityTestRule<A>(clazz); in AppCompatBaseAutoSizeTest()
78 mActivity = mActivityTestRule.getActivity(); in setup()
171 mActivityTestRule.runOnUiThread(new Runnable() { in testAutoSizeUniform_autoSizeCalledWhenTypeChanged()
179 mActivityTestRule.runOnUiThread(new Runnable() { in testAutoSizeUniform_autoSizeCalledWhenTypeChanged()
327 mActivityTestRule.runOnUiThread(new Runnable() { in testAutoSizeUniform_equivalentConfigurations()
356 mActivityTestRule.runOnUiThread(new Runnable() { in testAutoSizeCallers_setHeight()
364 mActivityTestRule.runOnUiThread(new Runnable() { in testAutoSizeCallers_setHeight()
380 mActivityTestRule.runOnUiThread(new Runnable() {
388 mActivityTestRule.runOnUiThread(new Runnable() {
[all …]
DAppCompatEditTextTest.java39 public final ActivityTestRule<AppCompatActivity> mActivityTestRule = field in AppCompatEditTextTest
47 GetTextEditText editText = new GetTextEditText(mActivityTestRule.getActivity()); in testGetTextNonEditable()
68 GetTextEditText2 editText = new GetTextEditText2(mActivityTestRule.getActivity()); in testGetTextBeforeConstructor()
DTintResourcesTest.java38 public final ActivityTestRule<AppCompatActivity> mActivityTestRule = field in TintResourcesTest
44 new TestResources(mActivityTestRule.getActivity().getResources()); in testTintResourcesDelegateBackToOriginalResources()
50 new TintResources(mActivityTestRule.getActivity(), testResources); in testTintResourcesDelegateBackToOriginalResources()
/frameworks/support/lifecycle/integration-tests/test-app/src/androidTest/java/com/android/support/lifecycle/
DLiveDataTransactionTest.java42 public ActivityTestRule<LiveDataTestActivity> mActivityTestRule = field in LiveDataTransactionTest
49 LiveDataTestActivity activity = mActivityTestRule.getActivity(); in transactionInOnStateChanged()
58 mActivityTestRule.runOnUiThread(() -> { in transactionInOnStateChanged()
64 mActivityTestRule); in transactionInOnStateChanged()
65 TestUtils.waitTillResumed(newActivity, mActivityTestRule); in transactionInOnStateChanged()
66 mActivityTestRule.runOnUiThread(() -> { in transactionInOnStateChanged()
/frameworks/support/compat/src/androidTest/java/androidx/core/widget/
DNestedScrollViewNestedScrollingParentTest.java71 mNestedScrollView = new NestedScrollView(mActivityTestRule.getActivity()); in instantiateMembers()
72 mParent = spy(new NestedScrollingSpyView(mActivityTestRule.getActivity())); in instantiateMembers()
73 mChild = new View(mActivityTestRule.getActivity()); in instantiateMembers()
104 mActivityTestRule.runOnUiThread(new Runnable() { in onNestedScrollAccepted_callsParentsOnStartNestedScrollWithCorrectParams()
121 mActivityTestRule.runOnUiThread(new Runnable() { in onNestedScrollAccepted_callsParentsOnNestedScrollAcceptedWithCorrectParams()
152 mActivityTestRule.runOnUiThread(new Runnable() { in onNestedScrollAccepted_withBothOrientations_pOnNestedScrollAcceptedCalledWithVert()
184 mActivityTestRule.runOnUiThread(new Runnable() { in onNestedScrollAccepted_parentRejects_parentOnNestedScrollAcceptedNotCalled()
209 mActivityTestRule.runOnUiThread(new Runnable() { in onNestedScrollAccepted_v1_callsParentWithTypeTouch()
239 mActivityTestRule.runOnUiThread(new Runnable() { in onStopNestedScroll_parentOnStopNestedScrollCalledWithCorrectParams()
263 mActivityTestRule.runOnUiThread(new Runnable() { in onStopNestedScroll_parentRejects_parentOnStopNestedScrollNotCalled()
[all …]
DContentLoadingProgressBarTest.java40 public final ActivityTestRule<ContentLoadingProgressBarActivity> mActivityTestRule; field in ContentLoadingProgressBarTest
43 mActivityTestRule = new ActivityTestRule<>(ContentLoadingProgressBarActivity.class); in ContentLoadingProgressBarTest()
50 mContentLoadingProgressBar = mActivityTestRule.getActivity().findViewById(R.id.progressBar); in setUp()
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/widget/
DGridWidgetTest.java86 protected ActivityTestRule<GridActivity> mActivityTestRule; field in GridWidgetTest
157 mActivityTestRule.runOnUiThread(new Runnable() { in setSelectedPosition()
171 mActivityTestRule.runOnUiThread(new Runnable() { in setSelectedPositionSmooth()
184 mActivityTestRule.runOnUiThread(verify); in scroll()
383 mActivityTestRule = new ActivityTestRule<GridActivity>(GridActivity.class, false, false); in initActivity()
384 mActivity = mActivityTestRule.launchActivity(intent); in initActivity()
385 mActivityTestRule.runOnUiThread(new Runnable() { in initActivity()
402 mActivityTestRule = null; in clearTest()
456 mActivityTestRule.runOnUiThread(new Runnable() { in waitForItemAnimation()
487 mActivityTestRule.runOnUiThread(task); in performAndWaitForAnimation()
[all …]
/frameworks/support/browser/src/androidTest/java/androidx/browser/customtabs/
DTrustedWebUtilsTest.java43 public final ActivityTestRule<TestActivity> mActivityTestRule; field in TrustedWebUtilsTest
46 mActivityTestRule = new ActivityTestRule<>(TestActivity.class); in TrustedWebUtilsTest()
53 mActivityTestRule.getActivity(), customTabsIntent, Uri.EMPTY); in testTrustedWebIntentRequiresValidSession()
59 mActivityTestRule.getActivity().getComponentName()); in testTrustedWebIntentContainsRequiredExtra()
62 mActivityTestRule.getActivity(), customTabsIntent, Uri.EMPTY); in testTrustedWebIntentContainsRequiredExtra()
/frameworks/support/gridlayout/src/androidTest/java/androidx/gridlayout/widget/
DGridLayoutTest.java44 @Rule public final ActivityTestRule<GridLayoutTestActivity> mActivityTestRule; field in GridLayoutTest
51 mActivityTestRule = new ActivityTestRule<>(GridLayoutTestActivity.class); in GridLayoutTest()
56 new TestContentView(mActivityTestRule.getActivity()); in setContentView()
61 mActivityTestRule.runOnUiThread(new Runnable() { in setContentView()
64 final Activity activity = mActivityTestRule.getActivity(); in setContentView()
114 mActivityTestRule.runOnUiThread(new Runnable() { in testMakeViewGone()
117 final View rightView = mActivityTestRule.getActivity().findViewById(R.id.rightView); in testMakeViewGone()
124 left = mActivityTestRule.getActivity().findViewById(R.id.leftView).getWidth(); in testMakeViewGone()
144 MyGridLayout gridLayout = new MyGridLayout(mActivityTestRule.getActivity()); in testGenerateLayoutParamsFromMarginParams()
/frameworks/support/compat/src/androidTest/java/androidx/core/view/
DViewCompatTest.java54 final Activity activity = mActivityTestRule.getActivity(); in setUp()
74 final View view = new View(mActivityTestRule.getActivity()); in testGetDisplay_returnsNullForUnattachedView()
81 final View view = new View(mActivityTestRule.getActivity()); in testTransitionName()
102 View container = mActivityTestRule.getActivity().findViewById(R.id.container); in testRequireViewByIdFound()
108 View container = mActivityTestRule.getActivity().findViewById(R.id.container); in testRequireViewByIdMissing()
116 View container = mActivityTestRule.getActivity().findViewById(R.id.container); in testRequireViewByIdInvalid()
DViewPropertyAnimatorCompatTest.java48 final Activity activity = mActivityTestRule.getActivity(); in setUp()
55 mActivityTestRule.runOnUiThread(new Runnable() { in testWithEndAction()
71 mActivityTestRule.runOnUiThread(new Runnable() { in testWithEndAction()
91 mActivityTestRule.runOnUiThread(new Runnable() { in testWithStartAction()
107 mActivityTestRule.runOnUiThread(new Runnable() { in testWithStartAction()
/frameworks/support/fragment/src/androidTest/java/androidx/fragment/app/
DDialogFragmentTest.java43 public final ActivityTestRule<EmptyFragmentTestActivity> mActivityTestRule = field in DialogFragmentTest
51 fragment.show(mActivityTestRule.getActivity().getSupportFragmentManager(), null); in testDialogFragmentShows()
64 mActivityTestRule.runOnUiThread(new Runnable() { in testDialogFragmentShowsNow()
67 fragment.showNow(mActivityTestRule.getActivity().getSupportFragmentManager(), in testDialogFragmentShowsNow()
83 fragment.show(mActivityTestRule.getActivity().getSupportFragmentManager(), null); in testDialogFragmentDismiss()
/frameworks/support/v7/appcompat/src/androidTest/java/androidx/appcompat/res/content/
DAppCompatResourcesTestCase.java43 public final ActivityTestRule<AppCompatActivity> mActivityTestRule; field in AppCompatResourcesTestCase
46 mActivityTestRule = new ActivityTestRule<>(AppCompatActivity.class); in AppCompatResourcesTestCase()
51 final Activity context = mActivityTestRule.getActivity(); in testGetColorStateListWithThemedAttributes()
75 final Activity context = mActivityTestRule.getActivity(); in testGetDrawableVectorResource()
/frameworks/base/core/tests/coretests/src/android/app/activity/
DActivityThreadTest.java53 private final ActivityTestRule mActivityTestRule = field in ActivityThreadTest
59 final Activity activity = mActivityTestRule.launchActivity(new Intent()); in testDoubleRelaunch()
69 final Activity activity = mActivityTestRule.launchActivity(new Intent()); in testResumeAfterRelaunch()
79 final Activity activity = mActivityTestRule.launchActivity(new Intent()); in testSleepAndStop()
90 final Activity activity = mActivityTestRule.launchActivity(new Intent()); in testRepeatedResume()
107 final Activity activity = mActivityTestRule.launchActivity(initIntent); in testCustomIntentPreservedOnRelaunch()

1234