Settings: fix ShowRefreshRatePreferenceControllerTest
ShowRefreshRatePreferenceControllerTest is using an incorrect type (Int vs. Bool) which causing a test to fail. Bug: 146767072 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.development Change-Id: I9269c01619eebac9c0eac29e23f248d1c6d48ba5
This commit is contained in:
@@ -39,7 +39,6 @@ import androidx.preference.SwitchPreference;
|
|||||||
import com.android.settings.testutils.shadow.ShadowParcel;
|
import com.android.settings.testutils.shadow.ShadowParcel;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
@@ -87,10 +86,9 @@ public class ShowRefreshRatePreferenceControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
@Config(shadows = ShadowParcel.class)
|
@Config(shadows = ShadowParcel.class)
|
||||||
public void updateState_settingEnabled_shouldCheckPreference() throws RemoteException {
|
public void updateState_settingEnabled_shouldCheckPreference() throws RemoteException {
|
||||||
ShadowParcel.sReadIntResult = 1;
|
ShadowParcel.sReadBoolResult = true;
|
||||||
doReturn(true).when(mSurfaceFlinger)
|
doReturn(true).when(mSurfaceFlinger)
|
||||||
.transact(eq(SURFACE_FLINGER_CODE), any(), any(), eq(0 /* flags */));
|
.transact(eq(SURFACE_FLINGER_CODE), any(), any(), eq(0 /* flags */));
|
||||||
mController.updateState(mPreference);
|
mController.updateState(mPreference);
|
||||||
@@ -101,7 +99,7 @@ public class ShowRefreshRatePreferenceControllerTest {
|
|||||||
@Test
|
@Test
|
||||||
@Config(shadows = {ShadowParcel.class})
|
@Config(shadows = {ShadowParcel.class})
|
||||||
public void updateState_settingDisabled_shouldUnCheckPreference() throws RemoteException {
|
public void updateState_settingDisabled_shouldUnCheckPreference() throws RemoteException {
|
||||||
ShadowParcel.sReadIntResult = 0;
|
ShadowParcel.sReadBoolResult = false;
|
||||||
doReturn(true).when(mSurfaceFlinger)
|
doReturn(true).when(mSurfaceFlinger)
|
||||||
.transact(eq(SURFACE_FLINGER_CODE), any(), any(), eq(0 /* flags */));
|
.transact(eq(SURFACE_FLINGER_CODE), any(), any(), eq(0 /* flags */));
|
||||||
mController.updateState(mPreference);
|
mController.updateState(mPreference);
|
||||||
|
Reference in New Issue
Block a user