Home
last modified time | relevance | path

Searched refs:testContext (Results 1 – 25 of 30) sorted by relevance

12

/aosp12/frameworks/base/core/tests/coretests/src/android/content/
H A DContextTest.java72 final Context testContext = in testDisplayIdForTestContext() local
75 assertEquals(testContext.getDisplayNoVerify().getDisplayId(), testContext.getDisplayId()); in testDisplayIdForTestContext()
80 final Context testContext = in testDisplayIdForDefaultDisplayContext() local
84 testContext.createDisplayContext(dm.getDisplay(DEFAULT_DISPLAY)); in testDisplayIdForDefaultDisplayContext()
92 final Context testContext = in testStartActivityAsUserNullIntentNullUser() local
94 testContext.startActivityAsUser(null, null); in testStartActivityAsUserNullIntentNullUser()
99 final Context testContext = in testStartActivityAsUserNullIntentNonNullUser() local
101 testContext.startActivityAsUser(null, new UserHandle(UserHandle.USER_ALL)); in testStartActivityAsUserNullIntentNonNullUser()
106 final Context testContext = in testStartActivityAsUserNonNullIntentNullUser() local
108 testContext.startActivityAsUser(new Intent(), null); in testStartActivityAsUserNonNullIntentNullUser()
[all …]
/aosp12/packages/apps/DocumentsUI/tests/common/com/android/documentsui/dirlist/
H A DTestEnvironment.java29 private final Context testContext; field in TestEnvironment
33 public TestEnvironment(Context testContext, TestEnv env, ActionHandler actionHandler) { in TestEnvironment() argument
34 this.testContext = testContext; in TestEnvironment()
80 return testContext; in getContext()
/aosp12/frameworks/base/core/tests/coretests/src/android/view/inputmethod/
H A DInputMethodManagerTest.java45 final Context testContext = InstrumentationRegistry.getInstrumentation() in testPrivateApiGetInstance() local
48 final DisplayManager dm = testContext.getSystemService(DisplayManager.class); in testPrivateApiGetInstance()
50 testContext.createDisplayContext(dm.getDisplay(DEFAULT_DISPLAY)); in testPrivateApiGetInstance()
/aosp12/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/dirlist/
H A DModelBackedDocumentsAdapterTest.java42 final Context testContext = TestContext.createStorageTestContext(getContext(), AUTHORITY); in setUp() local
46 DocumentsAdapter.Environment env = new TestEnvironment(testContext, mEnv, mActionHandler); in setUp()
50 new IconHelper(testContext, State.MODE_GRID, /* maybeShowBadge= */ false), in setUp()
H A DDirectoryAddonsAdapterTest.java52 final Context testContext = TestContext.createStorageTestContext(getContext(), AUTHORITY); in setUp() local
53 DocumentsAdapter.Environment env = new TestEnvironment(testContext, mEnv, mActionHandler); in setUp()
59 new IconHelper(testContext, State.MODE_GRID, /* maybeShowBadge= */ false), in setUp()
/aosp12/build/soong/dexpreopt/
H A Dclass_loader_context_test.go50 ctx := testContext()
159 ctx := testContext()
183 ctx := testContext()
218 ctx := testContext()
229 ctx := testContext()
276 func testContext() android.ModuleInstallPathContext { func
/aosp12/frameworks/base/libs/hwui/tests/macrobench/
H A DTestSceneRunner.cpp108 TestContext testContext; in doRun() local
109 testContext.setRenderOffscreen(opts.renderOffscreen); in doRun()
115 sp<Surface> surface = testContext.surface(); in doRun()
141 testContext.waitForVsync(); in doRun()
157 testContext.waitForVsync(); in doRun()
/aosp12/packages/apps/Car/Launcher/tests/src/com/android/car/carlauncher/
H A DAppLauncherUtilsTest.java183 Context testContext = in getAutomotiveAppTypes() local
188 testContext.getPackageManager(), in getAutomotiveAppTypes()
189 testContext.getPackageName())); in getAutomotiveAppTypes()
195 Context testContext = in videoAppPredicate() local
198 new AppLauncherUtils.VideoAppPredicate(testContext.getPackageManager()); in videoAppPredicate()
200 assertTrue(predicate.test(constructServiceResolveInfo(testContext.getPackageName()))); in videoAppPredicate()
/aosp12/build/soong/apex/
H A Dclasspath_element_test.go31 testContext *android.TestContext member
37 return t.testContext.ModuleHasProvider(module, provider)
41 return t.testContext.ModuleProvider(module, provider)
45 t.errs = append(t.errs, t.testContext.ModuleErrorf(t.module, fmt, args...))
235 return &testClasspathElementContext{testContext: result.TestContext, module: bootclasspath}
/aosp12/frameworks/base/test-runner/src/android/test/
H A DAndroidTestRunner.java191 Context testContext = mInstrumentation == null ? mContext : mInstrumentation.getContext(); in runTest() local
193 setContextIfAndroidTestCase(testCase, mContext, testContext); in runTest()
199 private void setContextIfAndroidTestCase(Test test, Context context, Context testContext) { in setContextIfAndroidTestCase() argument
202 ((AndroidTestCase) test).setTestContext(testContext); in setContextIfAndroidTestCase()
/aosp12/frameworks/base/services/tests/mockingservicestests/src/com/android/server/appop/
H A DAppOpsUpgradeTest.java146 Context testContext = spy(mContext); in testUpgradeFromNoVersion() local
149 doNothing().when(testContext).enforcePermission(anyString(), anyInt(), anyInt(), in testUpgradeFromNoVersion()
153 when(testContext.getPackageManager()).thenReturn(testPM); in testUpgradeFromNoVersion()
159 new AppOpsService(mAppOpsFile, mHandler, testContext)); // trigger upgrade in testUpgradeFromNoVersion()
/aosp12/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/parser/
H A DDisclaimersParserImplTest.java83 Context testContext = InstrumentationRegistry.getContext(); in setUpClass() local
88 DISCLAIMER_URI_1 = TestUtils.resourceToUri(testContext, R.raw.test_disclaimer1); in setUpClass()
91 DISCLAIMER_URI_2 = TestUtils.resourceToUri(testContext, R.raw.test_disclaimer2); in setUpClass()
94 DISCLAIMER_URI_3 = TestUtils.resourceToUri(testContext, R.raw.test_disclaimer3); in setUpClass()
/aosp12/packages/modules/Connectivity/framework/src/android/net/
H A DConnectivityResources.java63 public static void setResourcesContextForTest(@Nullable Context testContext) { in setResourcesContextForTest() argument
64 sTestResourcesContext = testContext; in setResourcesContextForTest()
/aosp12/build/soong/ui/build/
H A Dconfig_test.go32 func testContext() Context { func
42 ctx := testContext()
114 ctx := testContext()
183 ctx := testContext()
345 ctx := testContext()
526 ctx := testContext()
728 ctx := testContext()
H A Drbe_test.go29 ctx := testContext()
84 ctx := testContext()
H A Dupload_test.go76 ctx := testContext()
151 ctx := testContext()
/aosp12/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/archives/
H A DTestUtils.java38 public TestUtils(Context targetContext, Context testContext, ExecutorService executor) { in TestUtils() argument
40 mTestContext = testContext; in TestUtils()
/aosp12/packages/apps/Car/libs/car-ui-lib/paintbooth/src/main/java/com/android/car/ui/paintbooth/appstyledview/
H A DAppStyledViewSampleActivity.java65 Context testContext = createConfigurationContext(config); in onCreate() local
67 Context contextThemeWrapper = new ContextThemeWrapper(testContext, in onCreate()
/aosp12/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
H A DNetworkScoreTest.kt54 private val testContext: Context
66 private val mCm = testContext.getSystemService(ConnectivityManager::class.java)
130 val context = testContext
/aosp12/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/
H A DMoreKeySpecStringReferenceTests.java47 final Context testContext = instrumentation.getContext(); in setUp() local
48 final Resources testRes = testContext.getResources(); in setUp()
/aosp12/build/soong/android/
H A Dfixture.go612 type testContext struct { struct
618 testContext anonMember
777 testContext: testContext{ctx},
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/utils/
H A DTraceBufferTest.java56 final Context testContext = getInstrumentation().getContext(); in setUp() local
57 mFile = testContext.getFileStreamPath("tracing_test.dat"); in setUp()
/aosp12/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
H A DWindowTracingTest.java87 final Context testContext = getInstrumentation().getContext(); in setUp() local
88 mFile = testContext.getFileStreamPath("tracing_test.dat"); in setUp()
/aosp12/frameworks/base/libs/hwui/tests/unit/
H A DSkiaDisplayListTests.cpp207 test::TestContext testContext; in RENDERTHREAD_SKIA_PIPELINE_TEST() local
208 testContext.setRenderOffscreen(true); in RENDERTHREAD_SKIA_PIPELINE_TEST()
209 auto surface = testContext.surface(); in RENDERTHREAD_SKIA_PIPELINE_TEST()
/aosp12/packages/apps/Launcher3/tests/src/com/android/launcher3/util/
H A DLauncherModelHelper.java101 public static final String TEST_PACKAGE = testContext().getPackageName();
230 Resources resources = testContext().getResources(); in initializeData()
232 resourceName, "raw", testContext().getPackageName()); in initializeData()
559 private static Context testContext() { in testContext() method in LauncherModelHelper

12