mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add some missing TAG values to ExoPlayerTest
PiperOrigin-RevId: 302646400
This commit is contained in:
parent
aa987fdb79
commit
d47ceae165
1 changed files with 21 additions and 42 deletions
|
|
@ -912,8 +912,7 @@ public final class ExoPlayerTest {
|
||||||
new FakeMediaSource(fakeTimeline, Builder.VIDEO_FORMAT),
|
new FakeMediaSource(fakeTimeline, Builder.VIDEO_FORMAT),
|
||||||
new FakeMediaSource(fakeTimeline, Builder.VIDEO_FORMAT));
|
new FakeMediaSource(fakeTimeline, Builder.VIDEO_FORMAT));
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testResetMediaSourcesWithPositionResetAndShufflingUsesFirstPeriod")
|
|
||||||
// Wait for first preparation and enable shuffling. Plays period 0.
|
// Wait for first preparation and enable shuffling. Plays period 0.
|
||||||
.pause()
|
.pause()
|
||||||
.waitForPlaybackState(Player.STATE_READY)
|
.waitForPlaybackState(Player.STATE_READY)
|
||||||
|
|
@ -1576,8 +1575,7 @@ public final class ExoPlayerTest {
|
||||||
new ConcatenatingMediaSource(/* isAtomic= */ false, new FakeShuffleOrder(0));
|
new ConcatenatingMediaSource(/* isAtomic= */ false, new FakeShuffleOrder(0));
|
||||||
AtomicInteger windowIndexAfterAddingSources = new AtomicInteger();
|
AtomicInteger windowIndexAfterAddingSources = new AtomicInteger();
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testRestartAfterEmptyTimelineWithShuffleModeEnabledUsesCorrectFirstPeriod")
|
|
||||||
.setShuffleModeEnabled(true)
|
.setShuffleModeEnabled(true)
|
||||||
// Preparing with an empty media source will transition to ended state.
|
// Preparing with an empty media source will transition to ended state.
|
||||||
.waitForPlaybackState(Player.STATE_ENDED)
|
.waitForPlaybackState(Player.STATE_ENDED)
|
||||||
|
|
@ -3864,8 +3862,7 @@ public final class ExoPlayerTest {
|
||||||
int[] timelineWindowCounts = new int[4];
|
int[] timelineWindowCounts = new int[4];
|
||||||
int[] maskingPlaybackState = {C.INDEX_UNSET};
|
int[] maskingPlaybackState = {C.INDEX_UNSET};
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testModifyPlaylistUnprepared_remainsInIdle_needsPrepareForBuffering")
|
|
||||||
.waitForTimelineChanged(dummyTimeline, Player.TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED)
|
.waitForTimelineChanged(dummyTimeline, Player.TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED)
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlaybackStateCollector(/* index= */ 0, playbackStates, timelineWindowCounts))
|
new PlaybackStateCollector(/* index= */ 0, playbackStates, timelineWindowCounts))
|
||||||
|
|
@ -3948,8 +3945,7 @@ public final class ExoPlayerTest {
|
||||||
Timeline timeline = new FakeTimeline(/* windowCount= */ 1);
|
Timeline timeline = new FakeTimeline(/* windowCount= */ 1);
|
||||||
FakeMediaSource secondMediaSource = new FakeMediaSource(timeline);
|
FakeMediaSource secondMediaSource = new FakeMediaSource(timeline);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testModifyPlaylistPrepared_remainsInEnded_needsSeekForBuffering")
|
|
||||||
.waitForTimelineChanged(timeline, Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
.waitForTimelineChanged(timeline, Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.waitForPlaybackState(Player.STATE_BUFFERING)
|
.waitForPlaybackState(Player.STATE_BUFFERING)
|
||||||
.waitForPlaybackState(Player.STATE_READY)
|
.waitForPlaybackState(Player.STATE_READY)
|
||||||
|
|
@ -4011,8 +4007,7 @@ public final class ExoPlayerTest {
|
||||||
int[] playbackStateHolder = new int[3];
|
int[] playbackStateHolder = new int[3];
|
||||||
int[] windowCountHolder = new int[3];
|
int[] windowCountHolder = new int[3];
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testStopWithNoReset_modifyingPlaylistRemainsInIdleState_needsPrepareForBuffering")
|
|
||||||
.waitForPlaybackState(Player.STATE_READY)
|
.waitForPlaybackState(Player.STATE_READY)
|
||||||
.stop(/* reset= */ false)
|
.stop(/* reset= */ false)
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
|
|
@ -4405,8 +4400,7 @@ public final class ExoPlayerTest {
|
||||||
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
||||||
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_empty_whenEmpty_validInitialSeek_correctMaskingWindowIndex")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
|
|
@ -4448,8 +4442,7 @@ public final class ExoPlayerTest {
|
||||||
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
||||||
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_empty_whenEmpty_invalidInitialSeek_correctMaskingWindowIndex")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
|
|
@ -4556,8 +4549,7 @@ public final class ExoPlayerTest {
|
||||||
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
||||||
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_whenEmpty_validInitialSeek_correctMaskingWindowIndex")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
|
|
@ -4599,8 +4591,7 @@ public final class ExoPlayerTest {
|
||||||
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
||||||
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_whenEmpty_invalidInitialSeek_correctMaskingWindowIndex")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
|
|
@ -4747,8 +4738,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] maskingPlaybackStates = new int[1];
|
final int[] maskingPlaybackStates = new int[1];
|
||||||
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_whenIdle_invalidSeek_correctMaskingPlaybackState")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
|
|
@ -4788,8 +4778,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] maskingPlaybackStates = new int[1];
|
final int[] maskingPlaybackStates = new int[1];
|
||||||
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_whenIdle_noSeek_correctMaskingPlaybackState")
|
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -4825,8 +4814,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] maskingPlaybackStates = new int[1];
|
final int[] maskingPlaybackStates = new int[1];
|
||||||
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_whenIdle_noSeekEmpty_correctMaskingPlaybackState")
|
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -4951,8 +4939,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] maskingPlaybackStates = new int[1];
|
final int[] maskingPlaybackStates = new int[1];
|
||||||
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_whenEnded_invalidSeek_correctMaskingPlaybackState")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.waitForPlaybackState(Player.STATE_ENDED)
|
.waitForPlaybackState(Player.STATE_ENDED)
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
|
|
@ -4992,8 +4979,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] maskingPlaybackStates = new int[1];
|
final int[] maskingPlaybackStates = new int[1];
|
||||||
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_whenEnded_noSeek_correctMaskingPlaybackState")
|
|
||||||
.waitForPlaybackState(Player.STATE_READY)
|
.waitForPlaybackState(Player.STATE_READY)
|
||||||
.clearMediaItems()
|
.clearMediaItems()
|
||||||
.waitForPlaybackState(Player.STATE_ENDED)
|
.waitForPlaybackState(Player.STATE_ENDED)
|
||||||
|
|
@ -5035,8 +5021,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] maskingPlaybackStates = new int[1];
|
final int[] maskingPlaybackStates = new int[1];
|
||||||
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_whenEnded_noSeekEmpty_correctMaskingPlaybackState")
|
|
||||||
.waitForPlaybackState(Player.STATE_READY)
|
.waitForPlaybackState(Player.STATE_READY)
|
||||||
.clearMediaItems()
|
.clearMediaItems()
|
||||||
.waitForPlaybackState(Player.STATE_ENDED)
|
.waitForPlaybackState(Player.STATE_ENDED)
|
||||||
|
|
@ -5191,8 +5176,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] maskingPlaybackStates = new int[1];
|
final int[] maskingPlaybackStates = new int[1];
|
||||||
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testSetMediaSources_whenPrepared_invalidSeek_correctMaskingPlaybackState")
|
|
||||||
.pause()
|
.pause()
|
||||||
.waitForPlaybackState(Player.STATE_ENDED)
|
.waitForPlaybackState(Player.STATE_ENDED)
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
|
|
@ -5242,8 +5226,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] currentWindowIndices = new int[5];
|
final int[] currentWindowIndices = new int[5];
|
||||||
Arrays.fill(currentWindowIndices, C.INDEX_UNSET);
|
Arrays.fill(currentWindowIndices, C.INDEX_UNSET);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testAddMediaSources_skipSettingMediaItems_validInitialSeek_correctMaskingWindowIndex")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
|
|
@ -5290,8 +5273,7 @@ public final class ExoPlayerTest {
|
||||||
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
||||||
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET};
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testAddMediaSources_skipSettingMediaItems_invalidInitialSeek_correctMaskingWindowIndex")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
|
|
@ -5487,8 +5469,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET};
|
final int[] currentWindowIndices = {C.INDEX_UNSET, C.INDEX_UNSET};
|
||||||
final long[] currentPositions = {C.TIME_UNSET, C.TIME_UNSET};
|
final long[] currentPositions = {C.TIME_UNSET, C.TIME_UNSET};
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testRemoveMediaItems_CurrentItemRemoved_correctMaskingWindowIndex")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
|
|
@ -5531,8 +5512,7 @@ public final class ExoPlayerTest {
|
||||||
final int[] maskingPlaybackStates = new int[4];
|
final int[] maskingPlaybackStates = new int[4];
|
||||||
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testRemoveMediaItems_CurrentItemRemovedThatIsTheLast_correctMaskingWindowIndex")
|
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.waitForPlaybackState(Player.STATE_READY)
|
.waitForPlaybackState(Player.STATE_READY)
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
|
|
@ -5640,8 +5620,7 @@ public final class ExoPlayerTest {
|
||||||
Timeline secondTimeline = new FakeTimeline(/* windowCount= */ 1, new Object());
|
Timeline secondTimeline = new FakeTimeline(/* windowCount= */ 1, new Object());
|
||||||
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
MediaSource secondMediaSource = new FakeMediaSource(secondTimeline);
|
||||||
ActionSchedule actionSchedule =
|
ActionSchedule actionSchedule =
|
||||||
new ActionSchedule.Builder(
|
new ActionSchedule.Builder(TAG)
|
||||||
"testRemoveMediaItems_removeTailWithCurrentWindow_whenIdle_finishesPlayback")
|
|
||||||
.seek(/* windowIndex= */ 1, /* positionMs= */ C.TIME_UNSET)
|
.seek(/* windowIndex= */ 1, /* positionMs= */ C.TIME_UNSET)
|
||||||
.waitForSeekProcessed()
|
.waitForSeekProcessed()
|
||||||
.removeMediaItem(/* index= */ 1)
|
.removeMediaItem(/* index= */ 1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue