Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d9c058c6
authored
Dec 17, 2020
by
bachinger
Committed by
Christos Tsilopoulos
Dec 17, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix flaky test case
PiperOrigin-RevId: 347987306
parent
4849b3e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
8 deletions
library/core/src/test/java/com/google/android/exoplayer2/ExoPlayerTest.java
library/core/src/test/java/com/google/android/exoplayer2/ExoPlayerTest.java
View file @
d9c058c6
...
@@ -7749,13 +7749,38 @@ public final class ExoPlayerTest {
...
@@ -7749,13 +7749,38 @@ public final class ExoPlayerTest {
Player
.
MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED
);
Player
.
MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED
);
}
}
@Ignore
// See [internal: b/175773664]
@Test
@Test
public
void
repeat_notifiesMediaItemTransition
()
throws
Exception
{
public
void
repeat_notifiesMediaItemTransition
()
throws
Exception
{
SilenceMediaSource
.
Factory
factory
=
MediaItem
mediaItem1
=
MediaItem
.
fromUri
(
"http://foo.bar/fake1"
);
new
SilenceMediaSource
.
Factory
().
setDurationUs
(
C
.
msToUs
(
100_000
));
TimelineWindowDefinition
window1
=
SilenceMediaSource
mediaSource1
=
factory
.
setTag
(
"1"
).
createMediaSource
();
new
TimelineWindowDefinition
(
SilenceMediaSource
mediaSource2
=
factory
.
setTag
(
"2"
).
createMediaSource
();
/* periodCount= */
1
,
/* id= */
1
,
/* isSeekable= */
true
,
/* isDynamic= */
false
,
/* isLive= */
false
,
/* isPlaceholder= */
false
,
/* durationUs = */
100_000
,
/* defaultPositionUs = */
0
,
/* windowOffsetInFirstPeriodUs= */
0
,
AdPlaybackState
.
NONE
,
mediaItem1
);
MediaItem
mediaItem2
=
MediaItem
.
fromUri
(
"http://foo.bar/fake2"
);
TimelineWindowDefinition
window2
=
new
TimelineWindowDefinition
(
/* periodCount= */
1
,
/* id= */
2
,
/* isSeekable= */
true
,
/* isDynamic= */
false
,
/* isLive= */
false
,
/* isPlaceholder= */
false
,
/* durationUs = */
100_000
,
/* defaultPositionUs = */
0
,
/* windowOffsetInFirstPeriodUs= */
0
,
AdPlaybackState
.
NONE
,
mediaItem2
);
FakeMediaSource
mediaSource1
=
new
FakeMediaSource
(
new
FakeTimeline
(
window1
));
FakeMediaSource
mediaSource2
=
new
FakeMediaSource
(
new
FakeTimeline
(
window2
));
ActionSchedule
actionSchedule
=
ActionSchedule
actionSchedule
=
new
ActionSchedule
.
Builder
(
TAG
)
new
ActionSchedule
.
Builder
(
TAG
)
.
pause
()
.
pause
()
...
@@ -7767,9 +7792,9 @@ public final class ExoPlayerTest {
...
@@ -7767,9 +7792,9 @@ public final class ExoPlayerTest {
player
.
setRepeatMode
(
Player
.
REPEAT_MODE_ONE
);
player
.
setRepeatMode
(
Player
.
REPEAT_MODE_ONE
);
}
}
})
})
.
play
(
)
.
play
UntilPosition
(
/* windowIndex= */
0
,
/* positionMs= */
90
)
.
waitForPositionDiscontinuity
(
)
.
playUntilPosition
(
/* windowIndex= */
0
,
/* positionMs= */
80
)
.
waitForPositionDiscontinuity
(
)
.
playUntilPosition
(
/* windowIndex= */
0
,
/* positionMs= */
70
)
.
executeRunnable
(
.
executeRunnable
(
new
PlayerRunnable
()
{
new
PlayerRunnable
()
{
@Override
@Override
...
@@ -7777,6 +7802,7 @@ public final class ExoPlayerTest {
...
@@ -7777,6 +7802,7 @@ public final class ExoPlayerTest {
player
.
setRepeatMode
(
Player
.
REPEAT_MODE_OFF
);
player
.
setRepeatMode
(
Player
.
REPEAT_MODE_OFF
);
}
}
})
})
.
play
()
.
build
();
.
build
();
ExoPlayerTestRunner
exoPlayerTestRunner
=
ExoPlayerTestRunner
exoPlayerTestRunner
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment