Change string of switchbar and installed service category title
Bug: 122897712 Test: Visual Change-Id: I0f56b4b7375e651a74189dd17e6b3bd8b99ccfca
This commit is contained in:
@@ -84,6 +84,24 @@ public class SwitchBarTest {
|
||||
.isEqualTo(mContext.getString(onText));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setCheck_customLabelWithStringType_shouldUpdateTextAndBackground() {
|
||||
final String onText = mContext.getString(
|
||||
R.string.accessibility_service_master_switch_title);
|
||||
final String offText = mContext.getString(
|
||||
R.string.accessibility_service_master_switch_title);
|
||||
final TextView switchBarTextView = ((TextView) mBar.findViewById(R.id.switch_text));
|
||||
|
||||
mBar.setSwitchBarText(onText, offText);
|
||||
|
||||
assertThat(switchBarTextView.getText()).isEqualTo(offText);
|
||||
|
||||
mBar.setChecked(true);
|
||||
|
||||
assertThat(mBar.getBackground()).isInstanceOf(ColorDrawable.class);
|
||||
assertThat(switchBarTextView.getText()).isEqualTo(onText);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void disabledByAdmin_shouldDelegateToRestrictedIcon() {
|
||||
mBar.setDisabledByAdmin(new EnforcedAdmin());
|
||||
|
Reference in New Issue
Block a user