Home
last modified time | relevance | path

Searched refs:mShadowContext (Results 1 – 6 of 6) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DButtonActionDialogFragmentTest.java59 private Context mShadowContext; field in ButtonActionDialogFragmentTest
64 mShadowContext = RuntimeEnvironment.application; in setUp()
67 doReturn(mShadowContext).when(mFragment).getContext(); in setUp()
88 mShadowContext.getString(R.string.force_stop_dlg_text)); in testOnCreateDialog_forceStopDialog()
90 mShadowContext.getString(R.string.force_stop_dlg_title)); in testOnCreateDialog_forceStopDialog()
92 mShadowContext.getString(R.string.dlg_ok)); in testOnCreateDialog_forceStopDialog()
94 mShadowContext.getString(R.string.dlg_cancel)); in testOnCreateDialog_forceStopDialog()
107 mShadowContext.getString(R.string.app_disable_dlg_text)); in testOnCreateDialog_disableDialog()
109 mShadowContext.getString(R.string.app_disable_dlg_positive)); in testOnCreateDialog_disableDialog()
111 mShadowContext.getString(R.string.dlg_cancel)); in testOnCreateDialog_disableDialog()
[all …]
DPowerUsageAdvancedTest.java99 private Context mShadowContext; field in PowerUsageAdvancedTest
105 mShadowContext = spy(RuntimeEnvironment.application); in setUp()
119 doReturn(mDischargingBatteryIntent).when(mShadowContext).registerReceiver(any(), any()); in setUp()
124 when(mPowerUsageAdvanced.getContext()).thenReturn(mShadowContext); in setUp()
127 doReturn(mShadowContext.getText(R.string.battery_used_for)).when( in setUp()
132 mPowerUsageAdvanced.setBatteryUtils(BatteryUtils.getInstance(mShadowContext)); in setUp()
133 when(mShadowContext.getSystemService(Context.CONNECTIVITY_SERVICE)).thenReturn( in setUp()
144 PreferenceManager pm = new PreferenceManager(mShadowContext); in testPrefs_shouldNotBeSelectable()
146 PreferenceGroup prefGroup = spy(new PreferenceCategory(mShadowContext)); in testPrefs_shouldNotBeSelectable()
DBackgroundActivityPreferenceControllerTest.java76 private Context mShadowContext; field in BackgroundActivityPreferenceControllerTest
82 mShadowContext = RuntimeEnvironment.application; in setUp()
98 mPreference = new SwitchPreference(mShadowContext); in setUp()
151 final CharSequence expectedSummary = mShadowContext.getText( in testUpdateSummary_modeError_showSummaryDisabled()
163 final CharSequence expectedSummary = mShadowContext.getText( in testUpdateSummary_modeDefault_showSummaryOn()
176 final CharSequence expectedSummary = mShadowContext.getText( in testUpdateSummary_modeIgnored_showSummaryOff()
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/
DEntityHeaderControllerTest.java71 private Context mShadowContext; field in EntityHeaderControllerTest
81 mShadowContext = RuntimeEnvironment.application; in setUp()
82 when(mActivity.getApplicationContext()).thenReturn(mShadowContext); in setUp()
84 when(mFragment.getContext()).thenReturn(mShadowContext); in setUp()
85 mLayoutInflater = LayoutInflater.from(mShadowContext); in setUp()
101 Preference preference = mController.done(mActivity, mShadowContext); in testBuildView_withContext_shouldBuildPreference()
126 mController.setIcon(mShadowContext.getDrawable(R.drawable.ic_add)); in bindViews_shouldBindAllData()
241 mController.setIcon(mShadowContext.getDrawable(R.drawable.ic_add)); in iconContentDescription_shouldWorkWithSetIcon()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DAppInfoWithHeaderTest.java127 Context mShadowContext; field in AppInfoWithHeaderTest.TestFragment
136 mShadowContext = ShadowApplication.getInstance().getApplicationContext(); in TestFragment()
139 when(mManager.getContext()).thenReturn(mShadowContext); in TestFragment()
169 return mShadowContext; in getContext()
DInstalledAppDetailsTest.java127 private Context mShadowContext; field in InstalledAppDetailsTest
135 mShadowContext = RuntimeEnvironment.application; in setUp()
139 mBatteryPreference = new Preference(mShadowContext); in setUp()
147 doReturn(mShadowContext).when(mAppDetail).getContext(); in setUp()
444 doReturn(mShadowContext.getString(R.string.no_battery_summary)).when(mAppDetail).getString( in updateBattery_noBatteryStats_summaryNo()
458 doReturn(mShadowContext.getString(R.string.battery_summary, BATTERY_LEVEL_STRING)).when( in updateBattery_hasBatteryStats_summaryPercent()