Make Settings robotest work with tot Robolectric
Bug: 116278591 Test: make -j RunSettingsRoboTests Change-Id: I32cb2fcf6094675f79d2fc24702ef6298a9691e4
This commit is contained in:
@@ -31,16 +31,16 @@ public class AppLocationPermissionPreferenceControllerTest {
|
||||
|
||||
@Test
|
||||
public void isAvailable_noLocationLinkPermission_shouldReturnFalse() {
|
||||
Settings.System.putInt(mContext.getContentResolver(),
|
||||
android.provider.Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED, 0);
|
||||
Settings.Global.putInt(mContext.getContentResolver(),
|
||||
Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED, 0);
|
||||
|
||||
assertThat(mController.isAvailable()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void displayPreference_hasLocationLinkPermission_shouldReturnTrue() {
|
||||
Settings.System.putInt(mContext.getContentResolver(),
|
||||
android.provider.Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED, 1);
|
||||
Settings.Global.putInt(mContext.getContentResolver(),
|
||||
Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED, 1);
|
||||
|
||||
assertThat(mController.isAvailable()).isTrue();
|
||||
}
|
||||
|
Reference in New Issue
Block a user