mirror of
https://github.com/samsonjs/media.git
synced 2026-03-31 10:25:48 +00:00
Remove explicit use of Robolectric PAUSED looper mode
It's now the default everywhere, so there's no need to specify it explicitly. PiperOrigin-RevId: 322153319
This commit is contained in:
parent
302b5f2ba4
commit
576ef82191
21 changed files with 0 additions and 48 deletions
|
|
@ -64,13 +64,10 @@ import org.junit.runner.RunWith;
|
|||
import org.mockito.ArgumentMatchers;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
import org.robolectric.annotation.LooperMode.Mode;
|
||||
import org.robolectric.shadows.ShadowLooper;
|
||||
|
||||
/** Tests for {@link CronetDataSource}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(Mode.PAUSED)
|
||||
public final class CronetDataSourceTest {
|
||||
|
||||
private static final int TEST_CONNECT_TIMEOUT_MS = 100;
|
||||
|
|
|
|||
|
|
@ -108,12 +108,10 @@ import org.junit.Before;
|
|||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
import org.robolectric.shadows.ShadowAudioManager;
|
||||
|
||||
/** Unit test for {@link ExoPlayer}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public final class ExoPlayerTest {
|
||||
|
||||
private static final String TAG = "ExoPlayerTest";
|
||||
|
|
|
|||
|
|
@ -70,12 +70,9 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
import org.robolectric.annotation.LooperMode.Mode;
|
||||
|
||||
/** Integration test for {@link AnalyticsCollector}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(Mode.PAUSED)
|
||||
public final class AnalyticsCollectorTest {
|
||||
|
||||
private static final String TAG = "AnalyticsCollectorTest";
|
||||
|
|
|
|||
|
|
@ -32,11 +32,9 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Tests {@link OfflineLicenseHelper}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public class OfflineLicenseHelperTest {
|
||||
|
||||
private OfflineLicenseHelper offlineLicenseHelper;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ package com.google.android.exoplayer2.mediacodec;
|
|||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
import static org.robolectric.Shadows.shadowOf;
|
||||
import static org.robolectric.annotation.LooperMode.Mode.PAUSED;
|
||||
|
||||
import android.media.MediaCodec;
|
||||
import android.media.MediaFormat;
|
||||
|
|
@ -32,11 +31,9 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
import org.robolectric.shadows.ShadowLooper;
|
||||
|
||||
/** Unit tests for {@link AsynchronousMediaCodecAdapter}. */
|
||||
@LooperMode(PAUSED)
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class AsynchronousMediaCodecAdapterTest {
|
||||
private AsynchronousMediaCodecAdapter adapter;
|
||||
|
|
|
|||
|
|
@ -52,11 +52,9 @@ import org.junit.Before;
|
|||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit tests for {@link DownloadHelper}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public class DownloadHelperTest {
|
||||
|
||||
private static final Object TEST_MANIFEST = new Object();
|
||||
|
|
|
|||
|
|
@ -41,13 +41,10 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
import org.robolectric.annotation.LooperMode.Mode;
|
||||
import org.robolectric.shadows.ShadowLog;
|
||||
|
||||
/** Tests {@link DownloadManager}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(Mode.PAUSED)
|
||||
public class DownloadManagerTest {
|
||||
|
||||
/** Timeout to use when blocking on conditions that we expect to become unblocked. */
|
||||
|
|
|
|||
|
|
@ -45,12 +45,9 @@ import java.io.IOException;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
import org.robolectric.annotation.LooperMode.Mode;
|
||||
|
||||
/** Unit tests for {@link ClippingMediaSource}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(Mode.PAUSED)
|
||||
public final class ClippingMediaSourceTest {
|
||||
|
||||
private static final long TEST_PERIOD_DURATION_US = 1_000_000;
|
||||
|
|
|
|||
|
|
@ -43,11 +43,9 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit tests for {@link ConcatenatingMediaSource}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public final class ConcatenatingMediaSourceTest {
|
||||
|
||||
private ConcatenatingMediaSource mediaSource;
|
||||
|
|
|
|||
|
|
@ -28,11 +28,9 @@ import java.io.IOException;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit tests for {@link LoopingMediaSource}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public class LoopingMediaSourceTest {
|
||||
|
||||
private FakeTimeline multiWindowTimeline;
|
||||
|
|
|
|||
|
|
@ -36,11 +36,9 @@ import java.util.concurrent.CountDownLatch;
|
|||
import org.checkerframework.checker.nullness.compatqual.NullableType;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit test for {@link MergingMediaPeriod}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public final class MergingMediaPeriodTest {
|
||||
|
||||
private static final Format childFormat11 = new Format.Builder().setId("1_1").build();
|
||||
|
|
|
|||
|
|
@ -29,11 +29,9 @@ import com.google.android.exoplayer2.testutil.MediaSourceTestRunner;
|
|||
import java.io.IOException;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit tests for {@link MergingMediaSource}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public class MergingMediaSourceTest {
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -33,11 +33,9 @@ import com.google.android.exoplayer2.upstream.DefaultLoadErrorHandlingPolicy;
|
|||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit test for {@link ProgressiveMediaPeriod}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public final class ProgressiveMediaPeriodTest {
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import static org.mockito.Mockito.mock;
|
|||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.robolectric.Shadows.shadowOf;
|
||||
import static org.robolectric.annotation.LooperMode.Mode.PAUSED;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Looper;
|
||||
|
|
@ -47,11 +46,9 @@ import org.mockito.ArgumentCaptor;
|
|||
import org.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit tests for {@link AdsMediaSource}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(PAUSED)
|
||||
public final class AdsMediaSourceTest {
|
||||
|
||||
private static final long PREROLL_AD_DURATION_US = 10 * C.MICROS_PER_SECOND;
|
||||
|
|
|
|||
|
|
@ -52,11 +52,9 @@ import org.junit.runner.RunWith;
|
|||
import org.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
import org.robolectric.shadows.ShadowLooper;
|
||||
|
||||
/** Unit test for {@link DecoderVideoRenderer}. */
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public final class DecoderVideoRendererTest {
|
||||
@Rule public final MockitoRule mockito = MockitoJUnit.rule();
|
||||
|
|
|
|||
|
|
@ -48,11 +48,9 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit tests for {@link DashMediaPeriod}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public final class DashMediaPeriodTest {
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -55,12 +55,10 @@ import org.junit.Ignore;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
import org.robolectric.shadows.ShadowLog;
|
||||
|
||||
/** Tests {@link DownloadManager}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public class DownloadManagerDashTest {
|
||||
|
||||
private static final int ASSERT_TRUE_TIMEOUT_MS = 5000;
|
||||
|
|
|
|||
|
|
@ -57,11 +57,9 @@ import org.junit.Before;
|
|||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit tests for {@link DownloadService}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public class DownloadServiceDashTest {
|
||||
|
||||
private SimpleCache cache;
|
||||
|
|
|
|||
|
|
@ -44,11 +44,9 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit test for {@link HlsMediaPeriod}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public final class HlsMediaPeriodTest {
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -37,11 +37,9 @@ import com.google.android.exoplayer2.upstream.TransferListener;
|
|||
import com.google.android.exoplayer2.util.MimeTypes;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit tests for {@link SsMediaPeriod}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public class SsMediaPeriodTest {
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -26,11 +26,9 @@ import java.util.concurrent.CountDownLatch;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.LooperMode;
|
||||
|
||||
/** Unit test for {@link FakeClock}. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LooperMode(LooperMode.Mode.PAUSED)
|
||||
public final class FakeClockTest {
|
||||
|
||||
private static final long TIMEOUT_MS = 10_000;
|
||||
|
|
|
|||
Loading…
Reference in a new issue