/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/enterprise/ |
D | DeviceAdminAddHeaderPreferenceControllerTest.java | 40 private TwoStatePreference mPreference; field in DeviceAdminAddHeaderPreferenceControllerTest 72 mController.onResumeInternal(mPreference); in testOnResumeInternal_inactiveAdmin() 74 verifyPreferenceSetChecked(mPreference, false); in testOnResumeInternal_inactiveAdmin() 75 verifyPreferenceEnabled(mPreference); in testOnResumeInternal_inactiveAdmin() 85 mController.onResumeInternal(mPreference); in testOnResumeInternal_activeAdmin() 87 verifyPreferenceSetChecked(mPreference, true); in testOnResumeInternal_activeAdmin() 88 verifyPreferenceEnabled(mPreference); in testOnResumeInternal_activeAdmin() 98 mController.onResumeInternal(mPreference); in testOnResumeInternal_deviceOwner() 100 verifyPreferenceSetChecked(mPreference, true); in testOnResumeInternal_deviceOwner() 101 verifyPreferenceDisabled(mPreference); in testOnResumeInternal_deviceOwner() [all …]
|
/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 …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ |
D | VibrationIntensityPreferenceControllerTest.java | 73 private SeekBarPreference mPreference; field in VibrationIntensityPreferenceControllerTest 87 controller.updateState(mPreference); in missingSetting_shouldReturnDefault() 88 assertThat(mPreference.getProgress()) in missingSetting_shouldReturnDefault() 98 controller.updateState(mPreference); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() 99 assertThat(mPreference.getProgress()).isEqualTo(Vibrator.VIBRATION_INTENSITY_LOW); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() 100 assertThat(mPreference.isEnabled()).isTrue(); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() 103 controller.updateState(mPreference); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() 104 assertThat(mPreference.getProgress()).isEqualTo(Vibrator.VIBRATION_INTENSITY_OFF); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() 105 assertThat(mPreference.isEnabled()).isFalse(); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() 108 controller.updateState(mPreference); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() [all …]
|
D | RingVibrationTogglePreferenceControllerTest.java | 60 private SwitchPreference mPreference; field in RingVibrationTogglePreferenceControllerTest 72 mPreference = new SwitchPreference(mContext); in setUp() 73 mPreference.setSummary("Test summary"); in setUp() 74 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 89 mController.updateState(mPreference); in missingSetting_shouldReturnDefault() 90 assertThat(mPreference.isChecked()).isTrue(); in missingSetting_shouldReturnDefault() 98 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 99 assertThat(mPreference.isChecked()).isTrue(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 100 assertThat(mPreference.getSummary()).isNull(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 101 assertThat(mPreference.isEnabled()).isTrue(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() [all …]
|
D | VibrationTogglePreferenceControllerTest.java | 69 private SwitchPreference mPreference; field in VibrationTogglePreferenceControllerTest 80 mPreference = new SwitchPreference(mContext); in setUp() 81 mPreference.setTitle("Test title"); in setUp() 82 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 89 mController.updateState(mPreference); in missingSetting_shouldBeCheckedByDefault() 90 assertThat(mPreference.isChecked()).isTrue(); in missingSetting_shouldBeCheckedByDefault() 98 mController.updateState(mPreference); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() 99 assertThat(mPreference.isChecked()).isTrue(); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() 100 assertThat(mPreference.isEnabled()).isTrue(); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() 103 mController.updateState(mPreference); in updateState_mainSwitchUpdates_shouldPreserveSettingBetweenUpdates() [all …]
|
D | HapticFeedbackTogglePreferenceControllerTest.java | 59 private SwitchPreference mPreference; field in HapticFeedbackTogglePreferenceControllerTest 71 mPreference = new SwitchPreference(mContext); in setUp() 72 mPreference.setSummary("Test summary"); in setUp() 73 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 88 mController.updateState(mPreference); in missingSetting_shouldReturnDefault() 89 assertThat(mPreference.isChecked()).isTrue(); in missingSetting_shouldReturnDefault() 97 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldNotAffectSettings() 98 assertThat(mPreference.isChecked()).isTrue(); in updateState_ringerModeUpdates_shouldNotAffectSettings() 99 assertThat(mPreference.isEnabled()).isTrue(); in updateState_ringerModeUpdates_shouldNotAffectSettings() 102 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldNotAffectSettings() [all …]
|
D | NotificationVibrationTogglePreferenceControllerTest.java | 58 private SwitchPreference mPreference; field in NotificationVibrationTogglePreferenceControllerTest 70 mPreference = new SwitchPreference(mContext); in setUp() 71 mPreference.setSummary("Test summary"); in setUp() 72 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 87 mController.updateState(mPreference); in missingSetting_shouldReturnDefault() 88 assertThat(mPreference.isChecked()).isTrue(); in missingSetting_shouldReturnDefault() 97 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 98 assertThat(mPreference.isChecked()).isTrue(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 99 assertThat(mPreference.getSummary()).isNull(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 100 assertThat(mPreference.isEnabled()).isTrue(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() [all …]
|
D | RingVibrationIntensityPreferenceControllerTest.java | 63 private SeekBarPreference mPreference; field in RingVibrationIntensityPreferenceControllerTest 76 mPreference = new SeekBarPreference(mContext); in setUp() 77 mPreference.setSummary("Test summary"); in setUp() 78 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 95 mController.updateState(mPreference); in missingSetting_shouldReturnDefault() 96 assertThat(mPreference.getProgress()).isEqualTo( in missingSetting_shouldReturnDefault() 105 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 106 assertThat(mPreference.getProgress()).isEqualTo(Vibrator.VIBRATION_INTENSITY_LOW); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 107 assertThat(mPreference.getSummary()).isNull(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 108 assertThat(mPreference.isEnabled()).isTrue(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() [all …]
|
D | HapticFeedbackIntensityPreferenceControllerTest.java | 62 private SeekBarPreference mPreference; field in HapticFeedbackIntensityPreferenceControllerTest 75 mPreference = new SeekBarPreference(mContext); in setUp() 76 mPreference.setSummary("Test summary"); in setUp() 77 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 94 mController.updateState(mPreference); in missingSetting_shouldReturnDefault() 95 assertThat(mPreference.getProgress()) in missingSetting_shouldReturnDefault() 104 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldNotAffectSettings() 105 assertThat(mPreference.getProgress()).isEqualTo(Vibrator.VIBRATION_INTENSITY_LOW); in updateState_ringerModeUpdates_shouldNotAffectSettings() 106 assertThat(mPreference.isEnabled()).isTrue(); in updateState_ringerModeUpdates_shouldNotAffectSettings() 109 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldNotAffectSettings() [all …]
|
D | MediaVibrationTogglePreferenceControllerTest.java | 57 private SwitchPreference mPreference; field in MediaVibrationTogglePreferenceControllerTest 69 mPreference = new SwitchPreference(mContext); in setUp() 70 mPreference.setSummary("Test summary"); in setUp() 71 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 87 mController.updateState(mPreference); in missingSetting_shouldReturnDefault() 89 assertThat(mPreference.isChecked()).isTrue(); in missingSetting_shouldReturnDefault() 97 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldNotAffectSettings() 98 assertThat(mPreference.isChecked()).isTrue(); in updateState_ringerModeUpdates_shouldNotAffectSettings() 99 assertThat(mPreference.isEnabled()).isTrue(); in updateState_ringerModeUpdates_shouldNotAffectSettings() 102 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldNotAffectSettings() [all …]
|
D | AlarmVibrationTogglePreferenceControllerTest.java | 56 private SwitchPreference mPreference; field in AlarmVibrationTogglePreferenceControllerTest 68 mPreference = new SwitchPreference(mContext); in setUp() 69 mPreference.setSummary("Test summary"); in setUp() 70 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 86 mController.updateState(mPreference); in missingSetting_shouldReturnDefault() 88 assertThat(mPreference.isChecked()).isTrue(); in missingSetting_shouldReturnDefault() 96 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldNotAffectSettings() 97 assertThat(mPreference.isChecked()).isTrue(); in updateState_ringerModeUpdates_shouldNotAffectSettings() 98 assertThat(mPreference.isEnabled()).isTrue(); in updateState_ringerModeUpdates_shouldNotAffectSettings() 101 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldNotAffectSettings() [all …]
|
D | NotificationVibrationIntensityPreferenceControllerTest.java | 60 private SeekBarPreference mPreference; field in NotificationVibrationIntensityPreferenceControllerTest 73 mPreference = new SeekBarPreference(mContext); in setUp() 74 mPreference.setSummary("Test summary"); in setUp() 75 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 92 mController.updateState(mPreference); in missingSetting_shouldReturnDefault() 93 assertThat(mPreference.getProgress()).isEqualTo( in missingSetting_shouldReturnDefault() 104 mController.updateState(mPreference); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 105 assertThat(mPreference.getProgress()).isEqualTo(Vibrator.VIBRATION_INTENSITY_LOW); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 106 assertThat(mPreference.getSummary()).isNull(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() 107 assertThat(mPreference.isEnabled()).isTrue(); in updateState_ringerModeUpdates_shouldPreserveSettingAndDisplaySummary() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/bluetooth/ |
D | BluetoothDevicePreferenceTest.java | 51 private BluetoothDevicePreference mPreference; field in BluetoothDevicePreferenceTest 70 mPreference = new BluetoothDevicePreference(mContext, mCachedDevice); in setUp() 75 assertThat(mPreference.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM1) in actionIsHiddenByDefault() 77 assertThat(mPreference.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM1) in actionIsHiddenByDefault() 79 assertThat(mPreference.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM1) in actionIsHiddenByDefault() 85 mPreference.onAttached(); in onAttached_registersDeviceCallback() 95 mPreference.onAttached(); in onAttached_setsDeviceNameAsTitle() 97 assertThat(mPreference.getTitle()).isEqualTo(name); in onAttached_setsDeviceNameAsTitle() 106 mPreference.onAttached(); in onAttached_notConnected_setsCarConnectionSummaryAsSummary() 108 assertThat(mPreference.getSummary()).isEqualTo(summary); in onAttached_notConnected_setsCarConnectionSummaryAsSummary() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | BluetoothMaxConnectedAudioDevicesPreferenceControllerTest.java | 62 private ListPreference mPreference; field in BluetoothMaxConnectedAudioDevicesPreferenceControllerTest 75 mPreference = new ListPreference(mSpyContext); in setup() 76 mPreference.setEntries(R.array.bluetooth_max_connected_audio_devices); in setup() 77 mPreference.setEntryValues(R.array.bluetooth_max_connected_audio_devices_values); in setup() 84 mPreference); in setup() 86 mListValues = mPreference.getEntryValues(); in setup() 87 mListEntries = mPreference.getEntries(); in setup() 99 mController.updateState(mPreference); in verifyResourceSizeAndRange() 101 assertThat(mPreference.getValue()).isEqualTo(mListValues[0]); in verifyResourceSizeAndRange() 102 assertThat(mPreference.getEntry()).isEqualTo(mListEntries[0]); in verifyResourceSizeAndRange() [all …]
|
/packages/apps/Settings/src/com/android/settings/widget/ |
D | GenericSwitchController.java | 35 private Preference mPreference; field in GenericSwitchController 47 mPreference = preference; in setPreference() 58 mPreference.setOnPreferenceChangeListener(this); in startListening() 63 mPreference.setOnPreferenceChangeListener(null); in stopListening() 68 if (mPreference instanceof PrimarySwitchPreference) { in setChecked() 69 ((PrimarySwitchPreference) mPreference).setChecked(checked); in setChecked() 70 } else if (mPreference instanceof RestrictedSwitchPreference) { in setChecked() 71 ((RestrictedSwitchPreference) mPreference).setChecked(checked); in setChecked() 77 if (mPreference instanceof PrimarySwitchPreference) { in isChecked() 78 return ((PrimarySwitchPreference) mPreference).isChecked(); in isChecked() [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/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/Car/Settings/tests/unit/src/com/android/car/settings/network/ |
D | MobileDataTogglePreferenceControllerTest.java | 71 private TwoStatePreference mPreference; field in MobileDataTogglePreferenceControllerTest 111 mPreference = new SwitchPreference(mContext); in setUp() 116 PreferenceControllerTestUtil.assignPreference(mPreferenceController, mPreference); in setUp() 159 assertThat(mPreference.isEnabled()).isFalse(); in refreshUi_isOpportunistic_isDisabled() 168 assertThat(mPreference.isEnabled()).isTrue(); in refreshUi_isNotOpportunistic_isEnabled() 176 assertThat(mPreference.isChecked()).isTrue(); in refreshUi_dataEnabled_setChecked() 183 assertThat(mPreference.isChecked()).isFalse(); in refreshUi_dataDisabled_setUnchecked() 188 mPreference.callChangeListener(false); in handlePreferenceChanged_setFalse_isSingleSim_opensDialog() 196 mPreference.setChecked(true); in handlePreferenceChanged_setFalse_isMultiSim_disablesData() 199 mPreference.callChangeListener(false); in handlePreferenceChanged_setFalse_isMultiSim_disablesData() [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 …]
|
/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 …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/common/ |
D | PreferenceControllerTest.java | 78 private CarUiPreference mPreference; field in PreferenceControllerTest 92 mPreferenceController.setPreference(mPreference); in onUxRestrictionsChanged_restricted_preferenceRestricted() 95 Mockito.reset(mPreference); in onUxRestrictionsChanged_restricted_preferenceRestricted() 98 verify((UxRestrictablePreference) mPreference).setUxRestricted(true); in onUxRestrictionsChanged_restricted_preferenceRestricted() 103 mPreferenceController.setPreference(mPreference); in onUxRestrictionsChanged_restricted_viewOnly_preferenceUnrestricted() 107 Mockito.reset(mPreference); in onUxRestrictionsChanged_restricted_viewOnly_preferenceUnrestricted() 110 verify((UxRestrictablePreference) mPreference).setUxRestricted(false); in onUxRestrictionsChanged_restricted_viewOnly_preferenceUnrestricted() 179 mPreference.setEnabled(false); in onCreate_unrestricted_disabled_preferenceUnrestricted() 180 mPreferenceController.setPreference(mPreference); in onCreate_unrestricted_disabled_preferenceUnrestricted() 183 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 …]
|