/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/ |
D | AddPreferenceTest.java | 48 private AddPreference mPreference; field in AddPreferenceTest 53 mPreference = new AddPreference(mContext, null); in setUp() 55 final View view = spy(View.inflate(mContext, mPreference.getLayoutResource(), null)); in setUp() 58 mAddWidget = spy(View.inflate(mContext, mPreference.getSecondTargetResId(), null)); in setUp() 59 when(mViewHolder.findViewById(mPreference.getAddWidgetResId())).thenReturn(mAddWidget); in setUp() 64 mPreference.onBindViewHolder(mViewHolder); in onBindViewHolder_noListener_addButtonNotVisible() 65 assertThat(mPreference.shouldHideSecondTarget()).isTrue(); in onBindViewHolder_noListener_addButtonNotVisible() 71 mPreference.setOnAddClickListener(p -> {}); in onBindViewHolder_hasListener_addButtonVisible() 72 mPreference.onBindViewHolder(mViewHolder); in onBindViewHolder_hasListener_addButtonVisible() 73 assertThat(mPreference.shouldHideSecondTarget()).isFalse(); in onBindViewHolder_hasListener_addButtonVisible() [all …]
|
D | PrimaryCheckBoxPreferenceTest.java | 45 private PrimaryCheckBoxPreference mPreference; field in PrimaryCheckBoxPreferenceTest 50 mPreference = new PrimaryCheckBoxPreference(mContext); in setUp() 55 assertThat(mPreference.getWidgetLayoutResource()) in createNewPreference_shouldSetLayout() 65 mPreference.onBindViewHolder(holder); in setChecked_shouldUpdateCheckBoxCheckedState() 67 mPreference.setChecked(true); in setChecked_shouldUpdateCheckBoxCheckedState() 70 mPreference.setChecked(false); in setChecked_shouldUpdateCheckBoxCheckedState() 80 mPreference.onBindViewHolder(holder); in setEnabled_shouldUpdateCheckBoxEnabledState() 82 mPreference.setEnabled(true); in setEnabled_shouldUpdateCheckBoxEnabledState() 85 mPreference.setEnabled(false); in setEnabled_shouldUpdateCheckBoxEnabledState() 95 mPreference.onBindViewHolder(holder); in setCheckboxEnabled_shouldOnlyUpdateCheckBoxEnabledState() [all …]
|
D | PrimarySwitchPreferenceTest.java | 45 private PrimarySwitchPreference mPreference; field in PrimarySwitchPreferenceTest 52 mPreference = new PrimarySwitchPreference(mContext); in setUp() 62 assertThat(mPreference.getWidgetLayoutResource()) in createNewPreference_shouldSetLayout() 69 mPreference.onBindViewHolder(mHolder); in setChecked_shouldUpdateButtonCheckedState() 71 mPreference.setChecked(true); in setChecked_shouldUpdateButtonCheckedState() 74 mPreference.setChecked(false); in setChecked_shouldUpdateButtonCheckedState() 81 mPreference.onBindViewHolder(mHolder); in setSwitchEnabled_shouldUpdateButtonEnabledState() 83 mPreference.setSwitchEnabled(true); in setSwitchEnabled_shouldUpdateButtonEnabledState() 86 mPreference.setSwitchEnabled(false); in setSwitchEnabled_shouldUpdateButtonEnabledState() 94 mPreference.setSwitchEnabled(false); in setSwitchEnabled_shouldUpdateButtonEnabledState_beforeViewBound() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/bluetooth/ |
D | BluetoothDevicePreferenceTest.java | 51 private BluetoothDevicePreference mPreference; field in BluetoothDevicePreferenceTest 59 mPreference = new BluetoothDevicePreference(mContext, mCachedDevice); in setUp() 64 assertThat(mPreference.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM1) in actionIsHiddenByDefault() 66 assertThat(mPreference.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM1) in actionIsHiddenByDefault() 68 assertThat(mPreference.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM1) in actionIsHiddenByDefault() 74 mPreference.onAttached(); in onAttached_registersDeviceCallback() 84 mPreference.onAttached(); in onAttached_setsDeviceNameAsTitle() 86 assertThat(mPreference.getTitle()).isEqualTo(name); in onAttached_setsDeviceNameAsTitle() 95 mPreference.onAttached(); in onAttached_notConnected_setsCarConnectionSummaryAsSummary() 97 assertThat(mPreference.getSummary()).isEqualTo(summary); in onAttached_notConnected_setsCarConnectionSummaryAsSummary() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | BluetoothMaxConnectedAudioDevicesPreferenceControllerTest.java | 57 private ListPreference mPreference; field in BluetoothMaxConnectedAudioDevicesPreferenceControllerTest 69 mPreference = new ListPreference(mSpyContext); in setup() 70 mPreference.setEntries(R.array.bluetooth_max_connected_audio_devices); in setup() 71 mPreference.setEntryValues(R.array.bluetooth_max_connected_audio_devices_values); in setup() 79 mPreference); in setup() 81 mListValues = mPreference.getEntryValues(); in setup() 82 mListEntries = mPreference.getEntries(); in setup() 94 mController.updateState(mPreference); in verifyResourceSizeAndRange() 96 assertThat(mPreference.getValue()).isEqualTo(mListValues[0]); in verifyResourceSizeAndRange() 97 assertThat(mPreference.getEntry()).isEqualTo(mListEntries[0]); in verifyResourceSizeAndRange() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/ |
D | BluetoothDeviceProfilePreferenceTest.java | 56 private BluetoothDeviceProfilePreference mPreference; field in BluetoothDeviceProfilePreferenceTest 66 mPreference = new BluetoothDeviceProfilePreference(mContext, mProfile, mCachedDevice); in setUp() 71 assertThat(mPreference.getKey()).isEqualTo(mProfile.toString()); in onConstruction_setsProfileStringAsKey() 76 assertThat(mPreference.getTitle()).isEqualTo(mContext.getString(R.string.bt_profile_name)); in onConstruction_setsProfileNameAsTitle() 81 mPreference.onAttached(); in onAttached_registersDeviceCallback() 90 mPreference.onAttached(); in onAttached_deviceNotBusy_setsEnabled() 92 assertThat(mPreference.isEnabled()).isTrue(); in onAttached_deviceNotBusy_setsEnabled() 99 mPreference.onAttached(); in onAttached_deviceBusy_setsNotEnabled() 101 assertThat(mPreference.isEnabled()).isFalse(); in onAttached_deviceBusy_setsNotEnabled() 108 mPreference.onAttached(); in onAttached_preferred_setsChecked() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datetime/ |
D | AutoTimeFormatPreferenceControllerTest.java | 48 private SwitchPreference mPreference; field in AutoTimeFormatPreferenceControllerTest 61 mPreference = new SwitchPreference(mContext); in updateState_24HourSet_shouldCheckPreference() 62 mPreference.setKey(mController.getPreferenceKey()); in updateState_24HourSet_shouldCheckPreference() 66 mController.updateState(mPreference); in updateState_24HourSet_shouldCheckPreference() 68 assertThat(mPreference.isChecked()).isFalse(); in updateState_24HourSet_shouldCheckPreference() 74 mPreference = new SwitchPreference(mContext); in updateState_12HourSet_shouldCheckPreference() 75 mPreference.setKey(mController.getPreferenceKey()); in updateState_12HourSet_shouldCheckPreference() 79 mController.updateState(mPreference); in updateState_12HourSet_shouldCheckPreference() 81 assertThat(mPreference.isChecked()).isFalse(); in updateState_12HourSet_shouldCheckPreference() 87 mPreference = new SwitchPreference(mContext); in updateState_autoSet_shouldNotCheckPreference() [all …]
|
D | TimeFormatPreferenceControllerTest.java | 47 private SwitchPreference mPreference; field in TimeFormatPreferenceControllerTest 74 mPreference = new SwitchPreference(mContext); in updateState_24HourSet_shouldCheckPreference() 75 mPreference.setKey(mController.getPreferenceKey()); in updateState_24HourSet_shouldCheckPreference() 79 mController.updateState(mPreference); in updateState_24HourSet_shouldCheckPreference() 81 assertThat(mPreference.isChecked()).isTrue(); in updateState_24HourSet_shouldCheckPreference() 87 mPreference = new SwitchPreference(mContext); in updateState_12HourSet_shouldNotCheckPreference() 88 mPreference.setKey(mController.getPreferenceKey()); in updateState_12HourSet_shouldNotCheckPreference() 92 mController.updateState(mPreference); in updateState_12HourSet_shouldNotCheckPreference() 94 assertThat(mPreference.isChecked()).isFalse(); in updateState_12HourSet_shouldNotCheckPreference() 101 mPreference = new SwitchPreference(mContext); in updateState_autoSet_shouldNotEnablePreference() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/network/ |
D | MobileDataTogglePreferenceControllerTest.java | 64 private TwoStatePreference mPreference; field in MobileDataTogglePreferenceControllerTest 82 mPreference = new SwitchPreference(mContext); in setUp() 83 mControllerHelper.setPreference(mPreference); in setUp() 128 assertThat(mPreference.isEnabled()).isFalse(); in refreshUi_isOpportunistic_isDisabled() 137 assertThat(mPreference.isEnabled()).isTrue(); in refreshUi_isNotOpportunistic_isEnabled() 145 assertThat(mPreference.isChecked()).isTrue(); in refreshUi_dataEnabled_setChecked() 153 assertThat(mPreference.isChecked()).isFalse(); in refreshUi_dataDisabled_setUnchecked() 159 mPreference.callChangeListener(false); in handlePreferenceChanged_setFalse_isSingleSim_opensDialog() 168 mPreference.setChecked(true); in handlePreferenceChanged_setFalse_isMultiSim_disablesData() 171 mPreference.callChangeListener(false); in handlePreferenceChanged_setFalse_isMultiSim_disablesData() [all …]
|
/packages/apps/Settings/src/com/android/settings/widget/ |
D | GenericSwitchController.java | 34 private Preference mPreference; field in GenericSwitchController 46 mPreference = preference; in setPreference() 57 mPreference.setOnPreferenceChangeListener(this); in startListening() 62 mPreference.setOnPreferenceChangeListener(null); in stopListening() 67 if (mPreference instanceof PrimarySwitchPreference) { in setChecked() 68 ((PrimarySwitchPreference) mPreference).setChecked(checked); in setChecked() 69 } else if (mPreference instanceof RestrictedSwitchPreference) { in setChecked() 70 ((RestrictedSwitchPreference) mPreference).setChecked(checked); in setChecked() 76 if (mPreference instanceof PrimarySwitchPreference) { in isChecked() 77 return ((PrimarySwitchPreference) mPreference).isChecked(); in isChecked() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/common/ |
D | PreferenceControllerTest.java | 74 private CarUiPreference mPreference; field in PreferenceControllerTest 88 mPreferenceController.setPreference(mPreference); in onUxRestrictionsChanged_restricted_preferenceRestricted() 91 Mockito.reset(mPreference); in onUxRestrictionsChanged_restricted_preferenceRestricted() 94 verify((UxRestrictablePreference) mPreference).setUxRestricted(true); in onUxRestrictionsChanged_restricted_preferenceRestricted() 99 mPreferenceController.setPreference(mPreference); in onUxRestrictionsChanged_restricted_viewOnly_preferenceUnrestricted() 103 Mockito.reset(mPreference); in onUxRestrictionsChanged_restricted_viewOnly_preferenceUnrestricted() 106 verify((UxRestrictablePreference) mPreference).setUxRestricted(false); in onUxRestrictionsChanged_restricted_viewOnly_preferenceUnrestricted() 132 mPreference.setEnabled(false); in onCreate_unrestricted_disabled_preferenceUnrestricted() 133 mPreferenceController.setPreference(mPreference); in onCreate_unrestricted_disabled_preferenceUnrestricted() 136 verify((UxRestrictablePreference) mPreference).setUxRestricted(false); in onCreate_unrestricted_disabled_preferenceUnrestricted() [all …]
|
D | ExtraSettingsPreferenceControllerTest.java | 88 private CarUiPreference mPreference; field in ExtraSettingsPreferenceControllerTest 112 mPreference = spy(new CarUiPreference(mContext)); in setUp() 113 mPreference.setIntent(new Intent().setPackage("com.android.car.settings")); in setUp() 122 mPreferenceBundleMap.put(mPreference, mMetaData); in onUxRestrictionsChanged_restricted_preferenceRestricted() 129 Mockito.reset(mPreference); in onUxRestrictionsChanged_restricted_preferenceRestricted() 132 verify((UxRestrictablePreference) mPreference).setUxRestricted(true); in onUxRestrictionsChanged_restricted_preferenceRestricted() 138 mPreferenceBundleMap.put(mPreference, mMetaData); in onUxRestrictionsChanged_unrestricted_preferenceUnrestricted() 145 Mockito.reset(mPreference); in onUxRestrictionsChanged_unrestricted_preferenceUnrestricted() 148 verify((UxRestrictablePreference) mPreference).setUxRestricted(false); in onUxRestrictionsChanged_unrestricted_preferenceUnrestricted() 154 mPreferenceBundleMap.put(mPreference, mMetaData); in onUxRestrictionsChanged_restricted_viewOnly_preferenceUnrestricted() [all …]
|
/packages/apps/EmergencyInfo/tests/robolectric/src/com/android/emergency/preferences/ |
D | EmergencyContactsPreferenceTest.java | 60 private EmergencyContactsPreference mPreference; field in EmergencyContactsPreferenceTest 71 mPreference = spy(new EmergencyContactsPreference(RuntimeEnvironment.application, in setUp() 76 prefRoot.addPreference(mPreference); in setUp() 81 assertThat(mPreference.isPersistent()).isTrue(); in testDefaultProperties() 82 assertThat(mPreference.isNotSet()).isTrue(); in testDefaultProperties() 83 assertThat(mPreference.getEmergencyContacts()).isEmpty(); in testDefaultProperties() 84 assertThat(mPreference.getPreferenceCount()).isEqualTo(0); in testDefaultProperties() 102 mPreference.addNewEmergencyContact(uri); in testAddAndRemoveEmergencyContact() 104 assertThat(mPreference.getEmergencyContacts()).hasSize(1); in testAddAndRemoveEmergencyContact() 105 assertThat(mPreference.getPreferenceCount()).isEqualTo(1); in testAddAndRemoveEmergencyContact() [all …]
|
D | EmergencyListPreferenceTest.java | 49 private EmergencyListPreference mPreference; field in EmergencyListPreferenceTest 59 mPreference = spy( in setUp() 64 prefRoot.addPreference(mPreference); in setUp() 76 mPreference.setKey(PreferenceKeys.KEY_ORGAN_DONOR); in testReloadFromPreference() 77 mPreference.setEntryValues(organDonorValues); in testReloadFromPreference() 79 mPreference.reloadFromPreference(); in testReloadFromPreference() 80 assertThat(mPreference.getValue()).isEqualTo(mPreference.getEntryValues()[0]); in testReloadFromPreference() 81 assertThat(mPreference.isNotSet()).isFalse(); in testReloadFromPreference() 92 mPreference.setKey(PreferenceKeys.KEY_ORGAN_DONOR); in testSetValue() 93 mPreference.setEntries(organDonorEntries); in testSetValue() [all …]
|
D | EmergencyEditTextPreferenceTest.java | 45 private EmergencyEditTextPreference mPreference; field in EmergencyEditTextPreferenceTest 55 mPreference = spy(new EmergencyEditTextPreference(context, null)); in setUp() 59 prefRoot.addPreference(mPreference); in setUp() 64 assertThat(mPreference.isEnabled()).isTrue(); in testDefaultProperties() 65 assertThat(mPreference.isPersistent()).isTrue(); in testDefaultProperties() 66 assertThat(mPreference.isSelectable()).isTrue(); in testDefaultProperties() 67 assertThat(mPreference.isNotSet()).isTrue(); in testDefaultProperties() 72 mPreference.setKey(PreferenceKeys.KEY_MEDICAL_CONDITIONS); in testReloadFromPreference() 75 when(mSharedPreferences.getString(eq(mPreference.getKey()), nullable(String.class))) in testReloadFromPreference() 78 mPreference.reloadFromPreference(); in testReloadFromPreference() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | PrivateDnsModeDialogPreferenceTest.java | 60 private PrivateDnsModeDialogPreference mPreference; field in PrivateDnsModeDialogPreferenceTest 80 mPreference = new PrivateDnsModeDialogPreference(mContext); in setUp() 81 ReflectionHelpers.setField(mPreference, "mFragment", fragment); in setUp() 87 mPreference.onBindDialogView(view); in setUp() 92 mPreference.onCheckedChanged(null, R.id.private_dns_mode_off); in testOnCheckedChanged_dnsModeOff_disableEditText() 94 assertThat(mPreference.mMode).isEqualTo(PRIVATE_DNS_MODE_OFF); in testOnCheckedChanged_dnsModeOff_disableEditText() 95 assertThat(mPreference.mEditText.isEnabled()).isFalse(); in testOnCheckedChanged_dnsModeOff_disableEditText() 100 mPreference.onCheckedChanged(null, R.id.private_dns_mode_opportunistic); in testOnCheckedChanged_dnsModeOpportunistic_disableEditText() 102 assertThat(mPreference.mMode).isEqualTo(PRIVATE_DNS_MODE_OPPORTUNISTIC); in testOnCheckedChanged_dnsModeOpportunistic_disableEditText() 103 assertThat(mPreference.mEditText.isEnabled()).isFalse(); in testOnCheckedChanged_dnsModeOpportunistic_disableEditText() [all …]
|
D | MobileNetworkSummaryControllerTest.java | 79 private AddPreference mPreference; field in MobileNetworkSummaryControllerTest 98 mPreference = spy(new AddPreference(mContext, null)); in setUp() 99 mPreference.setKey(mController.getPreferenceKey()); in setUp() 101 mPreference); in setUp() 134 mPreference.getOnPreferenceClickListener().onPreferenceClick(mPreference); in getSummary_noSubscriptions_correctSummaryAndClickHandler() 143 assertThat(mPreference.getOnPreferenceClickListener()).isNull(); in getSummary_noSubscriptionsNoEuiccMgr_correctSummaryAndClickHandler() 144 assertThat(mPreference.getFragment()).isNull(); in getSummary_noSubscriptionsNoEuiccMgr_correctSummaryAndClickHandler() 157 assertThat(mPreference.getFragment()).isNull(); in getSummary_oneSubscription_correctSummaryAndClickHandler() 160 mPreference.getOnPreferenceClickListener().onPreferenceClick(mPreference); in getSummary_oneSubscription_correctSummaryAndClickHandler() 182 assertThat(mPreference.getFragment()).isNull(); in getSummary_oneInactivePSim_cannotDisablePsim_correctSummaryAndClickHandler() [all …]
|
D | PrivateDnsPreferenceControllerTest.java | 111 private Preference mPreference; field in PrivateDnsPreferenceControllerTest 133 when(mScreen.findPreference(anyString())).thenReturn(mPreference); in setUp() 198 mController.updateState(mPreference); in getSummary_PrivateDnsModeOff() 200 verify(mPreference).setSummary(getResourceString(R.string.private_dns_mode_off)); in getSummary_PrivateDnsModeOff() 208 mController.updateState(mPreference); in getSummary_PrivateDnsModeOpportunistic() 210 verify(mPreference).setSummary(getResourceString(R.string.private_dns_mode_opportunistic)); in getSummary_PrivateDnsModeOpportunistic() 215 mController.updateState(mPreference); in getSummary_PrivateDnsModeOpportunistic() 216 verify(mPreference).setSummary(getResourceString(R.string.private_dns_mode_on)); in getSummary_PrivateDnsModeOpportunistic() 218 reset(mPreference); in getSummary_PrivateDnsModeOpportunistic() 222 mController.updateState(mPreference); in getSummary_PrivateDnsModeOpportunistic() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/ |
D | BlockPreferenceControllerTest.java | 79 private SettingsMainSwitchPreference mPreference; field in BlockPreferenceControllerTest 90 mPreference = new SettingsMainSwitchPreference(mContext); in setUp() 93 final View view = inflater.inflate(mPreference.getLayoutResource(), in setUp() 96 mPreference.onBindViewHolder(holder); in setUp() 208 mController.updateState(mPreference); in testIsEnabled_lockedApp() 209 assertFalse(mPreference.getSwitchBar().isEnabled()); in testIsEnabled_lockedApp() 218 mController.updateState(mPreference); in testIsEnabled_GroupNotBlockable() 219 assertFalse(mPreference.getSwitchBar().isEnabled()); in testIsEnabled_GroupNotBlockable() 227 mController.updateState(mPreference); in testIsEnabled_systemAppNotBlockable() 228 assertFalse(mPreference.getSwitchBar().isEnabled()); in testIsEnabled_systemAppNotBlockable() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/sound/ |
D | HandsFreeProfileOutputPreferenceControllerTest.java | 102 private ListPreference mPreference; field in HandsFreeProfileOutputPreferenceControllerTest 153 mPreference = new ListPreference(mContext); in setUp() 159 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 160 mScreen.addPreference(mPreference); in setUp() 234 mController.updateState(mPreference); in updateState_shouldSetSummary() 236 assertThat(mPreference.isVisible()).isFalse(); in updateState_shouldSetSummary() 237 assertThat(mPreference.getSummary()).isEqualTo( in updateState_shouldSetSummary() 256 mController.updateState(mPreference); in updateState_oneHeadsetsAvailableAndActivated_shouldSetDeviceName() 258 assertThat(mPreference.isVisible()).isTrue(); in updateState_oneHeadsetsAvailableAndActivated_shouldSetDeviceName() 259 assertThat(mPreference.getSummary()).isEqualTo(TEST_DEVICE_NAME_1); in updateState_oneHeadsetsAvailableAndActivated_shouldSetDeviceName() [all …]
|
/packages/apps/Settings/src/com/android/settings/notification/ |
D | VolumeSeekBarPreferenceController.java | 35 protected VolumeSeekBarPreference mPreference; field in VolumeSeekBarPreferenceController 57 mPreference = screen.findPreference(getPreferenceKey()); in displayPreference() 58 mPreference.setCallback(mVolumePreferenceCallback); in displayPreference() 59 mPreference.setStream(getAudioStream()); in displayPreference() 60 mPreference.setMuteIcon(getMuteIcon()); in displayPreference() 66 if (mPreference != null) { in onResume() 67 mPreference.onActivityResume(); in onResume() 73 if (mPreference != null) { in onPause() 74 mPreference.onActivityPause(); in onPause() 80 if (mPreference != null) { in getSliderPosition() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/graphicsdriver/ |
D | GraphicsDriverEnableForAllAppsPreferenceControllerTest.java | 56 private ListPreference mPreference; field in GraphicsDriverEnableForAllAppsPreferenceControllerTest 87 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 118 mController.updateState(mPreference); in displayPreference_shouldAddListPreference() 120 verify(mPreference).setValue(mPreferenceDefault); in displayPreference_shouldAddListPreference() 121 verify(mPreference).setSummary(mPreferenceDefault); in displayPreference_shouldAddListPreference() 144 mController.updateState(mPreference); in updateState_availableAndDefault_visibleAndDefault() 146 verify(mPreference, atLeastOnce()).setVisible(true); in updateState_availableAndDefault_visibleAndDefault() 147 verify(mPreference).setValue(mPreferenceDefault); in updateState_availableAndDefault_visibleAndDefault() 148 verify(mPreference).setSummary(mPreferenceDefault); in updateState_availableAndDefault_visibleAndDefault() 156 mController.updateState(mPreference); in updateState_availableAndProductionDriver_visibleAndProductionDriver() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/ |
D | PreferenceControllerTest.java | 67 private Preference mPreference; field in PreferenceControllerTest 74 FakePreferenceController.class, mPreference); in setUp() 89 assertThat(mController.getPreference()).isEqualTo(mPreference); in setPreference_correctType_setsPreference() 103 verify(mPreference).setOnPreferenceChangeListener(listenerArgumentCaptor.capture()); in setPreference_registersOnPreferenceChangeListener() 104 listenerArgumentCaptor.getValue().onPreferenceChange(mPreference, newValue); in setPreference_registersOnPreferenceChangeListener() 107 assertThat(mController.getHandlePreferenceChangedPreferenceArg()).isEqualTo(mPreference); in setPreference_registersOnPreferenceChangeListener() 116 verify(mPreference).setOnPreferenceClickListener(listenerArgumentCaptor.capture()); in setPreference_registersOnPreferenceClickListener() 117 listenerArgumentCaptor.getValue().onPreferenceClick(mPreference); in setPreference_registersOnPreferenceClickListener() 120 assertThat(mController.getHandlePreferenceClickedArg()).isEqualTo(mPreference); in setPreference_registersOnPreferenceClickListener() 136 verify(mPreference).setEnabled(false); in onUxRestrictionsChanged_created_restricted_preferenceDisabled() [all …]
|
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/ |
D | PhotosDeletionPreferenceTest.java | 40 private PhotosDeletionPreference mPreference; field in PhotosDeletionPreferenceTest 46 mPreference = new PhotosDeletionPreference(RuntimeEnvironment.application, null); in setUp() 47 mPreference.registerDeletionService(mDeletionType); in setUp() 53 mPreference.getLayoutResource(), in setUp() 56 inflater.inflate(mPreference.getWidgetLayoutResource(), in setUp() 64 assertThat(mPreference.getFreeableBytes(DeletionHelperSettings.COUNT_CHECKED_ONLY)) in testConstructor() 70 mPreference.onBindViewHolder(mHolder); in testItemVisibilityBeforeLoaded() 79 mPreference.onFreeableChanged(0, 0); in testItemVisibilityAfterLoaded() 82 mPreference.onBindViewHolder(mHolder); in testItemVisibilityAfterLoaded() 93 mPreference.onFreeableChanged(10, 1000L); in testTitleAndSummaryAfterLoaded() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/nfc/ |
D | NfcForegroundPreferenceControllerTest.java | 59 private DropDownPreference mPreference; field in NfcForegroundPreferenceControllerTest 70 mPreference = new DropDownPreference(mContext); in setUp() 71 when(mScreen.findPreference(PREF_KEY)).thenReturn(mPreference); in setUp() 149 assertThat(mPreference.getEntry()).isEqualTo(favorDefault); in changeOptions_shouldUpdateEntryAndSummary() 150 assertThat(mPreference.getSummary()).isEqualTo(favorDefault); in changeOptions_shouldUpdateEntryAndSummary() 152 mPreference.setValueIndex(0); in changeOptions_shouldUpdateEntryAndSummary() 153 mPreference.callChangeListener(mPreference.getEntryValues()[0]); in changeOptions_shouldUpdateEntryAndSummary() 155 assertThat(mPreference.getEntry()).isEqualTo(favorOpen); in changeOptions_shouldUpdateEntryAndSummary() 156 assertThat(mPreference.getSummary()).isEqualTo(favorOpen); in changeOptions_shouldUpdateEntryAndSummary() 158 mPreference.setValueIndex(1); in changeOptions_shouldUpdateEntryAndSummary() [all …]
|