Home
last modified time | relevance | path

Searched refs:mTestContext (Results 1 – 8 of 8) sorted by relevance

/frameworks/base/packages/Shell/tests/src/com/android/shell/
DBugreportProgressServiceTest.java91 private final MyContext mTestContext = new MyContext(); field in BugreportProgressServiceTest
107 final Pair<UserHandle, Account> actual = findSendToAccount(mTestContext, preferredDomain); in checkFindSendToAccount()
114 when(mTestContext.userManager.getUserProfiles()).thenReturn( in findSendToAccount_noWorkProfile()
118 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
121 assertNull(findSendToAccount(mTestContext, null)); in findSendToAccount_noWorkProfile()
122 assertNull(findSendToAccount(mTestContext, "")); in findSendToAccount_noWorkProfile()
123 assertNull(findSendToAccount(mTestContext, "android.com")); in findSendToAccount_noWorkProfile()
124 assertNull(findSendToAccount(mTestContext, "@android.com")); in findSendToAccount_noWorkProfile()
127 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
138 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/appwidget/
DAppWidgetServiceImplTest.java89 private TestContext mTestContext; field in AppWidgetServiceImplTest
108 mTestContext = new TestContext(); in setUp()
109 mPkgName = mTestContext.getOpPackageName(); in setUp()
110 mService = new AppWidgetServiceImpl(mTestContext); in setUp()
111 mManager = new AppWidgetManager(mTestContext, mService); in setUp()
129 assertEquals(info.loadDescription(mTestContext), "widget description string"); in testLoadDescription()
155 if (!provider.provider.getPackageName().equals(mTestContext.getPackageName())) { in testRequestPinAppWidget_otherProvider()
167 ComponentName provider = new ComponentName(mTestContext, TestAppWidgetProvider.class); in testRequestPinAppWidget()
296 testAppWidgetProvider.onReceive(mTestContext, intent); in testReceiveBroadcastBehavior_enableAndUpdate()
374 final File file = new File(mTestContext.getDataDir(), "appwidget_provider_info.xml"); in testWidgetProviderInfoPersistence()
[all …]
/frameworks/base/test-base/src/android/test/
DAndroidTestCase.java42 private Context mTestContext; field in AndroidTestCase
76 mTestContext = context; in setTestContext()
83 return mTestContext; in getTestContext()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/
DOneHandedTestCase.java48 public TestableContext mTestContext = new TestableContext( field in OneHandedTestCase
70 return mTestContext; in getTestContext()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/startingsurface/
DStartingSurfaceDrawerTests.java107 private final TestableContext mTestContext = new TestContext( field in StartingSurfaceDrawerTests
161 final WindowManager realWindowManager = mTestContext.getSystemService(WindowManager.class); in setUp()
163 mTestContext.addMockSystemService(WindowManager.class, mMockWindowManager); in setUp()
169 new TestStartingSurfaceDrawer(mTestContext, mTestExecutor, mIconProvider, in setUp()
211 final String packageName = mTestContext.getPackageName(); in testColorCache()
232 colorCache.onReceive(mTestContext, packageRemoved); in testColorCache()
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DOverlayPackagesProviderTest.java85 private @Mock Context mTestContext; field in OverlayPackagesProviderTest
98 when(mTestContext.getResources()).thenReturn(mResources); in setUp()
99 when(mTestContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
100 when(mTestContext.getFilesDir()).thenReturn( in setUp()
118 mHelper = new OverlayPackagesProvider(mTestContext, mInjector); in setUp()
/frameworks/base/services/tests/servicestests/src/com/android/server/job/
DJobStoreTest.java65 Context mTestContext; field in JobStoreTest
73 mTestContext = new RenamingDelegatingContext(getContext(), TEST_PREFIX); in setUp()
74 Log.d(TAG, "Saving tasks to '" + mTestContext.getFilesDir() + "'"); in setUp()
76 JobStore.initAndGetForTesting(mTestContext, mTestContext.getFilesDir()); in setUp()
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/
DAccountManagerServiceTest.java379 Context originalContext = ((MyMockContext)getContext()).mTestContext; in testRemovedAccountSync()
406 Context originalContext = ((MyMockContext) getContext()).mTestContext; in testPreNDatabaseMigration()
3459 private Context mTestContext; field in AccountManagerServiceTest.MyMockContext
3463 this.mTestContext = testContext; in MyMockContext()
3475 return mTestContext.bindServiceAsUser(service, conn, flags, user); in bindServiceAsUser()
3480 mTestContext.unbindService(conn); in unbindService()
3490 return mTestContext.getPackageName(); in getPackageName()
3523 return mTestContext.openOrCreateDatabase(file, mode, factory,errorHandler); in openOrCreateDatabase()
3528 return mTestContext.getDatabasePath(name); in getDatabasePath()