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

Commit 339c9812 authored by Youngjun Kwak's avatar Youngjun Kwak Committed by Android (Google) Code Review
Browse files

Merge "Fix AAOS SystemUI Presubmit tests that are breaking." into rvc-qpr-dev

parents 4ee23daf 4a6f9b97
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -48,6 +48,10 @@ import org.mockito.MockitoAnnotations;
@SmallTest
public class CarNavigationBarControllerTest extends SysuiTestCase {

    private static final String TOP_NOTIFICATION_PANEL =
            "com.android.systemui.car.notification.TopNotificationPanelViewMediator";
    private static final String BOTTOM_NOTIFICATION_PANEL =
            "com.android.systemui.car.notification.BottomNotificationPanelViewMediator";
    private CarNavigationBarController mCarNavigationBar;
    private NavigationBarViewFactory mNavigationBarViewFactory;
    private TestableResources mTestableResources;
@@ -117,6 +121,11 @@ public class CarNavigationBarControllerTest extends SysuiTestCase {
    @Test
    public void testGetTopWindow_topDisabled_returnsNull() {
        mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, false);
        mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
        // If Top Notification Panel is used but top navigation bar is not enabled, SystemUI is
        // expected to crash.
        mTestableResources.addOverride(R.string.config_notificationPanelViewMediator,
                BOTTOM_NOTIFICATION_PANEL);
        mCarNavigationBar = createNavigationBarController();

        ViewGroup window = mCarNavigationBar.getTopWindow();
@@ -148,6 +157,11 @@ public class CarNavigationBarControllerTest extends SysuiTestCase {
    @Test
    public void testGetBottomWindow_bottomDisabled_returnsNull() {
        mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, false);
        mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
        // If Bottom Notification Panel is used but bottom navigation bar is not enabled,
        // SystemUI is expected to crash.
        mTestableResources.addOverride(R.string.config_notificationPanelViewMediator,
                TOP_NOTIFICATION_PANEL);
        mCarNavigationBar = createNavigationBarController();

        ViewGroup window = mCarNavigationBar.getBottomWindow();