Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e1e76bb authored by Shubham Basu's avatar Shubham Basu Committed by Automerger Merge Worker
Browse files

Add 'throws Exception' to test cases with assumeFalse. am: d8eb2aca

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/DocumentsUI/+/14518678

Change-Id: I68e11bf441474e17278ae77b025869ed9c1a27ba
parents 511981b7 d8eb2aca
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public class DarkThemeUiTest extends ThemeUiTestBase {
    }

    @Test
    public void themeNightModeEnable_actionBarColorShouldBeDark() {
    public void themeNightModeEnable_actionBarColorShouldBeDark() throws Exception {
        assumeFalse(VersionUtils.isAtLeastS()); // Disable for S dynamic color
        assertTheme(R.styleable.ThemeColor, R.styleable.ThemeColor_android_colorBackground,
                mTheme.getResources().getColor(com.android.documentsui.R.color.app_background_color,
@@ -75,7 +75,7 @@ public class DarkThemeUiTest extends ThemeUiTestBase {
    }

    @Test
    public void themeNightModeEnable_windowBackgroundColorShouldBeDark() {
    public void themeNightModeEnable_windowBackgroundColorShouldBeDark() throws Exception {
        assumeFalse(VersionUtils.isAtLeastS()); // Disable for S dynamic color
        assertTheme(R.styleable.SystemWindow, R.styleable.SystemWindow_android_windowBackground,
                mTheme.getResources().getColor(com.android.documentsui.R.color.app_background_color,
@@ -83,7 +83,7 @@ public class DarkThemeUiTest extends ThemeUiTestBase {
    }

    @Test
    public void themeNightModeEnable_statusBarColorShouldBeDark() {
    public void themeNightModeEnable_statusBarColorShouldBeDark() throws Exception {
        assumeFalse(VersionUtils.isAtLeastS()); // Disable for S dynamic color
        assertTheme(R.styleable.SystemWindow, R.styleable.SystemWindow_android_statusBarColor,
                mTheme.getResources().getColor(com.android.documentsui.R.color.app_background_color,
@@ -91,7 +91,7 @@ public class DarkThemeUiTest extends ThemeUiTestBase {
    }

    @Test
    public void appCompatThemeNightModeEnable_colorPrimaryShouldBeThemeable() {
    public void appCompatThemeNightModeEnable_colorPrimaryShouldBeThemeable() throws Exception {
        assumeFalse(VersionUtils.isAtLeastS()); // Disable for S dynamic color
        assertTheme(R.styleable.ThemeColor, R.styleable.ThemeColor_android_colorPrimary,
                mTheme.getResources().getColor(com.android.documentsui.R.color.primary, mTheme));
+5 −5
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ public class ThemeUiTest extends ThemeUiTestBase {
    }

    @Test
    public void themeNightModeDisable_actionBarColorShouldBeLight() {
    public void themeNightModeDisable_actionBarColorShouldBeLight() throws Exception {
        assumeFalse(VersionUtils.isAtLeastS()); // Disable for S dynamic color
        assertTheme(R.styleable.ThemeColor, R.styleable.ThemeColor_android_colorBackground,
                Color.WHITE);
@@ -65,28 +65,28 @@ public class ThemeUiTest extends ThemeUiTestBase {
    }

    @Test
    public void themeNightModeDisable_navigationBarColorShouldBeLight() {
    public void themeNightModeDisable_navigationBarColorShouldBeLight() throws Exception {
        assumeFalse(VersionUtils.isAtLeastS()); // Disable for S dynamic color
        assertTheme(R.styleable.SystemWindow, R.styleable.SystemWindow_android_navigationBarColor,
                Color.WHITE);
    }

    @Test
    public void themeNightModeDisable_windowBackgroundColorShouldBeLight() {
    public void themeNightModeDisable_windowBackgroundColorShouldBeLight() throws Exception {
        assumeFalse(VersionUtils.isAtLeastS()); // Disable for S dynamic color
        assertTheme(R.styleable.SystemWindow, R.styleable.SystemWindow_android_windowBackground,
                Color.WHITE);
    }

    @Test
    public void themeNightModeDisable_statusBarColorShouldBeLight() {
    public void themeNightModeDisable_statusBarColorShouldBeLight() throws Exception {
        assumeFalse(VersionUtils.isAtLeastS()); // Disable for S dynamic color
        assertTheme(R.styleable.SystemWindow, R.styleable.SystemWindow_android_statusBarColor,
                Color.WHITE);
    }

    @Test
    public void appCompatThemeNightModeDisable_colorPrimaryShouldBeThemeable() {
    public void appCompatThemeNightModeDisable_colorPrimaryShouldBeThemeable() throws Exception {
        assumeFalse(VersionUtils.isAtLeastS()); // Disable for S dynamic color
        assertTheme(R.styleable.ThemeColor, R.styleable.ThemeColor_android_colorPrimary,
                mTheme.getResources().getColor(com.android.documentsui.R.color.primary, mTheme));