Home
last modified time | relevance | path

Searched refs:mFragment (Results 1 – 25 of 360) sorted by relevance

12345678910>>...15

/packages/apps/Settings/tests/robotests/src/com/android/settings/users/
DUserDetailsSettingsTest.java113 private UserDetailsSettings mFragment; field in UserDetailsSettingsTest
125 mFragment = spy(new UserDetailsSettings()); in setUp()
134 ReflectionHelpers.setField(mFragment, "mUserManager", userManager); in setUp()
135 ReflectionHelpers.setField(mFragment, "mUserCaps", mUserCapabilities); in setUp()
136 ReflectionHelpers.setField(mFragment, "mMetricsFeatureProvider", mMetricsFeatureProvider); in setUp()
137 doReturn(mActivity).when(mFragment).getActivity(); in setUp()
138 doReturn(mActivity).when(mFragment).getContext(); in setUp()
140 doReturn(mock(PreferenceScreen.class)).when(mFragment).getPreferenceScreen(); in setUp()
142 doReturn(mSwitchUserPref).when(mFragment).findPreference(KEY_SWITCH_USER); in setUp()
143 doReturn(mPhonePref).when(mFragment).findPreference(KEY_ENABLE_TELEPHONY); in setUp()
[all …]
DUserSettingsTest.java121 private UserSettings mFragment; field in UserSettingsTest
132 mFragment = spy(new UserSettings()); in setUp()
133 ReflectionHelpers.setField(mFragment, "mAddUserWhenLockedPreferenceController", in setUp()
135 ReflectionHelpers.setField(mFragment, "mMultiUserTopIntroPreferenceController", in setUp()
137 ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager); in setUp()
138 ReflectionHelpers.setField(mFragment, "mUserCaps", mUserCapabilities); in setUp()
139 ReflectionHelpers.setField(mFragment, "mDefaultIconDrawable", mDefaultIconDrawable); in setUp()
140 ReflectionHelpers.setField(mFragment, "mAddingUser", false); in setUp()
141 ReflectionHelpers.setField(mFragment, "mMetricsFeatureProvider", mMetricsFeatureProvider); in setUp()
145 doReturn(mActivity).when(mFragment).getActivity(); in setUp()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DDeviceListPreferenceFragmentTest.java61 private TestFragment mFragment; field in DeviceListPreferenceFragmentTest
68 mFragment = spy(new TestFragment()); in setUp()
69 doReturn(mContext).when(mFragment).getContext(); in setUp()
70 doReturn(mResource).when(mFragment).getResources(); in setUp()
71 mFragment.mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in setUp()
78 doReturn(FOOTAGE_MAC_STRING).when(mFragment) in setUpdateMyDevicePreference_setTitleCorrectly()
81 mFragment.updateFooterPreference(mMyDevicePreference); in setUpdateMyDevicePreference_setTitleCorrectly()
88 mFragment.enableScanning(); in testEnableDisableScanning_testStateAfterEanbleDisable()
89 verify(mFragment).startScanning(); in testEnableDisableScanning_testStateAfterEanbleDisable()
90 assertThat(mFragment.mScanEnabled).isTrue(); in testEnableDisableScanning_testStateAfterEanbleDisable()
[all …]
DBluetoothPairingDetailTest.java78 private BluetoothPairingDetail mFragment; field in BluetoothPairingDetailTest
92 mFragment = spy(new BluetoothPairingDetail()); in setUp()
93 doReturn(mContext).when(mFragment).getContext(); in setUp()
94 doReturn(mResource).when(mFragment).getResources(); in setUp()
104 mFragment.mBluetoothAdapter = mBluetoothAdapter; in setUp()
105 mFragment.mLocalManager = mLocalManager; in setUp()
106 mFragment.mDeviceListGroup = mPreferenceGroup; in setUp()
107 mFragment.mAlwaysDiscoverable = new AlwaysDiscoverable(mContext); in setUp()
112 doReturn(mAvailableDevicesCategory).when(mFragment) in initPreferencesFromPreferenceScreen_findPreferences()
114 doReturn(mFooterPreference).when(mFragment) in initPreferencesFromPreferenceScreen_findPreferences()
[all …]
DDevicePickerFragmentTest.java49 private DevicePickerFragment mFragment; field in DevicePickerFragmentTest
56 mFragment = new DevicePickerFragment(); in setUp()
58 mFragment.mContext = mContext; in setUp()
59 mFragment.mAvailableDevicesCategory = mAvailableDevicesCategory; in setUp()
64 mFragment.mScanEnabled = true; in testScanningStateChanged_started_setProgressStarted()
66 mFragment.onScanningStateChanged(true); in testScanningStateChanged_started_setProgressStarted()
77 mFragment.mSelectedDevice = bluetoothDevice; in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage()
78 mFragment.mLaunchPackage = "com.android.settings"; in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage()
79 mFragment.mLaunchClass = "com.android.settings.bluetooth.BluetoothPermissionActivity"; in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage()
80 mFragment.mCallingAppPackageName = "com.android.settings"; in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/p2p/
DWifiP2pSettingsTest.java70 private WifiP2pSettings mFragment; field in WifiP2pSettingsTest
89 mFragment = new WifiP2pSettings(); in setUp()
90 mFragment.mWifiP2pManager = mWifiP2pManager; in setUp()
94 fragmentTransaction.add(mFragment, null); in setUp()
101 mFragment.getPreferenceScreenResId()); in preferenceScreenKey_shouldContainsAllControllerKeys()
104 for (AbstractPreferenceController controller : mFragment.createPreferenceControllers( in preferenceScreenKey_shouldContainsAllControllerKeys()
114 mFragment.onActivityCreated(null); in onActivityCreate_withNullBundle_canNotGetValue()
116 assertThat(mFragment.mSelectedWifiPeer).isNull(); in onActivityCreate_withNullBundle_canNotGetValue()
125 mFragment.onActivityCreated(bundle); in onActivityCreate_withDeviceName_shouldGetDeviceName()
127 assertThat(mFragment.mSavedDeviceName).isEqualTo(fakeDeviceName); in onActivityCreate_withDeviceName_shouldGetDeviceName()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/
DAppDataUsageTest.java94 private AppDataUsage mFragment; field in AppDataUsageTest
109 mFragment = spy(new AppDataUsage()); in onCreate_appUid_shouldGetAppLabelFromAppInfo()
112 doReturn(activity).when(mFragment).getActivity(); in onCreate_appUid_shouldGetAppLabelFromAppInfo()
113 doReturn(RuntimeEnvironment.application).when(mFragment).getContext(); in onCreate_appUid_shouldGetAppLabelFromAppInfo()
114 ReflectionHelpers.setField(mFragment, "mDashboardFeatureProvider", in onCreate_appUid_shouldGetAppLabelFromAppInfo()
129 mFragment.setArguments(args); in onCreate_appUid_shouldGetAppLabelFromAppInfo()
131 mFragment.onCreate(Bundle.EMPTY); in onCreate_appUid_shouldGetAppLabelFromAppInfo()
133 assertThat(mFragment.mLabel).isEqualTo(label); in onCreate_appUid_shouldGetAppLabelFromAppInfo()
139 mFragment = spy(new AppDataUsage()); in onCreate_notAppUid_shouldGetAppLabelFromUidDetailProvider()
140 ReflectionHelpers.setField(mFragment, "mDashboardFeatureProvider", in onCreate_notAppUid_shouldGetAppLabelFromUidDetailProvider()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/usb/
DUsbDefaultFragmentTest.java60 private UsbDefaultFragment mFragment; field in UsbDefaultFragmentTest
65 mFragment = new TestFragment(); in setUp()
66 mFragment.mUsbBackend = mUsbBackend; in setUp()
67 mFragment.mTetheringManager = mTetheringManager; in setUp()
68 mFragment.mHandler = mHandler; in setUp()
74 assertThat(mFragment.getDefaultKey()) in getDefaultKey_isNone_shouldReturnNone()
81 assertThat(mFragment.getDefaultKey()) in getDefaultKey_isMtp_shouldReturnMtp()
88 assertThat(mFragment.getDefaultKey()) in getDefaultKey_isPtp_shouldReturnPtp()
95 assertThat(mFragment.getDefaultKey()) in getDefaultKey_isRndis_shouldReturnRndis()
102 assertThat(mFragment.getDefaultKey()) in getDefaultKey_isMidi_shouldReturnMidi()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/display/
DColorModePreferenceFragmentTest.java47 private ColorModePreferenceFragment mFragment; field in ColorModePreferenceFragmentTest
55 mFragment = spy(new ColorModePreferenceFragment()); in setup()
56 doNothing().when(mFragment).setColorMode(anyInt()); in setup()
61 assertThat(mFragment.getMetricsCategory()) in verifyMetricsConstant()
77 mFragment.onAttach(mContext); in getCandidates_all()
79 final List<? extends CandidateInfo> candidates = mFragment.getCandidates(); in getCandidates_all()
83 .isEqualTo(mFragment.getKeyForColorMode(ColorDisplayManager.COLOR_MODE_NATURAL)); in getCandidates_all()
85 .isEqualTo(mFragment.getKeyForColorMode(ColorDisplayManager.COLOR_MODE_BOOSTED)); in getCandidates_all()
87 .isEqualTo(mFragment.getKeyForColorMode(ColorDisplayManager.COLOR_MODE_SATURATED)); in getCandidates_all()
89 .isEqualTo(mFragment.getKeyForColorMode(ColorDisplayManager.COLOR_MODE_AUTOMATIC)); in getCandidates_all()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/manageapplications/
DManageApplicationsTest.java100 private ManageApplications mFragment; field in ManageApplicationsTest
114 mFragment = spy(new ManageApplications()); in setUp()
115 when(mFragment.getContext()).thenReturn(mContext); in setUp()
116 when(mFragment.getActivity()).thenReturn(mActivity); in setUp()
117 ReflectionHelpers.setField(mFragment, "mUserManager", in setUp()
128 ReflectionHelpers.setField(mFragment, "mListType", LIST_TYPE_MAIN); in updateMenu_mainListType_showAppReset()
129 ReflectionHelpers.setField(mFragment, "mOptionsMenu", mMenu); in updateMenu_mainListType_showAppReset()
131 mFragment.updateOptionsMenu(); in updateMenu_mainListType_showAppReset()
138 ReflectionHelpers.setField(mFragment, "mListType", ManageApplications.LIST_TYPE_HIGH_POWER); in updateMenu_batteryListType_hideAppReset()
139 ReflectionHelpers.setField(mFragment, "mOptionsMenu", mMenu); in updateMenu_batteryListType_hideAppReset()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/
DStorageDashboardFragmentTest.java51 private StorageDashboardFragment mFragment; field in StorageDashboardFragmentTest
56 mFragment = new StorageDashboardFragment(); in setUp()
61 assertThat(mFragment.getCategoryKey()).isEqualTo(CategoryKey.CATEGORY_STORAGE); in testCategory_isConnectedDevice()
68 mFragment.initializeOptionsMenu(activity); in test_initializeOptionsMenuInvalidatesExistingMenu()
78 mFragment = spy(mFragment); in test_loadWhenQuotaOffIfVolumeInfoNotLoaded()
79 when(mFragment.getView()).thenReturn(fakeView); in test_loadWhenQuotaOffIfVolumeInfoNotLoaded()
80 when(mFragment.getListView()).thenReturn(fakeRecyclerView); in test_loadWhenQuotaOffIfVolumeInfoNotLoaded()
82 mFragment.maybeSetLoading(false); in test_loadWhenQuotaOffIfVolumeInfoNotLoaded()
84 verify(mFragment).setLoading(true, false); in test_loadWhenQuotaOffIfVolumeInfoNotLoaded()
92 mFragment = spy(mFragment); in test_dontLoadWhenQuotaOffIfVolumeInfoNotLoaded()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DPowerUsageSummaryTest.java95 private TestFragment mFragment; field in PowerUsageSummaryTest
104 mFragment = spy(new TestFragment(mRealContext)); in setUp()
105 mFragment.initFeatureProvider(); in setUp()
106 doNothing().when(mFragment).restartBatteryStatsLoader(anyInt()); in setUp()
107 doReturn(mock(LoaderManager.class)).when(mFragment).getLoaderManager(); in setUp()
109 when(mFragment.getActivity()).thenReturn(mSettingsActivity); in setUp()
114 mFragment.mBatteryUtils = spy(new BatteryUtils(mRealContext)); in setUp()
115 ReflectionHelpers.setField(mFragment, "mVisibilityLoggerMixin", mVisibilityLoggerMixin); in setUp()
116 ReflectionHelpers.setField(mFragment, "mBatteryBroadcastReceiver", in setUp()
118 doReturn(mPreferenceScreen).when(mFragment).getPreferenceScreen(); in setUp()
[all …]
DAdvancedPowerUsageDetailTest.java133 private AdvancedPowerUsageDetail mFragment; field in AdvancedPowerUsageDetailTest
147 mFragment = spy(new AdvancedPowerUsageDetail()); in setUp()
148 doReturn(mContext).when(mFragment).getContext(); in setUp()
149 doReturn(mActivity).when(mFragment).getActivity(); in setUp()
150 doReturn(SUMMARY).when(mFragment).getString(anyInt()); in setUp()
152 when(mFragment.getArguments()).thenReturn(mBundle); in setUp()
153 doReturn(mLoaderManager).when(mFragment).getLoaderManager(); in setUp()
181 mFragment.mHeaderPreference = mHeaderPreference; in setUp()
182 mFragment.mState = mState; in setUp()
183 mFragment.enableTriState = true; in setUp()
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/common/
DSettingsFragmentTestCase.java67 protected SettingsFragment mFragment; field in SettingsFragmentTestCase
82 mFragment.onCreate(null); in use_returnsController()
83 assertThat(mFragment.use(FakePreferenceController.class, in use_returnsController()
91 mFragment.onCreate(null); in onAttach_registersLifecycleObservers()
92 controller.set(mFragment.use(FakePreferenceController.class, in onAttach_registersLifecycleObservers()
105 mFragment.onCreate(null); in onUxRestrictionsChanged_propagatesToControllers()
106 FakePreferenceController controller = mFragment.use(FakePreferenceController.class, in onUxRestrictionsChanged_propagatesToControllers()
110 mFragment.onUxRestrictionsChanged(uxRestrictions); in onUxRestrictionsChanged_propagatesToControllers()
123 mFragment.onCreate(null); in onUxRestrictedPreferenceTapped_showToast()
124 FakePreferenceController controller = mFragment.use(FakePreferenceController.class, in onUxRestrictedPreferenceTapped_showToast()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/calling/
DWifiCallingSettingsForSubTest.java80 private TestFragment mFragment; field in WifiCallingSettingsForSubTest
116 mFragment = spy(new TestFragment()); in setUp()
117 doReturn(mActivity).when(mFragment).getActivity(); in setUp()
118 doReturn(mContext).when(mFragment).getContext(); in setUp()
120 doReturn(mContext.getResources()).when(mFragment).getResources(); in setUp()
121 doReturn(mPreferenceScreen).when(mFragment).getPreferenceScreen(); in setUp()
124 when(mFragment.getArguments()).thenReturn(bundle); in setUp()
125 doNothing().when(mFragment).addPreferencesFromResource(anyInt()); in setUp()
126 doReturn(mock(ListWithEntrySummaryPreference.class)).when(mFragment).findPreference(any()); in setUp()
127 doReturn(mButtonWfcMode).when(mFragment).findPreference(BUTTON_WFC_MODE); in setUp()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DAppInfoDashboardFragmentTest.java90 private AppInfoDashboardFragment mFragment; field in AppInfoDashboardFragmentTest
97 mFragment = spy(new AppInfoDashboardFragment()); in setUp()
98 doReturn(mActivity).when(mFragment).getActivity(); in setUp()
99 doReturn(mShadowContext).when(mFragment).getContext(); in setUp()
103 ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager); in setUp()
118 ReflectionHelpers.setField(mFragment, "mDpm", mDevicePolicyManager); in shouldShowUninstallForAll_installForOneOtherUserOnly_shouldReturnTrue()
125 ReflectionHelpers.setField(mFragment, "mPackageInfo", packageInfo); in shouldShowUninstallForAll_installForOneOtherUserOnly_shouldReturnTrue()
127 assertThat(mFragment.shouldShowUninstallForAll(appEntry)).isTrue(); in shouldShowUninstallForAll_installForOneOtherUserOnly_shouldReturnTrue()
134 ReflectionHelpers.setField(mFragment, "mDpm", mDevicePolicyManager); in shouldShowUninstallForAll_installForSelfOnly_shouldReturnFalse()
141 ReflectionHelpers.setField(mFragment, "mPackageInfo", packageInfo); in shouldShowUninstallForAll_installForSelfOnly_shouldReturnFalse()
[all …]
DAlarmsAndRemindersDetailsTest.java52 private AlarmsAndRemindersDetails mFragment = new AlarmsAndRemindersDetails(); field in AlarmsAndRemindersDetailsTest
58 ReflectionHelpers.setField(mFragment, "mSwitchPref", mSwitchPref); in setUp()
59 ReflectionHelpers.setField(mFragment, "mAppBridge", mAppStateBridge); in setUp()
64 mFragment.refreshUi(); in refreshUi_noPackageInfo_shouldReturnFalseAndNoCrash()
66 assertThat(mFragment.refreshUi()).isFalse(); in refreshUi_noPackageInfo_shouldReturnFalseAndNoCrash()
72 ReflectionHelpers.setField(mFragment, "mPackageInfo", mPackageInfo); in refreshUi_noApplicationInfo_shouldReturnFalseAndNoCrash()
74 mFragment.refreshUi(); in refreshUi_noApplicationInfo_shouldReturnFalseAndNoCrash()
76 assertThat(mFragment.refreshUi()).isFalse(); in refreshUi_noApplicationInfo_shouldReturnFalseAndNoCrash()
82 ReflectionHelpers.setField(mFragment, "mPackageInfo", mPackageInfo); in refreshUi_hasApplicationInfo_shouldReturnTrue()
87 mFragment.refreshUi(); in refreshUi_hasApplicationInfo_shouldReturnTrue()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
DToggleFeaturePreferenceFragmentTest.java77 private TestToggleFeaturePreferenceFragment mFragment; field in ToggleFeaturePreferenceFragmentTest
88 mFragment = spy(new TestToggleFeaturePreferenceFragment()); in setUpTestFragment()
89 when(mFragment.getPreferenceManager()).thenReturn(mPreferenceManager); in setUpTestFragment()
90 when(mFragment.getPreferenceManager().getContext()).thenReturn(mContext); in setUpTestFragment()
91 when(mFragment.getContext()).thenReturn(mContext); in setUpTestFragment()
94 doReturn(mScreen).when(mFragment).getPreferenceScreen(); in setUpTestFragment()
99 FragmentController.setupFragment(mFragment, FragmentActivity.class, in createFragment_shouldOnlyAddPreferencesOnce()
103 verify(mFragment).addPreferencesFromResource(R.xml.placeholder_prefs); in createFragment_shouldOnlyAddPreferencesOnce()
108 mFragment.mComponentName = PLACEHOLDER_COMPONENT_NAME; in updateShortcutPreferenceData_assignDefaultValueToVariable()
110 mFragment.updateShortcutPreferenceData(); in updateShortcutPreferenceData_assignDefaultValueToVariable()
[all …]
DAccessibilityShortcutPreferenceFragmentTest.java67 private TestAccessibilityShortcutPreferenceFragment mFragment; field in AccessibilityShortcutPreferenceFragmentTest
78 mFragment = spy(new TestAccessibilityShortcutPreferenceFragment()); in setUpTestFragment()
79 when(mFragment.getPreferenceManager()).thenReturn(mPreferenceManager); in setUpTestFragment()
80 when(mFragment.getPreferenceManager().getContext()).thenReturn(mContext); in setUpTestFragment()
81 when(mFragment.getContext()).thenReturn(mContext); in setUpTestFragment()
84 doReturn(mScreen).when(mFragment).getPreferenceScreen(); in setUpTestFragment()
89 mFragment.updateShortcutPreferenceData(); in updateShortcutPreferenceData_assignDefaultValueToVariable()
92 mFragment.getComponentName().flattenToString(), in updateShortcutPreferenceData_assignDefaultValueToVariable()
103 mFragment.updateShortcutPreferenceData(); in updateShortcutPreferenceData_hasValueInSettings_assignToVariable()
106 mFragment.getComponentName().flattenToString(), in updateShortcutPreferenceData_hasValueInSettings_assignToVariable()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/
DContextualCardsFragmentTest.java62 private ContextualCardsFragment mFragment; field in ContextualCardsFragmentTest
71 mFragment = spy(new ContextualCardsFragment()); in setUp()
72 doReturn(mActivity).when(mFragment).getActivity(); in setUp()
73 mFragment.onCreate(null); in setUp()
78 mFragment.onStart(); in onStart_shouldRegisterBothReceivers()
80 verify(mActivity).registerReceiver(eq(mFragment.mKeyEventReceiver), in onStart_shouldRegisterBothReceivers()
82 verify(mActivity).registerReceiver(eq(mFragment.mScreenOffReceiver), in onStart_shouldRegisterBothReceivers()
88 mFragment.onStart(); in onStop_shouldUnregisterKeyEventReceiver()
89 mFragment.onStop(); in onStop_shouldUnregisterKeyEventReceiver()
91 verify(mActivity).unregisterReceiver(eq(mFragment.mKeyEventReceiver)); in onStop_shouldUnregisterKeyEventReceiver()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/sim/
DSimListDialogFragmentTest.java55 mFragment = spy(SimListDialogFragment.newInstance(dialogType, R.string.select_sim_for_data, in onCreateDialog_noSubscriptions_dismissed()
57 doReturn(null).when(mFragment).getCurrentSubscriptions(); in onCreateDialog_noSubscriptions_dismissed()
59 verify(mFragment).dismiss(); in onCreateDialog_noSubscriptions_dismissed()
66 mFragment = spy(SimListDialogFragment.newInstance(dialogType, R.string.select_sim_for_data, in onCreateDialog_twoSubscriptionsNoAskEveryTime_twoSubsForDisplay()
68 doReturn(Arrays.asList(mSim1, mSim2)).when(mFragment).getCurrentSubscriptions(); in onCreateDialog_twoSubscriptionsNoAskEveryTime_twoSubsForDisplay()
70 doNothing().when(mFragment).setAdapter(any()); in onCreateDialog_twoSubscriptionsNoAskEveryTime_twoSubsForDisplay()
72 assertThat(mFragment.mSubscriptions).hasSize(2); in onCreateDialog_twoSubscriptionsNoAskEveryTime_twoSubsForDisplay()
74 final SimDialogActivity activity = (SimDialogActivity) spy(mFragment.getActivity()); in onCreateDialog_twoSubscriptionsNoAskEveryTime_twoSubsForDisplay()
75 doReturn(activity).when(mFragment).getActivity(); in onCreateDialog_twoSubscriptionsNoAskEveryTime_twoSubsForDisplay()
78 mFragment.onClick(alertDialog, 1); in onCreateDialog_twoSubscriptionsNoAskEveryTime_twoSubsForDisplay()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/
DSettingsPreferenceFragmentTest.java66 private TestFragment mFragment; field in SettingsPreferenceFragmentTest
74 mFragment = spy(new TestFragment()); in setUp()
75 doReturn(mActivity).when(mFragment).getActivity(); in setUp()
76 when(mFragment.getContext()).thenReturn(mContext); in setUp()
79 ReflectionHelpers.setField(mFragment, "mEmptyView", mEmptyView); in setUp()
98 assertThat(mFragment.removePreference(mScreen, key)).isTrue(); in removePreference_nested_shouldRemove()
113 assertThat(mFragment.removePreference(mScreen, key)).isTrue(); in removePreference_flat_shouldRemove()
128 assertThat(mFragment.removePreference(mScreen, "not" + key)).isFalse(); in removePreference_doNotExist_shouldNotRemove()
136 doReturn(mPreferenceScreen).when(mFragment).getPreferenceScreen(); in testUpdateEmptyView_containerInvisible_emptyViewVisible()
138 mFragment.updateEmptyView(); in testUpdateEmptyView_containerInvisible_emptyViewVisible()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/password/
DChooseLockGenericTest.java89 private ChooseLockGenericFragment mFragment; field in ChooseLockGenericTest
95 mFragment = new ChooseLockGenericFragment(); in setUp()
129 mFragment.onActivityResult( in onActivityResult_nullIntentData_shouldNotCrash()
142 mFragment.updatePreferencesOrFinish(false /* isRecreatingActivity */); in updatePreferencesOrFinish_passwordTypeSetPin_shouldStartChooseLockPassword()
155 mFragment.updatePreferencesOrFinish(false /* isRecreatingActivity */); in updatePreferencesOrFinish_passwordTypeSetPinNotFbe_shouldNotStartChooseLock()
170 mFragment.updatePreferencesOrFinish(false /* isRecreatingActivity */); in updatePreferencesOrFinish_footerPreferenceAddedHighComplexityText()
171 FooterPreference footer = mFragment.findPreference(KEY_LOCK_SETTINGS_FOOTER); in updatePreferencesOrFinish_footerPreferenceAddedHighComplexityText()
186 mFragment.updatePreferencesOrFinish(false /* isRecreatingActivity */); in updatePreferencesOrFinish_footerPreferenceAddedMediumComplexityText()
187 FooterPreference footer = mFragment.findPreference(KEY_LOCK_SETTINGS_FOOTER); in updatePreferencesOrFinish_footerPreferenceAddedMediumComplexityText()
202 mFragment.updatePreferencesOrFinish(false /* isRecreatingActivity */); in updatePreferencesOrFinish_footerPreferenceAddedLowComplexityText()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/
DRadioButtonPickerFragmentTest.java61 private TestFragment mFragment; field in RadioButtonPickerFragmentTest
67 mFragment = spy(new TestFragment()); in setUp()
70 doReturn(mActivity).when(mFragment).getContext(); in setUp()
71 doReturn(mScreen).when(mFragment).getPreferenceScreen(); in setUp()
76 mFragment.onAttach((Context) mActivity); in onAttach_userIsInitialized()
88 mFragment.mayCheckOnlyRadioButton(); in displaySingleOption_shouldSelectRadioButton()
99 mFragment.onRadioButtonClicked(pref); in clickPreference_shouldConfirm()
101 assertThat(mFragment.setDefaultKeyCalled).isTrue(); in clickPreference_shouldConfirm()
106 mFragment.mAppendStaticPreferences = false; in staticPreferencesPrepended_addedFirst()
107 mFragment.updateCandidates(); in staticPreferencesPrepended_addedFirst()
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/wifi/
DAddWifiFragmentTest.java60 private AddWifiFragment mFragment; field in AddWifiFragmentTest
94 mFragment.onCreate(null); in onCreate_registersReceivers()
110 mFragment.onCreate(null); in onDestroy_unregistersReceivers()
112 mFragment.onDestroy(); in onDestroy_unregistersReceivers()
121 mFragment.onCreate(null); in initialState_buttonDisabled()
122 mFragment.onStart(); in initialState_buttonDisabled()
123 assertThat(mFragment.getToolbarMenuItems().get(0).isEnabled()).isFalse(); in initialState_buttonDisabled()
129 mFragment.onCreate(null); in receiveNameChangeIntent_emptyName_buttonDisabled()
130 mFragment.onStart(); in receiveNameChangeIntent_emptyName_buttonDisabled()
134 mFragment.mNameChangeReceiver.onReceive(mContext, intent); in receiveNameChangeIntent_emptyName_buttonDisabled()
[all …]

12345678910>>...15