Merge "[Settings] Suspend some test case(s)" am: a70e45b03c
am: 9bd271763e
am: 1bacc5697b
Change-Id: I5d301b54ce7b9c7dab72d713eeef1ffbf748ed14
This commit is contained in:
@@ -29,6 +29,7 @@ import com.android.settings.testutils.shadow.ShadowWifiP2pManager;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -62,6 +63,7 @@ public class ResetNetworkConfirmTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testResetNetworkData_resetEsim() {
|
||||
mResetNetworkConfirm.mEraseEsim = true;
|
||||
|
||||
@@ -72,6 +74,7 @@ public class ResetNetworkConfirmTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testResetNetworkData_notResetEsim() {
|
||||
mResetNetworkConfirm.mEraseEsim = false;
|
||||
|
||||
|
@@ -66,6 +66,7 @@ import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -164,6 +165,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateNetworkProviderWithFoobarCarrier_shouldUpdateCarrierWithFoobar() {
|
||||
final CharSequence carrierName = "foobar";
|
||||
doReturn(carrierName).when(mSubscriptionInfo).getCarrierName();
|
||||
@@ -174,6 +176,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updatePhoneNumberWith1111111111_shouldUpdatePhoneNumber() {
|
||||
ShadowDeviceInfoUtils.setPhoneNumber("1111111111");
|
||||
|
||||
@@ -186,6 +189,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateLatestAreaInfoWithCdmaPhone_shouldRemoveOperatorInfoSetting() {
|
||||
when(mTelephonyManager.getPhoneType()).thenReturn(TelephonyManager.PHONE_TYPE_CDMA);
|
||||
|
||||
@@ -196,6 +200,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateServiceStateWithInService_shouldUpdateTextToBeCInService() {
|
||||
when(mServiceState.getState()).thenReturn(ServiceState.STATE_IN_SERVICE);
|
||||
|
||||
@@ -206,6 +211,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateServiceStateWithPowerOff_shouldUpdateTextAndResetSignalStrength() {
|
||||
when(mServiceState.getState()).thenReturn(ServiceState.STATE_POWER_OFF);
|
||||
when(mPersistableBundle.getBoolean(
|
||||
@@ -219,6 +225,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateVoiceDataOutOfService_shouldUpdateSettingAndResetSignalStrength() {
|
||||
when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
|
||||
when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
|
||||
@@ -233,6 +240,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateVoiceOutOfServiceDataInService_shouldUpdateTextToBeInService() {
|
||||
when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
|
||||
when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
|
||||
@@ -246,6 +254,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateSignalStrengthWithLte50Wcdma40_shouldUpdateSignalStrengthTo50() {
|
||||
final int lteDbm = 50;
|
||||
final int lteAsu = 50;
|
||||
@@ -263,6 +272,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateSignalStrengthWithLte50Cdma30_shouldUpdateSignalStrengthTo50() {
|
||||
final int lteDbm = 50;
|
||||
final int lteAsu = 50;
|
||||
@@ -280,6 +290,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateVoiceOutOfServiceDataInService_shouldUpdateSignalStrengthTo50() {
|
||||
when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
|
||||
when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
|
||||
@@ -300,6 +311,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateVoiceNetworkTypeWithEdge_shouldUpdateSettingToEdge() {
|
||||
when(mTelephonyManager.getVoiceNetworkType(anyInt())).thenReturn(
|
||||
TelephonyManager.NETWORK_TYPE_EDGE);
|
||||
@@ -311,6 +323,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateDataNetworkTypeWithEdge_shouldUpdateSettingToEdge() {
|
||||
when(mTelephonyManager.getDataNetworkType(anyInt())).thenReturn(
|
||||
TelephonyManager.NETWORK_TYPE_EDGE);
|
||||
@@ -322,6 +335,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateRoamingStatusIsRoaming_shouldSetSettingToRoaming() {
|
||||
when(mServiceState.getRoaming()).thenReturn(true);
|
||||
|
||||
@@ -332,6 +346,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_updateRoamingStatusNotRoaming_shouldSetSettingToRoamingOff() {
|
||||
when(mServiceState.getRoaming()).thenReturn(false);
|
||||
|
||||
@@ -342,6 +357,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_doNotShowIccid_shouldRemoveIccidSetting() {
|
||||
when(mPersistableBundle.getBoolean(
|
||||
CarrierConfigManager.KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL)).thenReturn(false);
|
||||
@@ -353,6 +369,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_doNotShowSignalStrength_shouldRemoveSignalStrengthSetting() {
|
||||
when(mPersistableBundle.getBoolean(
|
||||
CarrierConfigManager.KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL))
|
||||
@@ -365,6 +382,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_showSignalStrengthAndIccId_shouldShowSignalStrengthAndIccIdSetting() {
|
||||
// getConfigForSubId is nullable, so make sure the default behavior is correct
|
||||
when(mCarrierConfigManager.getConfigForSubId(anyInt())).thenReturn(null);
|
||||
@@ -377,6 +395,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_showIccid_shouldSetIccidToSetting() {
|
||||
final String iccid = "12351351231241";
|
||||
when(mPersistableBundle.getBoolean(
|
||||
@@ -389,6 +408,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_showEid_shouldSetEidToSetting() {
|
||||
final String eid = "12351351231241";
|
||||
when(mEuiccManager.getEid()).thenReturn(eid);
|
||||
@@ -400,6 +420,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_showEid_euiccManagerIsNotEnabled() {
|
||||
when(mEuiccManager.isEnabled()).thenReturn(false);
|
||||
|
||||
@@ -410,6 +431,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_imsRegistered_shouldSetImsRegistrationStateSummaryToRegisterd() {
|
||||
when(mPersistableBundle.getBoolean(
|
||||
CarrierConfigManager.KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL)).thenReturn(true);
|
||||
@@ -422,6 +444,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_imsNotRegistered_shouldSetImsRegistrationStateSummaryToNotRegisterd() {
|
||||
when(mPersistableBundle.getBoolean(
|
||||
CarrierConfigManager.KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL)).thenReturn(true);
|
||||
@@ -434,6 +457,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_showImsRegistration_shouldNotRemoveImsRegistrationStateSetting() {
|
||||
when(mPersistableBundle.getBoolean(
|
||||
CarrierConfigManager.KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL)).thenReturn(true);
|
||||
@@ -444,6 +468,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_doNotShowImsRegistration_shouldRemoveImsRegistrationStateSetting() {
|
||||
when(mPersistableBundle.getBoolean(
|
||||
CarrierConfigManager.KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL)).thenReturn(false);
|
||||
@@ -455,6 +480,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void initialize_nullSignalStrength_noCrash() {
|
||||
doReturn(null).when(mController).getSignalStrength();
|
||||
// we should not crash when running the following line
|
||||
|
@@ -38,6 +38,7 @@ import com.android.settingslib.RestrictedSwitchPreference;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -125,6 +126,7 @@ public class AirplaneModePreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void airplaneModePreference_testSetValue_updatesCorrectly() {
|
||||
// Airplane mode default off
|
||||
Settings.Global.putInt(mResolver, Settings.Global.AIRPLANE_MODE_ON, OFF);
|
||||
|
@@ -41,6 +41,7 @@ import android.telephony.euicc.EuiccManager;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
@@ -95,12 +96,14 @@ public class MobileNetworkListControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void displayPreference_noSubscriptions_noCrash() {
|
||||
mController.displayPreference(mPreferenceScreen);
|
||||
mController.onResume();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void displayPreference_eSimNotSupported_addMoreLinkNotVisible() {
|
||||
when(mEuiccManager.isEnabled()).thenReturn(false);
|
||||
mController.displayPreference(mPreferenceScreen);
|
||||
@@ -109,6 +112,7 @@ public class MobileNetworkListControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void displayPreference_eSimSupported_addMoreLinkIsVisible() {
|
||||
when(mEuiccManager.isEnabled()).thenReturn(true);
|
||||
when(mTelephonyManager.getNetworkCountryIso()).thenReturn("");
|
||||
@@ -118,6 +122,7 @@ public class MobileNetworkListControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void displayPreference_twoSubscriptions_correctlySetup() {
|
||||
final SubscriptionInfo sub1 = createMockSubscription(1, "sub1");
|
||||
final SubscriptionInfo sub2 = createMockSubscription(2, "sub2");
|
||||
@@ -148,6 +153,7 @@ public class MobileNetworkListControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void displayPreference_oneActiveESimOneInactivePSim_correctlySetup() {
|
||||
final SubscriptionInfo sub1 = createMockSubscription(1, "sub1");
|
||||
final SubscriptionInfo sub2 = createMockSubscription(2, "sub2");
|
||||
@@ -184,6 +190,7 @@ public class MobileNetworkListControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void onSubscriptionsChanged_twoSubscriptionsOneChangesName_preferenceUpdated() {
|
||||
final SubscriptionInfo sub1 = createMockSubscription(1, "sub1");
|
||||
final SubscriptionInfo sub2 = createMockSubscription(2, "sub2");
|
||||
@@ -200,6 +207,7 @@ public class MobileNetworkListControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void onSubscriptionsChanged_startWithThreeSubsAndRemoveOne_correctPreferenceRemoved() {
|
||||
final SubscriptionInfo sub1 = createMockSubscription(1, "sub1");
|
||||
final SubscriptionInfo sub2 = createMockSubscription(2, "sub2");
|
||||
|
Reference in New Issue
Block a user