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

Commit d8eb2aca authored by Shubham Basu's avatar Shubham Basu Committed by Zemiao Zhu
Browse files

Add 'throws Exception' to test cases with assumeFalse.

Bug: 187005646
Test: atest DocumentsUIGoogleTests
Change-Id: I3e437385c6982dbb6b0211589d45888c94be2f3a
parent 243923a1
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));