/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/ |
D | EnabledNetworkModePreferenceControllerTest.java | 74 private ListPreference mPreference; field in EnabledNetworkModePreferenceControllerTest 96 mPreference = new ListPreference(mContext); in setUp() 97 mPreference.setEntries(R.array.enabled_networks_choices); in setUp() 98 mPreference.setEntryValues(R.array.enabled_networks_values); in setUp() 101 mPreference.setKey(mController.getPreferenceKey()); in setUp() 177 mController.updateState(mPreference); in updateState_updateByNetworkMode() 179 assertThat(mPreference.getValue()).isEqualTo( in updateState_updateByNetworkMode() 181 assertThat(mPreference.getSummary()).isEqualTo("3G"); in updateState_updateByNetworkMode() 190 mController.updateState(mPreference); in updateState_updateByNetworkMode_useDefaultValue() 192 assertThat(mPreference.getValue()).isEqualTo( in updateState_updateByNetworkMode_useDefaultValue() [all …]
|
D | Enhanced4gLtePreferenceControllerTest.java | 61 private SwitchPreference mPreference; field in Enhanced4gLtePreferenceControllerTest 80 mPreference = new RestrictedSwitchPreference(mContext); in setUp() 84 mPreference.setKey(mController.getPreferenceKey()); in setUp() 109 mController.updateState(mPreference); in updateState_doNotShow4GForLTE_showVolteTitleAndSummary() 110 assertThat(mPreference.getTitle()).isEqualTo( in updateState_doNotShow4GForLTE_showVolteTitleAndSummary() 112 assertThat(mPreference.getSummary()).isEqualTo( in updateState_doNotShow4GForLTE_showVolteTitleAndSummary() 116 mController.updateState(mPreference); in updateState_doNotShow4GForLTE_showVolteTitleAndSummary() 117 assertThat(mPreference.getTitle()).isEqualTo( in updateState_doNotShow4GForLTE_showVolteTitleAndSummary() 119 assertThat(mPreference.getSummary()).isEqualTo( in updateState_doNotShow4GForLTE_showVolteTitleAndSummary() 128 mController.updateState(mPreference); in updateState_show4GForLTE_show4GTitleAndSummary() [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 | MasterCheckBoxPreferenceTest.java | 45 private MasterCheckBoxPreference mPreference; field in MasterCheckBoxPreferenceTest 50 mPreference = new MasterCheckBoxPreference(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/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/ |
D | BluetoothDevicePreferenceTest.java | 51 private BluetoothDevicePreference mPreference; field in BluetoothDevicePreferenceTest 57 mPreference = new BluetoothDevicePreference(mContext, mCachedDevice); in setUp() 62 assertThat(mPreference.isActionShown()).isFalse(); in actionIsHiddenByDefault() 67 mPreference.onAttached(); in onAttached_registersDeviceCallback() 77 mPreference.onAttached(); in onAttached_setsDeviceNameAsTitle() 79 assertThat(mPreference.getTitle()).isEqualTo(name); in onAttached_setsDeviceNameAsTitle() 87 mPreference.onAttached(); in onAttached_setsCarConnectionSummaryAsSummary() 89 assertThat(mPreference.getSummary()).isEqualTo(summary); in onAttached_setsCarConnectionSummaryAsSummary() 97 mPreference.onAttached(); in onAttached_setsIcon() 99 assertThat(mPreference.getIcon()).isNotNull(); in onAttached_setsIcon() [all …]
|
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/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/common/ |
D | PreferenceControllerTest.java | 77 private Preference mPreference; field in PreferenceControllerTest 84 FakePreferenceController.class, mPreference); in setUp() 99 assertThat(mController.getPreference()).isEqualTo(mPreference); in setPreference_correctType_setsPreference() 113 verify(mPreference).setOnPreferenceChangeListener(listenerArgumentCaptor.capture()); in setPreference_registersOnPreferenceChangeListener() 114 listenerArgumentCaptor.getValue().onPreferenceChange(mPreference, newValue); in setPreference_registersOnPreferenceChangeListener() 117 assertThat(mController.getHandlePreferenceChangedPreferenceArg()).isEqualTo(mPreference); in setPreference_registersOnPreferenceChangeListener() 126 verify(mPreference).setOnPreferenceClickListener(listenerArgumentCaptor.capture()); in setPreference_registersOnPreferenceClickListener() 127 listenerArgumentCaptor.getValue().onPreferenceClick(mPreference); in setPreference_registersOnPreferenceClickListener() 130 assertThat(mController.getHandlePreferenceClickedArg()).isEqualTo(mPreference); in setPreference_registersOnPreferenceClickListener() 163 verify(mPreference).setEnabled(false); in onUxRestrictionsChanged_created_restricted_preferenceDisabled() [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/tests/robotests/src/com/android/settings/sound/ |
D | MediaOutputPreferenceControllerTest.java | 101 private Preference mPreference; field in MediaOutputPreferenceControllerTest 152 mPreference = new Preference(mContext); in setUp() 158 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 159 mScreen.addPreference(mPreference); in setUp() 180 mPreference.setVisible(true); in updateState_withoutConnectedBtDevice_preferenceInvisible() 182 assertThat(mPreference.isVisible()).isTrue(); in updateState_withoutConnectedBtDevice_preferenceInvisible() 183 mController.updateState(mPreference); in updateState_withoutConnectedBtDevice_preferenceInvisible() 184 assertThat(mPreference.isVisible()).isFalse(); in updateState_withoutConnectedBtDevice_preferenceInvisible() 198 assertThat(mPreference.isVisible()).isFalse(); in updateState_withConnectedBtDevice_preferenceVisible() 201 mController.updateState(mPreference); in updateState_withConnectedBtDevice_preferenceVisible() [all …]
|
D | HandsFreeProfileOutputPreferenceControllerTest.java | 101 private ListPreference mPreference; field in HandsFreeProfileOutputPreferenceControllerTest 152 mPreference = new ListPreference(mContext); in setUp() 158 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 159 mScreen.addPreference(mPreference); in setUp() 233 mController.updateState(mPreference); in updateState_shouldSetSummary() 235 assertThat(mPreference.isVisible()).isFalse(); in updateState_shouldSetSummary() 236 assertThat(mPreference.getSummary()).isEqualTo( in updateState_shouldSetSummary() 254 mController.updateState(mPreference); in updateState_oneHeadsetsAvailableAndActivated_shouldSetDeviceName() 256 assertThat(mPreference.isVisible()).isTrue(); in updateState_oneHeadsetsAvailableAndActivated_shouldSetDeviceName() 257 assertThat(mPreference.getSummary()).isEqualTo(TEST_DEVICE_NAME_1); in updateState_oneHeadsetsAvailableAndActivated_shouldSetDeviceName() [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/Settings/tests/robotests/src/com/android/settings/notification/ |
D | ShowOnLockscreenNotificationPreferenceControllerTest.java | 61 private RestrictedListPreference mPreference; field in ShowOnLockscreenNotificationPreferenceControllerTest 70 mPreference = new RestrictedListPreference( in setUp() 72 mPreference.setKey(mController.getPreferenceKey()); in setUp() 73 when(mScreen.findPreference(mPreference.getKey())).thenReturn(mPreference); in setUp() 79 assertThat(mPreference.isVisible()).isTrue(); in display_shouldDisplay() 92 mController.updateState(mPreference); in updateState_noNotifsOnLockscreen() 94 assertThat(mPreference.getValue()).isEqualTo( in updateState_noNotifsOnLockscreen() 97 assertThat(mPreference.getSummary()) in updateState_noNotifsOnLockscreen() 110 mController.updateState(mPreference); in updateState_alertingNotifsOnLockscreen() 112 assertThat(mPreference.getValue()).isEqualTo( in updateState_alertingNotifsOnLockscreen() [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 | MobileNetworkSummaryControllerTest.java | 77 private AddPreference mPreference; field in MobileNetworkSummaryControllerTest 95 mPreference = spy(new AddPreference(mContext, null)); in setUp() 96 mPreference.setKey(mController.getPreferenceKey()); in setUp() 98 mPreference); in setUp() 133 mPreference.getOnPreferenceClickListener().onPreferenceClick(mPreference); in getSummary_noSubscriptions_correctSummaryAndClickHandler() 144 assertThat(mPreference.getOnPreferenceClickListener()).isNull(); in getSummary_noSubscriptionsNoEuiccMgr_correctSummaryAndClickHandler() 145 assertThat(mPreference.getFragment()).isNull(); in getSummary_noSubscriptionsNoEuiccMgr_correctSummaryAndClickHandler() 157 assertThat(mPreference.getFragment()).isNull(); in getSummary_oneSubscription_correctSummaryAndClickHandler() 158 mPreference.getOnPreferenceClickListener().onPreferenceClick(mPreference); in getSummary_oneSubscription_correctSummaryAndClickHandler() 181 assertThat(mPreference.getFragment()).isNull(); in getSummary_oneInactivePSim_correctSummaryAndClickHandler() [all …]
|
D | PrivateDnsModeDialogPreferenceTest.java | 62 private PrivateDnsModeDialogPreference mPreference; field in PrivateDnsModeDialogPreferenceTest 82 mPreference = new PrivateDnsModeDialogPreference(mContext); in setUp() 83 ReflectionHelpers.setField(mPreference, "mFragment", fragment); in setUp() 89 mPreference.onBindDialogView(view); in setUp() 94 mPreference.onCheckedChanged(null, R.id.private_dns_mode_off); in testOnCheckedChanged_dnsModeOff_disableEditText() 96 assertThat(mPreference.mMode).isEqualTo(PRIVATE_DNS_MODE_OFF); in testOnCheckedChanged_dnsModeOff_disableEditText() 97 assertThat(mPreference.mEditText.isEnabled()).isFalse(); in testOnCheckedChanged_dnsModeOff_disableEditText() 102 mPreference.onCheckedChanged(null, R.id.private_dns_mode_opportunistic); in testOnCheckedChanged_dnsModeOpportunistic_disableEditText() 104 assertThat(mPreference.mMode).isEqualTo(PRIVATE_DNS_MODE_OPPORTUNISTIC); in testOnCheckedChanged_dnsModeOpportunistic_disableEditText() 105 assertThat(mPreference.mEditText.isEnabled()).isFalse(); in testOnCheckedChanged_dnsModeOpportunistic_disableEditText() [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/development/gamedriver/ |
D | GameDriverEnableForAllAppsPreferenceControllerTest.java | 56 private ListPreference mPreference; field in GameDriverEnableForAllAppsPreferenceControllerTest 85 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp() 115 mController.updateState(mPreference); in displayPreference_shouldAddListPreference() 117 verify(mPreference).setValue(mPreferenceDefault); in displayPreference_shouldAddListPreference() 118 verify(mPreference).setSummary(mPreferenceDefault); in displayPreference_shouldAddListPreference() 141 mController.updateState(mPreference); in updateState_availableAndDefault_visibleAndDefault() 143 verify(mPreference, atLeastOnce()).setVisible(true); in updateState_availableAndDefault_visibleAndDefault() 144 verify(mPreference).setValue(mPreferenceDefault); in updateState_availableAndDefault_visibleAndDefault() 145 verify(mPreference).setSummary(mPreferenceDefault); in updateState_availableAndDefault_visibleAndDefault() 152 mController.updateState(mPreference); in updateState_availableAndGameDriver_visibleAndGameDriver() [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/wifi/tether/ |
D | WifiTetherApBandPreferenceControllerTest.java | 62 private ListPreference mPreference; field in WifiTetherApBandPreferenceControllerTest 68 mPreference = new ListPreference(RuntimeEnvironment.application); in setUp() 74 when(mScreen.findPreference(anyString())).thenReturn(mPreference); in setUp() 90 mController.onPreferenceChange(mPreference, "-1"); in display_5GhzSupported_shouldDisplayFullList() 92 assertThat(mPreference.getSummary()).isEqualTo(ALL_BANDS); in display_5GhzSupported_shouldDisplayFullList() 102 assertThat(mPreference.isEnabled()).isFalse(); in display_noCountryCode_shouldDisable() 103 assertThat(mPreference.getSummary()) in display_noCountryCode_shouldDisable() 114 assertThat(mPreference.isEnabled()).isFalse(); in display_5GhzNotSupported_shouldDisable() 115 assertThat(mPreference.getSummary()) in display_5GhzNotSupported_shouldDisable() 128 mController.onPreferenceChange(mPreference, "-1"); in changePreference_noDualModeWith5G_shouldUpdateValue() [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 …]
|