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

Commit 7662b3d4 authored by Lyn Han's avatar Lyn Han Committed by Android (Google) Code Review
Browse files

Merge "Flag guard bundle tests for RankingCoordinator" into main

parents 750aff82 ae8228ce
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import com.android.systemui.statusbar.notification.collection.listbuilder.plugga
import com.android.systemui.statusbar.notification.collection.provider.HighPriorityProvider;
import com.android.systemui.statusbar.notification.collection.render.NodeController;
import com.android.systemui.statusbar.notification.collection.render.SectionHeaderController;
import com.android.systemui.statusbar.notification.shared.NotificationBundleUi;

import org.junit.Before;
import org.junit.Test;
@@ -157,6 +158,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testSilentHeader_clearableBundle_enableClearSectionTrue() {
        // Set up bundle with clearable listEntry child
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getNEWS());
@@ -314,6 +316,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testSilentSectioner_accepts_bundle() {
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getNEWS());
        assertTrue(mSilentSectioner.isInSection(bundleEntry));
@@ -327,6 +330,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testSilentSectionComparator_sortsBundlesByPrefixedKeys() {
        // This is the sorted order
        BundleEntry socialBundle = new BundleEntry(BundleSpec.Companion.getSOCIAL_MEDIA());
@@ -347,6 +351,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testSilentSectionComparator_sortsBundlesBeforeNotifs() {
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getSOCIAL_MEDIA());
        int comparison = mSilentSectioner.getComparator().compare(bundleEntry, mEntry);
@@ -356,6 +361,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testMinimizedSectioner_rejectsBundle() {
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getNEWS());
        assertFalse(mMinimizedSectioner.isInSection(bundleEntry));