From af4e91db85596595c9244e8d1813e19f0c78e594 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Wed, 26 Jul 2023 12:32:11 +0000 Subject: [PATCH] Disable FontWeightAdjustmentPreferenceControllerTest The test modifies the system-global font weight adjustment setting, but doesn't reset it, leaving the system in a bad state for subsequent tests. Bug: 293250385 Change-Id: I9f7b8fc100b71181d17e5e72cc8c6d871c41de7d Test: n/a Bug: 293250385 Change-Id: I9f7b8fc100b71181d17e5e72cc8c6d871c41de7d Test: n/a --- .../FontWeightAdjustmentPreferenceControllerTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit/src/com/android/settings/accessibility/FontWeightAdjustmentPreferenceControllerTest.java b/tests/unit/src/com/android/settings/accessibility/FontWeightAdjustmentPreferenceControllerTest.java index e3d240872d5..3e0670a70f1 100644 --- a/tests/unit/src/com/android/settings/accessibility/FontWeightAdjustmentPreferenceControllerTest.java +++ b/tests/unit/src/com/android/settings/accessibility/FontWeightAdjustmentPreferenceControllerTest.java @@ -28,6 +28,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.android.settings.core.BasePreferenceController; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -52,12 +53,14 @@ public class FontWeightAdjustmentPreferenceControllerTest { } @Test + @Ignore("modifies system-wide fontscale, but doesn't reset it. b/293250385") public void getAvailabilityStatus_byDefault_shouldReturnAvailable() { assertThat(mController.getAvailabilityStatus()).isEqualTo( BasePreferenceController.AVAILABLE); } @Test + @Ignore("modifies system-wide fontscale, but doesn't reset it. b/293250385") public void isChecked_enabledBoldText_shouldReturnTrue() { Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.FONT_WEIGHT_ADJUSTMENT, ON); @@ -69,6 +72,7 @@ public class FontWeightAdjustmentPreferenceControllerTest { } @Test + @Ignore("modifies system-wide fontscale, but doesn't reset it. b/293250385") public void isChecked_disabledBoldText_shouldReturnFalse() { Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.FONT_WEIGHT_ADJUSTMENT, OFF); @@ -80,6 +84,7 @@ public class FontWeightAdjustmentPreferenceControllerTest { } @Test + @Ignore("modifies system-wide fontscale, but doesn't reset it. b/293250385") public void setChecked_setTrue_shouldEnableBoldText() { mController.setChecked(true); @@ -88,6 +93,7 @@ public class FontWeightAdjustmentPreferenceControllerTest { } @Test + @Ignore("modifies system-wide fontscale, but doesn't reset it. b/293250385") public void setChecked_setFalse_shouldDisableBoldText() { mController.setChecked(false); @@ -96,6 +102,7 @@ public class FontWeightAdjustmentPreferenceControllerTest { } @Test + @Ignore("modifies system-wide fontscale, but doesn't reset it. b/293250385") public void resetState_shouldDisableBoldText() { mController.setChecked(true);