Home
last modified time | relevance | path

Searched refs:getInstrumentation (Results 1 – 25 of 235) sorted by relevance

12345678910

/packages/apps/Contacts/tests/src/com/android/contacts/model/account/
DExternalAccountTypeTest.java61 final Context c = getInstrumentation().getTargetContext(); in testResolveExternalResId()
63 final String packageName = getInstrumentation().getContext().getPackageName(); in testResolveExternalResId()
91 … final ExternalAccountType type = new ExternalAccountType(getInstrumentation().getTargetContext(), in testNoPackage()
101 … final ExternalAccountType type = new ExternalAccountType(getInstrumentation().getTargetContext(), in testEditSchema()
102 getInstrumentation().getContext().getPackageName(), false); in testEditSchema()
127 … final ExternalAccountType type = new ExternalAccountType(getInstrumentation().getTargetContext(), in testEditSchema_fallback()
128 getInstrumentation().getContext().getPackageName(), false, in testEditSchema_fallback()
129 getInstrumentation().getContext().getResources().getXml(R.xml.contacts_fallback) in testEditSchema_fallback()
137 getInstrumentation().getTargetContext(), type.resourcePackageName); in testEditSchema_fallback()
155 … final ExternalAccountType type = new ExternalAccountType(getInstrumentation().getTargetContext(), in checkEditSchema_mustHaveChecks()
[all …]
DAccountTypeTest.java35 final String packageName = getInstrumentation().getContext().getPackageName(); in testGetResourceText()
37 final Context c = getInstrumentation().getTargetContext(); in testGetResourceText()
48 assertEquals(getInstrumentation().getContext().getString(externalResID), in testGetResourceText()
62 final String packageName = getInstrumentation().getContext().getPackageName(); in testGetInviteContactActionLabel()
63 final Context c = getInstrumentation().getTargetContext(); in testGetInviteContactActionLabel()
85 assertEquals(getInstrumentation().getContext().getString(externalResID), in testGetInviteContactActionLabel()
108 getInstrumentation().getTargetContext()).compare(lhs, rhs);
/packages/apps/Settings/tests/uitests/src/com/android/settings/ui/
DLocationSettingsTests.java41 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
59 SettingsHelper.launchSettingsPage(getInstrumentation().getContext(), in testLoadingLocationSettings()
97 Settings.Secure.putInt(getInstrumentation().getContext().getContentResolver(), in testLocationDeviceOnlyMode()
106 Settings.Secure.putInt(getInstrumentation().getContext().getContentResolver(), in testLocationBatterySavingMode()
114 Settings.Secure.putInt(getInstrumentation().getContext().getContentResolver(), in testLocationHighAccuracyMode()
124 SettingsHelper.launchSettingsPage(getInstrumentation().getContext(), in testLocationSettingsElements()
135 SettingsHelper.launchSettingsPage(getInstrumentation().getContext(), in testLocationSettingsOverflowMenuElements()
157 SettingsHelper.launchSettingsPage(getInstrumentation().getContext(), in verifyLocationSettingsMode()
179 Settings.Secure.getInt(getInstrumentation().getContext().getContentResolver(), in verifyLocationSettingsMode()
188 Settings.Secure.putInt(getInstrumentation().getContext().getContentResolver(), in verifyLocationSettingsOnOrOff()
[all …]
DMoreWirelessSettingsTests.java40 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
73 SettingsHelper.launchSettingsPage(getInstrumentation().getContext(), in testTetheringMenuLoad()
86 SettingsHelper.launchSettingsPage(getInstrumentation().getContext(), in testVPNMenuLoad()
99 Settings.Global.putString(getInstrumentation().getContext().getContentResolver(), in verifyAirplaneModeOnOrOff()
103 Settings.Global.putString(getInstrumentation().getContext().getContentResolver(), in verifyAirplaneModeOnOrOff()
108 .getString(getInstrumentation().getContext().getContentResolver(), in verifyAirplaneModeOnOrOff()
119 SettingsHelper.launchSettingsPage(getInstrumentation().getContext(), in toggleAirplaneModeSwitch()
/packages/services/Mtp/tests/src/com/android/mtp/
DMtpManagerTest.java48 mUsbDevice = TestUtil.setupMtpDevice(getInstrumentation(), mUsbManager, mManager); in setUp()
57 public TestResultInstrumentation getInstrumentation() { in getInstrumentation() method in MtpManagerTest
58 return (TestResultInstrumentation) super.getInstrumentation(); in getInstrumentation()
87 getInstrumentation().show(Arrays.toString(records[0].operationsSupported)); in testOperationsSupported()
94 getInstrumentation().show(Arrays.toString(records[0].eventsSupported)); in testEventsSupported()
101 getInstrumentation().show("deviceKey: " + records[0].deviceKey); in testDeviceKey()
106 getInstrumentation().show("Please take a photo by using connected MTP device."); in testEventObjectAdded()
162 return getInstrumentation().getContext(); in getContext()
/packages/apps/DocumentsUI/perf-tests/src/com/android/documentsui/
DFilesJankPerfTest.java52 final UiDevice device = UiDevice.getInstance(getInstrumentation()); in setUpInLoop()
53 final Context context = getInstrumentation().getTargetContext(); in setUpInLoop()
54 final UiAutomation automation = getInstrumentation().getUiAutomation(); in setUpInLoop()
60 mActivity = getInstrumentation().startActivitySync(intent); in setUpInLoop()
73 final UiDevice device = UiDevice.getInstance(getInstrumentation()); in tearDownInLoop()
92 getInstrumentation().waitForIdleSync(); in testOpenRootJankPerformance()
99 getInstrumentation().waitForIdleSync(); in testFlingJankPerformance()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/
DWebActivityTest.java45 Intent intent = WebActivity.createIntent(getInstrumentation().getTargetContext(), null, in testNoUrl()
51 startActivityOnMainSync(WebActivity.createIntent(getInstrumentation().getTargetContext(), in testUrlLaunched()
55 getInstrumentation().runOnMainSync(() -> in testUrlLaunched()
63 getInstrumentation().runOnMainSync(() -> startActivity(intent, null, null)); in startActivityOnMainSync()
67 public Instrumentation getInstrumentation() { in getInstrumentation() method in WebActivityTest
68 return InstrumentationRegistry.getInstrumentation(); in getInstrumentation()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/
DDialogUiTest.java89 InstrumentationRegistry.getInstrumentation().waitForIdleSync(); in testCreateDialogShows()
100 InstrumentationRegistry.getInstrumentation().waitForIdleSync(); in testCreateDialogShowsDismiss()
108 InstrumentationRegistry.getInstrumentation().waitForIdleSync(); in testCreateDialogShowsDismiss()
117 InstrumentationRegistry.getInstrumentation().waitForIdleSync(); in testCreateDialogShows_textInputEditText_shouldNotTruncateOnPortrait()
137 InstrumentationRegistry.getInstrumentation().waitForIdleSync(); in testCreateDialog_textInputEditText_shouldNotTruncateOnLargeDensity()
158 InstrumentationRegistry.getInstrumentation().waitForIdleSync(); in testCreateDialog_textInputEditText_shouldNotTruncateOnLargerDensity()
178 InstrumentationRegistry.getInstrumentation().waitForIdleSync(); in testCreateDialog_textInputEditText_shouldNotTruncateOnLargestDensity()
192 InstrumentationRegistry.getInstrumentation().waitForIdleSync(); in testCreateDirectoryFragmentShows_textInputEditText_shouldNotTruncateOnLandscape()
199 InstrumentationRegistry.getInstrumentation().waitForIdleSync(); in testCreateDirectoryFragmentShows_textInputEditText_shouldNotTruncateOnLandscape()
343 return runShellCommand(InstrumentationRegistry.getInstrumentation(), cmd); in executeShellCommand()
DActionCreateDocumentUiTest.java19 import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
64 UiAutomation automation = getInstrumentation().getUiAutomation(); in setup()
66 mDevice = UiDevice.getInstance(getInstrumentation()); in setup()
67 mTargetContext = getInstrumentation().getTargetContext(); in setup()
68 mContext = getInstrumentation().getContext(); in setup()
/packages/apps/Settings/tests/unit/src/com/android/settings/password/
DSetupChooseLockGenericTest.java21 import static androidx.test.InstrumentationRegistry.getInstrumentation;
58 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
59 mContext = getInstrumentation().getTargetContext(); in setUp()
79 getInstrumentation().getContext().startActivity(newPasswordIntent); in clickSkipFigerprintPreference_deviceNotProvisioned_shouldBeAbleToProceed()
88 getInstrumentation().waitForIdleSync(); in getCurrentActivity()
90 getInstrumentation().runOnMainSync(() -> { in getCurrentActivity()
DChooseLockGenericTest.java19 import static androidx.test.InstrumentationRegistry.getInstrumentation;
86 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
87 mTargetContext = getInstrumentation().getTargetContext(); in setUp()
138 getInstrumentation().waitForIdleSync(); in getCurrentActivity()
140 getInstrumentation().runOnMainSync(() -> { in getCurrentActivity()
156 getInstrumentation().getContext().startActivity(newPasswordIntent); in setPassword()
198 getInstrumentation().getContext().startActivity(newPasswordIntent); in clearPassword()
/packages/apps/Launcher3/quickstep/tests/src/com/android/quickstep/
DNavigationModeSwitchRule.java19 import static androidx.test.InstrumentationRegistry.getInstrumentation;
77 SysUINavigationMode.INSTANCE.get(getInstrumentation().getTargetContext());
92 final Context context = getInstrumentation().getContext(); in apply()
156 getInstrumentation().
170 UiDevice.getInstance(getInstrumentation()).executeShellCommand(
175 final Context targetContext = getInstrumentation().getTargetContext();
212 PackageManager pm = getInstrumentation().getContext().getPackageManager();
/packages/apps/Contacts/tests/src/com/android/contacts/interactions/
DContactDeletionInteractionTest.java72 mUtils = new IntegrationTestUtils(getInstrumentation()); in setUp()
73 mUtils.acquireScreenWakeLock(getInstrumentation().getTargetContext()); in setUp()
75 mContext = new ContactsMockContext(getInstrumentation().getTargetContext()); in setUp()
143 getInstrumentation().runOnMainSync(new Runnable() { in assertWithMessageId()
151 getInstrumentation().waitForIdleSync(); in assertWithMessageId()
155 getInstrumentation().waitForIdleSync(); in assertWithMessageId()
/packages/apps/Camera2/tests/src/com/android/camera/functional/
DCameraTest.java38 intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); in testVideoCaptureIntentFdLeak()
43 getInstrumentation().startActivitySync(intent).finish(); in testVideoCaptureIntentFdLeak()
60 intent.setClass(getInstrumentation().getTargetContext(), in checkActivityLeak()
65 Activity activity = getInstrumentation().startActivitySync(intent); in checkActivityLeak()
68 getInstrumentation().waitForIdleSync(); in checkActivityLeak()
/packages/apps/LegacyCamera/tests/src/com/android/camera/functional/
DCameraTest.java44 intent.setClass(getInstrumentation().getTargetContext(), VideoCamera.class); in testVideoCaptureIntentFdLeak()
49 getInstrumentation().startActivitySync(intent).finish(); in testVideoCaptureIntentFdLeak()
66 intent.setClass(getInstrumentation().getTargetContext(), cls); in checkActivityLeak()
70 Activity activity = getInstrumentation().startActivitySync(intent); in checkActivityLeak()
73 getInstrumentation().waitForIdleSync(); in checkActivityLeak()
DImageCaptureIntentTest.java149 getInstrumentation().sendKeySync( in takePicture()
151 getInstrumentation().sendCharacterSync(KeyEvent.KEYCODE_CAMERA); in takePicture()
156 getInstrumentation().runOnMainSync(new Runnable() { in pressDone()
164 getInstrumentation().runOnMainSync(new Runnable() { in pressRetake()
172 getInstrumentation().runOnMainSync(new Runnable() { in pressCancel()
/packages/apps/TV/tests/common/src/com/android/tv/testing/activities/
DBaseMainActivityTestCase.java18 import static androidx.test.InstrumentationRegistry.getInstrumentation;
53 getInstrumentation() in setUp()
64 getInstrumentation().getTargetContext().unbindService(mConnection); in tearDown()
75 getInstrumentation() in tuneToChannel()
89 getInstrumentation().waitForIdleSync(); in waitUntilChannelLoadingFinish()
/packages/apps/Settings/tests/unit/src/com/android/settings/biometrics/fingerprint/
DFingerprintEnrollIntroductionTest.java62 mContext = new TestContext(getInstrumentation().getTargetContext()); in setUp()
65 getInstrumentation().runOnMainSync(() -> { in setUp()
78 getInstrumentation().runOnMainSync(() -> { in testMaxFingerprint_shouldShowErrorMessage()
79 getInstrumentation().callActivityOnCreate(mActivity, null); in testMaxFingerprint_shouldShowErrorMessage()
80 getInstrumentation().callActivityOnResume(mActivity); in testMaxFingerprint_shouldShowErrorMessage()
/packages/apps/Settings/tests/anomaly-tester/src/com/android/settings/anomaly/tests/
DWakelockAnomalyTest.java52 final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in setUp()
64 TestUtils.tearDown(InstrumentationRegistry.getInstrumentation()); in tearDown()
82 Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in testWakelockAnomaly_longTimeWhileRunning_report()
103 Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in testWakelockAnomaly_shortTime_notReport()
126 Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in testWakelockAnomaly_longTimeWhileNotRunning_notReport()
DBluetoothAnomalyTest.java52 final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in setUp()
64 TestUtils.tearDown(InstrumentationRegistry.getInstrumentation()); in tearDown()
81 Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in testBluetoothAnomaly_longScanningTime_reportAnomaly()
102 Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in testBluetoothAnomaly_shortScanningTime_notReport()
/packages/apps/Messaging/tests/src/com/android/messaging/ui/
DBugleActivityTest.java39 new ActivityInstrumentationTestCaseIntent(getInstrumentation().getTargetContext(), in setUp()
43 FakeFactory.register(getInstrumentation().getTargetContext()) in setUp()
48 getInstrumentation().callActivityOnStart(getActivity()); in testOnResumeDataModelCallback()
49 getInstrumentation().callActivityOnResume(getActivity()); in testOnResumeDataModelCallback()
DFragmentTestCase.java69 getInstrumentation().waitForIdleSync(); in attachFragment()
86 if (this.getInstrumentation().getTargetContext().getResources(). in tearDown()
104 getInstrumentation().waitForIdleSync(); in clickButton()
118 getInstrumentation().waitForIdleSync(); in setFocus()
/packages/apps/Launcher3/tests/src/com/android/launcher3/util/
DTestUtil.java19 import static androidx.test.InstrumentationRegistry.getInstrumentation;
38 final String apkFilename = getInstrumentation().getTargetContext(). in installDummyApp()
51 UiDevice.getInstance(getInstrumentation()).executeShellCommand("pm install " + apkFilename); in installDummyApp()
55 UiDevice.getInstance(getInstrumentation()).executeShellCommand( in uninstallDummyApp()
/packages/apps/Camera2/tests/src/com/android/camera/stress/
DVideoCapture.java86 Instrumentation inst = getInstrumentation(); in testBackVideoCapture()
89 intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); in testBackVideoCapture()
100 Instrumentation inst = getInstrumentation(); in testFrontVideoCapture()
103 intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); in testFrontVideoCapture()
/packages/apps/DocumentsUI/app-perf-tests/src/com/android/documentsui/
DFilesAppPerfTest.java53 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
75 mActivity = launchActivity(getInstrumentation().getTargetContext().getPackageName(), in runFilesStartPerformanceTest()
91 getInstrumentation().sendStatus(Activity.RESULT_OK, status); in reportMetrics()
95 final Context context = getInstrumentation().getContext(); in killProviders()

12345678910