diff options
author | 2025-01-15 07:16:25 -0800 | |
---|---|---|
committer | 2025-01-15 07:16:25 -0800 | |
commit | 3cf28edcf2ad87d4d819becbc3b384241fe8ed18 (patch) | |
tree | 2396cbca621c26e5dca7c4f1087b55c143d9cc75 | |
parent | b7cdebf4575d0c6a82f3bf9362fa0a700bc79f25 (diff) | |
parent | b0160ea4d632e77961fad2cfb3d4447b3c3fc5d0 (diff) |
Merge "Revert "[ProgressStyle] Add API coverage tests"" into main
-rw-r--r-- | core/tests/coretests/src/android/app/NotificationTest.java | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/core/tests/coretests/src/android/app/NotificationTest.java b/core/tests/coretests/src/android/app/NotificationTest.java index 7be6950fb613..ca6ad6fae46e 100644 --- a/core/tests/coretests/src/android/app/NotificationTest.java +++ b/core/tests/coretests/src/android/app/NotificationTest.java @@ -2504,21 +2504,6 @@ public class NotificationTest { @Test @EnableFlags(Flags.FLAG_API_RICH_ONGOING) - public void progressStyle_setProgressSegments() { - final List<Notification.ProgressStyle.Segment> segments = List.of( - new Notification.ProgressStyle.Segment(100).setColor(Color.WHITE), - new Notification.ProgressStyle.Segment(50).setColor(Color.RED), - new Notification.ProgressStyle.Segment(50).setColor(Color.BLUE) - ); - - final Notification.ProgressStyle progressStyle1 = new Notification.ProgressStyle(); - progressStyle1.setProgressSegments(segments); - - assertThat(progressStyle1.getProgressSegments()).isEqualTo(segments); - } - - @Test - @EnableFlags(Flags.FLAG_API_RICH_ONGOING) public void progressStyle_addProgressPoint_dropsNegativePoints() { // GIVEN final Notification.ProgressStyle progressStyle = new Notification.ProgressStyle(); @@ -2547,21 +2532,6 @@ public class NotificationTest { @Test @EnableFlags(Flags.FLAG_API_RICH_ONGOING) - public void progressStyle_setProgressPoints() { - final List<Notification.ProgressStyle.Point> points = List.of( - new Notification.ProgressStyle.Point(0).setColor(Color.WHITE), - new Notification.ProgressStyle.Point(50).setColor(Color.RED), - new Notification.ProgressStyle.Point(100).setColor(Color.BLUE) - ); - - final Notification.ProgressStyle progressStyle1 = new Notification.ProgressStyle(); - progressStyle1.setProgressPoints(points); - - assertThat(progressStyle1.getProgressPoints()).isEqualTo(points); - } - - @Test - @EnableFlags(Flags.FLAG_API_RICH_ONGOING) public void progressStyle_createProgressModel_ignoresPointsExceedingMax() { // GIVEN final Notification.ProgressStyle progressStyle = new Notification.ProgressStyle(); @@ -2703,58 +2673,11 @@ public class NotificationTest { @Test @EnableFlags(Flags.FLAG_API_RICH_ONGOING) - public void progressStyle_setProgressIndeterminate() { - final Notification.ProgressStyle progressStyle1 = new Notification.ProgressStyle(); - progressStyle1.setProgressIndeterminate(true); - assertThat(progressStyle1.isProgressIndeterminate()).isTrue(); - } - - @Test - @EnableFlags(Flags.FLAG_API_RICH_ONGOING) public void progressStyle_styledByProgress_defaultValueTrue() { final Notification.ProgressStyle progressStyle1 = new Notification.ProgressStyle(); assertThat(progressStyle1.isStyledByProgress()).isTrue(); } - - @Test - @EnableFlags(Flags.FLAG_API_RICH_ONGOING) - public void progressStyle_setStyledByProgress() { - final Notification.ProgressStyle progressStyle1 = new Notification.ProgressStyle(); - progressStyle1.setStyledByProgress(false); - assertThat(progressStyle1.isStyledByProgress()).isFalse(); - } - - @Test - @EnableFlags(Flags.FLAG_API_RICH_ONGOING) - public void progressStyle_point() { - final int id = 1; - final int position = 10; - final int color = Color.RED; - - final Notification.ProgressStyle.Point point = - new Notification.ProgressStyle.Point(position).setId(id).setColor(color); - - assertEquals(id, point.getId()); - assertEquals(position, point.getPosition()); - assertEquals(color, point.getColor()); - } - - @Test - @EnableFlags(Flags.FLAG_API_RICH_ONGOING) - public void progressStyle_segment() { - final int id = 1; - final int length = 100; - final int color = Color.RED; - - final Notification.ProgressStyle.Segment segment = - new Notification.ProgressStyle.Segment(length).setId(id).setColor(color); - - assertEquals(id, segment.getId()); - assertEquals(length, segment.getLength()); - assertEquals(color, segment.getColor()); - } - private void assertValid(Notification.Colors c) { // Assert that all colors are populated assertThat(c.getBackgroundColor()).isNotEqualTo(Notification.COLOR_INVALID); |