mirror of
https://github.com/androidx/media.git
synced 2025-05-04 06:00:37 +08:00
Move all tests to JUnit 4
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=209412403
This commit is contained in:
parent
05dcf502e5
commit
5c2dd9ca42
@ -27,6 +27,7 @@ android {
|
|||||||
minSdkVersion project.ext.minSdkVersion
|
minSdkVersion project.ext.minSdkVersion
|
||||||
targetSdkVersion project.ext.targetSdkVersion
|
targetSdkVersion project.ext.targetSdkVersion
|
||||||
consumerProguardFiles 'proguard-rules.txt'
|
consumerProguardFiles 'proguard-rules.txt'
|
||||||
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.main {
|
sourceSets.main {
|
||||||
@ -38,6 +39,7 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
|
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
|
||||||
implementation project(modulePrefix + 'library-core')
|
implementation project(modulePrefix + 'library-core')
|
||||||
|
androidTestImplementation 'androidx.test:runner:' + testRunnerVersion
|
||||||
androidTestImplementation project(modulePrefix + 'testutils')
|
androidTestImplementation project(modulePrefix + 'testutils')
|
||||||
testImplementation project(modulePrefix + 'testutils-robolectric')
|
testImplementation project(modulePrefix + 'testutils-robolectric')
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,6 @@
|
|||||||
|
|
||||||
<instrumentation
|
<instrumentation
|
||||||
android:targetPackage="com.google.android.exoplayer2.ext.flac.test"
|
android:targetPackage="com.google.android.exoplayer2.ext.flac.test"
|
||||||
android:name="android.test.InstrumentationTestRunner"/>
|
android:name="androidx.test.runner.AndroidJUnitRunner"/>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -15,10 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.ext.flac;
|
package com.google.android.exoplayer2.ext.flac;
|
||||||
|
|
||||||
|
import static androidx.test.InstrumentationRegistry.getContext;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.test.InstrumentationTestCase;
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.ExoPlaybackException;
|
import com.google.android.exoplayer2.ExoPlaybackException;
|
||||||
import com.google.android.exoplayer2.ExoPlayer;
|
import com.google.android.exoplayer2.ExoPlayer;
|
||||||
import com.google.android.exoplayer2.ExoPlayerFactory;
|
import com.google.android.exoplayer2.ExoPlayerFactory;
|
||||||
@ -29,29 +32,31 @@ import com.google.android.exoplayer2.source.ExtractorMediaSource;
|
|||||||
import com.google.android.exoplayer2.source.MediaSource;
|
import com.google.android.exoplayer2.source.MediaSource;
|
||||||
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
||||||
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
/**
|
/** Playback tests using {@link LibflacAudioRenderer}. */
|
||||||
* Playback tests using {@link LibflacAudioRenderer}.
|
@RunWith(AndroidJUnit4.class)
|
||||||
*/
|
public class FlacPlaybackTest {
|
||||||
public class FlacPlaybackTest extends InstrumentationTestCase {
|
|
||||||
|
|
||||||
private static final String BEAR_FLAC_URI = "asset:///bear-flac.mka";
|
private static final String BEAR_FLAC_URI = "asset:///bear-flac.mka";
|
||||||
|
|
||||||
@Override
|
@Before
|
||||||
protected void setUp() throws Exception {
|
public void setUp() {
|
||||||
super.setUp();
|
|
||||||
if (!FlacLibrary.isAvailable()) {
|
if (!FlacLibrary.isAvailable()) {
|
||||||
fail("Flac library not available.");
|
fail("Flac library not available.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testBasicPlayback() throws ExoPlaybackException {
|
public void testBasicPlayback() throws ExoPlaybackException {
|
||||||
playUri(BEAR_FLAC_URI);
|
playUri(BEAR_FLAC_URI);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void playUri(String uri) throws ExoPlaybackException {
|
private void playUri(String uri) throws ExoPlaybackException {
|
||||||
TestPlaybackRunnable testPlaybackRunnable = new TestPlaybackRunnable(Uri.parse(uri),
|
TestPlaybackRunnable testPlaybackRunnable =
|
||||||
getInstrumentation().getContext());
|
new TestPlaybackRunnable(Uri.parse(uri), getContext());
|
||||||
Thread thread = new Thread(testPlaybackRunnable);
|
Thread thread = new Thread(testPlaybackRunnable);
|
||||||
thread.start();
|
thread.start();
|
||||||
try {
|
try {
|
||||||
|
@ -27,6 +27,7 @@ android {
|
|||||||
minSdkVersion project.ext.minSdkVersion
|
minSdkVersion project.ext.minSdkVersion
|
||||||
targetSdkVersion project.ext.targetSdkVersion
|
targetSdkVersion project.ext.targetSdkVersion
|
||||||
consumerProguardFiles 'proguard-rules.txt'
|
consumerProguardFiles 'proguard-rules.txt'
|
||||||
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.main {
|
sourceSets.main {
|
||||||
@ -37,6 +38,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(modulePrefix + 'library-core')
|
implementation project(modulePrefix + 'library-core')
|
||||||
|
androidTestImplementation 'androidx.test:runner:' + testRunnerVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
|
@ -26,6 +26,6 @@
|
|||||||
|
|
||||||
<instrumentation
|
<instrumentation
|
||||||
android:targetPackage="com.google.android.exoplayer2.ext.opus.test"
|
android:targetPackage="com.google.android.exoplayer2.ext.opus.test"
|
||||||
android:name="android.test.InstrumentationTestRunner"/>
|
android:name="androidx.test.runner.AndroidJUnitRunner"/>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -15,10 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.ext.opus;
|
package com.google.android.exoplayer2.ext.opus;
|
||||||
|
|
||||||
|
import static androidx.test.InstrumentationRegistry.getContext;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.test.InstrumentationTestCase;
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.ExoPlaybackException;
|
import com.google.android.exoplayer2.ExoPlaybackException;
|
||||||
import com.google.android.exoplayer2.ExoPlayer;
|
import com.google.android.exoplayer2.ExoPlayer;
|
||||||
import com.google.android.exoplayer2.ExoPlayerFactory;
|
import com.google.android.exoplayer2.ExoPlayerFactory;
|
||||||
@ -29,29 +32,31 @@ import com.google.android.exoplayer2.source.ExtractorMediaSource;
|
|||||||
import com.google.android.exoplayer2.source.MediaSource;
|
import com.google.android.exoplayer2.source.MediaSource;
|
||||||
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
||||||
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
/**
|
/** Playback tests using {@link LibopusAudioRenderer}. */
|
||||||
* Playback tests using {@link LibopusAudioRenderer}.
|
@RunWith(AndroidJUnit4.class)
|
||||||
*/
|
public class OpusPlaybackTest {
|
||||||
public class OpusPlaybackTest extends InstrumentationTestCase {
|
|
||||||
|
|
||||||
private static final String BEAR_OPUS_URI = "asset:///bear-opus.webm";
|
private static final String BEAR_OPUS_URI = "asset:///bear-opus.webm";
|
||||||
|
|
||||||
@Override
|
@Before
|
||||||
protected void setUp() throws Exception {
|
public void setUp() {
|
||||||
super.setUp();
|
|
||||||
if (!OpusLibrary.isAvailable()) {
|
if (!OpusLibrary.isAvailable()) {
|
||||||
fail("Opus library not available.");
|
fail("Opus library not available.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testBasicPlayback() throws ExoPlaybackException {
|
public void testBasicPlayback() throws ExoPlaybackException {
|
||||||
playUri(BEAR_OPUS_URI);
|
playUri(BEAR_OPUS_URI);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void playUri(String uri) throws ExoPlaybackException {
|
private void playUri(String uri) throws ExoPlaybackException {
|
||||||
TestPlaybackRunnable testPlaybackRunnable = new TestPlaybackRunnable(Uri.parse(uri),
|
TestPlaybackRunnable testPlaybackRunnable =
|
||||||
getInstrumentation().getContext());
|
new TestPlaybackRunnable(Uri.parse(uri), getContext());
|
||||||
Thread thread = new Thread(testPlaybackRunnable);
|
Thread thread = new Thread(testPlaybackRunnable);
|
||||||
thread.start();
|
thread.start();
|
||||||
try {
|
try {
|
||||||
|
@ -27,6 +27,7 @@ android {
|
|||||||
minSdkVersion project.ext.minSdkVersion
|
minSdkVersion project.ext.minSdkVersion
|
||||||
targetSdkVersion project.ext.targetSdkVersion
|
targetSdkVersion project.ext.targetSdkVersion
|
||||||
consumerProguardFiles 'proguard-rules.txt'
|
consumerProguardFiles 'proguard-rules.txt'
|
||||||
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.main {
|
sourceSets.main {
|
||||||
@ -38,6 +39,7 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation project(modulePrefix + 'library-core')
|
implementation project(modulePrefix + 'library-core')
|
||||||
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
|
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
|
||||||
|
androidTestImplementation 'androidx.test:runner:' + testRunnerVersion
|
||||||
androidTestImplementation 'com.google.truth:truth:' + truthVersion
|
androidTestImplementation 'com.google.truth:truth:' + truthVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,6 @@
|
|||||||
|
|
||||||
<instrumentation
|
<instrumentation
|
||||||
android:targetPackage="com.google.android.exoplayer2.ext.vp9.test"
|
android:targetPackage="com.google.android.exoplayer2.ext.vp9.test"
|
||||||
android:name="android.test.InstrumentationTestRunner"/>
|
android:name="androidx.test.runner.AndroidJUnitRunner"/>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -15,13 +15,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.ext.vp9;
|
package com.google.android.exoplayer2.ext.vp9;
|
||||||
|
|
||||||
|
import static androidx.test.InstrumentationRegistry.getContext;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.test.InstrumentationTestCase;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.ExoPlaybackException;
|
import com.google.android.exoplayer2.ExoPlaybackException;
|
||||||
import com.google.android.exoplayer2.ExoPlayer;
|
import com.google.android.exoplayer2.ExoPlayer;
|
||||||
import com.google.android.exoplayer2.ExoPlayerFactory;
|
import com.google.android.exoplayer2.ExoPlayerFactory;
|
||||||
@ -32,11 +34,13 @@ import com.google.android.exoplayer2.source.ExtractorMediaSource;
|
|||||||
import com.google.android.exoplayer2.source.MediaSource;
|
import com.google.android.exoplayer2.source.MediaSource;
|
||||||
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
||||||
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
/**
|
/** Playback tests using {@link LibvpxVideoRenderer}. */
|
||||||
* Playback tests using {@link LibvpxVideoRenderer}.
|
@RunWith(AndroidJUnit4.class)
|
||||||
*/
|
public class VpxPlaybackTest {
|
||||||
public class VpxPlaybackTest extends InstrumentationTestCase {
|
|
||||||
|
|
||||||
private static final String BEAR_URI = "asset:///bear-vp9.webm";
|
private static final String BEAR_URI = "asset:///bear-vp9.webm";
|
||||||
private static final String BEAR_ODD_DIMENSIONS_URI = "asset:///bear-vp9-odd-dimensions.webm";
|
private static final String BEAR_ODD_DIMENSIONS_URI = "asset:///bear-vp9-odd-dimensions.webm";
|
||||||
@ -45,22 +49,24 @@ public class VpxPlaybackTest extends InstrumentationTestCase {
|
|||||||
|
|
||||||
private static final String TAG = "VpxPlaybackTest";
|
private static final String TAG = "VpxPlaybackTest";
|
||||||
|
|
||||||
@Override
|
@Before
|
||||||
protected void setUp() throws Exception {
|
public void setUp() {
|
||||||
super.setUp();
|
|
||||||
if (!VpxLibrary.isAvailable()) {
|
if (!VpxLibrary.isAvailable()) {
|
||||||
fail("Vpx library not available.");
|
fail("Vpx library not available.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testBasicPlayback() throws ExoPlaybackException {
|
public void testBasicPlayback() throws ExoPlaybackException {
|
||||||
playUri(BEAR_URI);
|
playUri(BEAR_URI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testOddDimensionsPlayback() throws ExoPlaybackException {
|
public void testOddDimensionsPlayback() throws ExoPlaybackException {
|
||||||
playUri(BEAR_ODD_DIMENSIONS_URI);
|
playUri(BEAR_ODD_DIMENSIONS_URI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void test10BitProfile2Playback() throws ExoPlaybackException {
|
public void test10BitProfile2Playback() throws ExoPlaybackException {
|
||||||
if (VpxLibrary.isHighBitDepthSupported()) {
|
if (VpxLibrary.isHighBitDepthSupported()) {
|
||||||
Log.d(TAG, "High Bit Depth supported.");
|
Log.d(TAG, "High Bit Depth supported.");
|
||||||
@ -70,6 +76,7 @@ public class VpxPlaybackTest extends InstrumentationTestCase {
|
|||||||
Log.d(TAG, "High Bit Depth not supported.");
|
Log.d(TAG, "High Bit Depth not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testInvalidBitstream() {
|
public void testInvalidBitstream() {
|
||||||
try {
|
try {
|
||||||
playUri(INVALID_BITSTREAM_URI);
|
playUri(INVALID_BITSTREAM_URI);
|
||||||
@ -81,8 +88,8 @@ public class VpxPlaybackTest extends InstrumentationTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void playUri(String uri) throws ExoPlaybackException {
|
private void playUri(String uri) throws ExoPlaybackException {
|
||||||
TestPlaybackRunnable testPlaybackRunnable = new TestPlaybackRunnable(Uri.parse(uri),
|
TestPlaybackRunnable testPlaybackRunnable =
|
||||||
getInstrumentation().getContext());
|
new TestPlaybackRunnable(Uri.parse(uri), getContext());
|
||||||
Thread thread = new Thread(testPlaybackRunnable);
|
Thread thread = new Thread(testPlaybackRunnable);
|
||||||
thread.start();
|
thread.start();
|
||||||
try {
|
try {
|
||||||
|
@ -28,7 +28,7 @@ android {
|
|||||||
targetSdkVersion project.ext.targetSdkVersion
|
targetSdkVersion project.ext.targetSdkVersion
|
||||||
consumerProguardFiles 'proguard-rules.txt'
|
consumerProguardFiles 'proguard-rules.txt'
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
|
|
||||||
// The following argument makes the Android Test Orchestrator run its
|
// The following argument makes the Android Test Orchestrator run its
|
||||||
// "pm clear" command after each test invocation. This command ensures
|
// "pm clear" command after each test invocation. This command ensures
|
||||||
@ -39,11 +39,11 @@ android {
|
|||||||
// Workaround to prevent circular dependency on project :testutils.
|
// Workaround to prevent circular dependency on project :testutils.
|
||||||
sourceSets {
|
sourceSets {
|
||||||
androidTest {
|
androidTest {
|
||||||
java.srcDirs += "../../testutils/src/main/java/"
|
java.srcDirs += '../../testutils/src/main/java/'
|
||||||
}
|
}
|
||||||
test {
|
test {
|
||||||
java.srcDirs += "../../testutils/src/main/java/"
|
java.srcDirs += '../../testutils/src/main/java/'
|
||||||
java.srcDirs += "../../testutils_robolectric/src/main/java/"
|
java.srcDirs += '../../testutils_robolectric/src/main/java/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,12 +60,12 @@ dependencies {
|
|||||||
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
|
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
|
||||||
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
|
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
|
||||||
compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkVersion
|
compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkVersion
|
||||||
|
androidTestImplementation 'androidx.test:runner:' + testRunnerVersion
|
||||||
|
androidTestImplementation 'com.google.auto.value:auto-value-annotations:' + autoValueVersion
|
||||||
androidTestImplementation 'com.google.dexmaker:dexmaker:' + dexmakerVersion
|
androidTestImplementation 'com.google.dexmaker:dexmaker:' + dexmakerVersion
|
||||||
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:' + dexmakerVersion
|
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:' + dexmakerVersion
|
||||||
androidTestImplementation 'com.google.truth:truth:' + truthVersion
|
androidTestImplementation 'com.google.truth:truth:' + truthVersion
|
||||||
androidTestImplementation 'org.mockito:mockito-core:' + mockitoVersion
|
androidTestImplementation 'org.mockito:mockito-core:' + mockitoVersion
|
||||||
androidTestImplementation 'androidx.test:runner:' + testRunnerVersion
|
|
||||||
androidTestImplementation 'com.google.auto.value:auto-value-annotations:' + autoValueVersion
|
|
||||||
androidTestAnnotationProcessor 'com.google.auto.value:auto-value:' + autoValueVersion
|
androidTestAnnotationProcessor 'com.google.auto.value:auto-value:' + autoValueVersion
|
||||||
testImplementation 'com.google.truth:truth:' + truthVersion
|
testImplementation 'com.google.truth:truth:' + truthVersion
|
||||||
testImplementation 'junit:junit:' + junitVersion
|
testImplementation 'junit:junit:' + junitVersion
|
||||||
|
@ -29,6 +29,6 @@
|
|||||||
|
|
||||||
<instrumentation
|
<instrumentation
|
||||||
android:targetPackage="com.google.android.exoplayer2.core.test"
|
android:targetPackage="com.google.android.exoplayer2.core.test"
|
||||||
android:name="android.test.InstrumentationTestRunner"/>
|
android:name="androidx.test.runner.AndroidJUnitRunner"/>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -26,10 +26,13 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion project.ext.minSdkVersion
|
minSdkVersion project.ext.minSdkVersion
|
||||||
targetSdkVersion project.ext.targetSdkVersion
|
targetSdkVersion project.ext.targetSdkVersion
|
||||||
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
androidTestImplementation 'androidx.test:rules:' + testRunnerVersion
|
||||||
|
androidTestImplementation 'androidx.test:runner:' + testRunnerVersion
|
||||||
androidTestImplementation project(modulePrefix + 'library-core')
|
androidTestImplementation project(modulePrefix + 'library-core')
|
||||||
androidTestImplementation project(modulePrefix + 'library-dash')
|
androidTestImplementation project(modulePrefix + 'library-dash')
|
||||||
androidTestImplementation project(modulePrefix + 'library-hls')
|
androidTestImplementation project(modulePrefix + 'library-hls')
|
||||||
|
@ -34,6 +34,6 @@
|
|||||||
|
|
||||||
<instrumentation
|
<instrumentation
|
||||||
android:targetPackage="com.google.android.exoplayer2.playbacktests"
|
android:targetPackage="com.google.android.exoplayer2.playbacktests"
|
||||||
android:name="android.test.InstrumentationTestRunner"/>
|
android:name="androidx.test.runner.AndroidJUnitRunner"/>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -15,17 +15,24 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.playbacktests.gts;
|
package com.google.android.exoplayer2.playbacktests.gts;
|
||||||
|
|
||||||
import android.test.ActivityInstrumentationTestCase2;
|
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||||
|
|
||||||
|
import androidx.test.rule.ActivityTestRule;
|
||||||
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.Player;
|
import com.google.android.exoplayer2.Player;
|
||||||
import com.google.android.exoplayer2.testutil.ActionSchedule;
|
import com.google.android.exoplayer2.testutil.ActionSchedule;
|
||||||
import com.google.android.exoplayer2.testutil.HostActivity;
|
import com.google.android.exoplayer2.testutil.HostActivity;
|
||||||
import com.google.android.exoplayer2.util.MimeTypes;
|
import com.google.android.exoplayer2.util.MimeTypes;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
import com.google.android.exoplayer2.util.Util;
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Rule;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
/**
|
/** Test playback of encrypted DASH streams using different CENC scheme types. */
|
||||||
* Test playback of encrypted DASH streams using different CENC scheme types.
|
@RunWith(AndroidJUnit4.class)
|
||||||
*/
|
public final class CommonEncryptionDrmTest {
|
||||||
public final class CommonEncryptionDrmTest extends ActivityInstrumentationTestCase2<HostActivity> {
|
|
||||||
|
|
||||||
private static final String TAG = "CencDrmTest";
|
private static final String TAG = "CencDrmTest";
|
||||||
|
|
||||||
@ -44,29 +51,26 @@ public final class CommonEncryptionDrmTest extends ActivityInstrumentationTestCa
|
|||||||
.seekAndWait(270000).delay(10000).seekAndWait(200000).delay(10000).seekAndWait(732000)
|
.seekAndWait(270000).delay(10000).seekAndWait(200000).delay(10000).seekAndWait(732000)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
@Rule public ActivityTestRule<HostActivity> testRule = new ActivityTestRule<>(HostActivity.class);
|
||||||
|
|
||||||
private DashTestRunner testRunner;
|
private DashTestRunner testRunner;
|
||||||
|
|
||||||
public CommonEncryptionDrmTest() {
|
@Before
|
||||||
super(HostActivity.class);
|
public void setUp() {
|
||||||
|
testRunner =
|
||||||
|
new DashTestRunner(TAG, testRule.getActivity(), getInstrumentation())
|
||||||
|
.setWidevineInfo(MimeTypes.VIDEO_H264, false)
|
||||||
|
.setActionSchedule(ACTION_SCHEDULE_WITH_SEEKS)
|
||||||
|
.setAudioVideoFormats(ID_AUDIO, IDS_VIDEO)
|
||||||
|
.setCanIncludeAdditionalVideoFormats(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@After
|
||||||
protected void setUp() throws Exception {
|
public void tearDown() {
|
||||||
super.setUp();
|
|
||||||
|
|
||||||
testRunner = new DashTestRunner(TAG, getActivity(), getInstrumentation())
|
|
||||||
.setWidevineInfo(MimeTypes.VIDEO_H264, false)
|
|
||||||
.setActionSchedule(ACTION_SCHEDULE_WITH_SEEKS)
|
|
||||||
.setAudioVideoFormats(ID_AUDIO, IDS_VIDEO)
|
|
||||||
.setCanIncludeAdditionalVideoFormats(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void tearDown() throws Exception {
|
|
||||||
testRunner = null;
|
testRunner = null;
|
||||||
super.tearDown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testCencSchemeTypeV18() {
|
public void testCencSchemeTypeV18() {
|
||||||
if (Util.SDK_INT < 18) {
|
if (Util.SDK_INT < 18) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -75,6 +79,7 @@ public final class CommonEncryptionDrmTest extends ActivityInstrumentationTestCa
|
|||||||
testRunner.setStreamName("test_widevine_h264_scheme_cenc").setManifestUrl(URL_cenc).run();
|
testRunner.setStreamName("test_widevine_h264_scheme_cenc").setManifestUrl(URL_cenc).run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testCbc1SchemeTypeV25() {
|
public void testCbc1SchemeTypeV25() {
|
||||||
if (Util.SDK_INT < 25) {
|
if (Util.SDK_INT < 25) {
|
||||||
// cbc1 support was added in API 24, but it is stable from API 25 onwards.
|
// cbc1 support was added in API 24, but it is stable from API 25 onwards.
|
||||||
@ -85,6 +90,7 @@ public final class CommonEncryptionDrmTest extends ActivityInstrumentationTestCa
|
|||||||
testRunner.setStreamName("test_widevine_h264_scheme_cbc1").setManifestUrl(URL_cbc1).run();
|
testRunner.setStreamName("test_widevine_h264_scheme_cbc1").setManifestUrl(URL_cbc1).run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testCbcsSchemeTypeV25() {
|
public void testCbcsSchemeTypeV25() {
|
||||||
if (Util.SDK_INT < 25) {
|
if (Util.SDK_INT < 25) {
|
||||||
// cbcs support was added in API 24, but it is stable from API 25 onwards.
|
// cbcs support was added in API 24, but it is stable from API 25 onwards.
|
||||||
@ -95,8 +101,8 @@ public final class CommonEncryptionDrmTest extends ActivityInstrumentationTestCa
|
|||||||
testRunner.setStreamName("test_widevine_h264_scheme_cbcs").setManifestUrl(URL_cbcs).run();
|
testRunner.setStreamName("test_widevine_h264_scheme_cbcs").setManifestUrl(URL_cbcs).run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testCensSchemeTypeV25() {
|
public void testCensSchemeTypeV25() {
|
||||||
// TODO: Implement once content is available. Track [internal: b/31219813].
|
// TODO: Implement once content is available. Track [internal: b/31219813].
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.playbacktests.gts;
|
package com.google.android.exoplayer2.playbacktests.gts;
|
||||||
|
|
||||||
|
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||||
import static com.google.common.truth.Truth.assertWithMessage;
|
import static com.google.common.truth.Truth.assertWithMessage;
|
||||||
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.test.ActivityInstrumentationTestCase2;
|
import androidx.test.rule.ActivityTestRule;
|
||||||
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.offline.DownloaderConstructorHelper;
|
import com.google.android.exoplayer2.offline.DownloaderConstructorHelper;
|
||||||
import com.google.android.exoplayer2.offline.StreamKey;
|
import com.google.android.exoplayer2.offline.StreamKey;
|
||||||
import com.google.android.exoplayer2.source.dash.DashUtil;
|
import com.google.android.exoplayer2.source.dash.DashUtil;
|
||||||
@ -37,36 +39,38 @@ import com.google.android.exoplayer2.util.Util;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Rule;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
/**
|
/** Tests downloaded DASH playbacks. */
|
||||||
* Tests downloaded DASH playbacks.
|
@RunWith(AndroidJUnit4.class)
|
||||||
*/
|
public final class DashDownloadTest {
|
||||||
public final class DashDownloadTest extends ActivityInstrumentationTestCase2<HostActivity> {
|
|
||||||
|
|
||||||
private static final String TAG = "DashDownloadTest";
|
private static final String TAG = "DashDownloadTest";
|
||||||
|
|
||||||
private static final Uri MANIFEST_URI = Uri.parse(DashTestData.H264_MANIFEST);
|
private static final Uri MANIFEST_URI = Uri.parse(DashTestData.H264_MANIFEST);
|
||||||
|
|
||||||
|
@Rule public ActivityTestRule<HostActivity> testRule = new ActivityTestRule<>(HostActivity.class);
|
||||||
|
|
||||||
private DashTestRunner testRunner;
|
private DashTestRunner testRunner;
|
||||||
private File tempFolder;
|
private File tempFolder;
|
||||||
private SimpleCache cache;
|
private SimpleCache cache;
|
||||||
private DefaultHttpDataSourceFactory httpDataSourceFactory;
|
private DefaultHttpDataSourceFactory httpDataSourceFactory;
|
||||||
private CacheDataSourceFactory offlineDataSourceFactory;
|
private CacheDataSourceFactory offlineDataSourceFactory;
|
||||||
|
|
||||||
public DashDownloadTest() {
|
@Before
|
||||||
super(HostActivity.class);
|
public void setUp() throws Exception {
|
||||||
}
|
testRunner =
|
||||||
|
new DashTestRunner(TAG, testRule.getActivity(), getInstrumentation())
|
||||||
@Override
|
.setManifestUrl(DashTestData.H264_MANIFEST)
|
||||||
protected void setUp() throws Exception {
|
.setFullPlaybackNoSeeking(true)
|
||||||
super.setUp();
|
.setCanIncludeAdditionalVideoFormats(false)
|
||||||
testRunner = new DashTestRunner(TAG, getActivity(), getInstrumentation())
|
.setAudioVideoFormats(
|
||||||
.setManifestUrl(DashTestData.H264_MANIFEST)
|
DashTestData.AAC_AUDIO_REPRESENTATION_ID, DashTestData.H264_CDD_FIXED);
|
||||||
.setFullPlaybackNoSeeking(true)
|
tempFolder = Util.createTempDirectory(testRule.getActivity(), "ExoPlayerTest");
|
||||||
.setCanIncludeAdditionalVideoFormats(false)
|
|
||||||
.setAudioVideoFormats(DashTestData.AAC_AUDIO_REPRESENTATION_ID,
|
|
||||||
DashTestData.H264_CDD_FIXED);
|
|
||||||
tempFolder = Util.createTempDirectory(getActivity(), "ExoPlayerTest");
|
|
||||||
cache = new SimpleCache(tempFolder, new NoOpCacheEvictor());
|
cache = new SimpleCache(tempFolder, new NoOpCacheEvictor());
|
||||||
httpDataSourceFactory = new DefaultHttpDataSourceFactory("ExoPlayer", null);
|
httpDataSourceFactory = new DefaultHttpDataSourceFactory("ExoPlayer", null);
|
||||||
offlineDataSourceFactory =
|
offlineDataSourceFactory =
|
||||||
@ -74,16 +78,16 @@ public final class DashDownloadTest extends ActivityInstrumentationTestCase2<Hos
|
|||||||
cache, DummyDataSource.FACTORY, CacheDataSource.FLAG_BLOCK_ON_CACHE);
|
cache, DummyDataSource.FACTORY, CacheDataSource.FLAG_BLOCK_ON_CACHE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@After
|
||||||
protected void tearDown() throws Exception {
|
public void tearDown() {
|
||||||
testRunner = null;
|
testRunner = null;
|
||||||
Util.recursiveDelete(tempFolder);
|
Util.recursiveDelete(tempFolder);
|
||||||
cache = null;
|
cache = null;
|
||||||
super.tearDown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Download tests
|
// Download tests
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testDownload() throws Exception {
|
public void testDownload() throws Exception {
|
||||||
if (Util.SDK_INT < 16) {
|
if (Util.SDK_INT < 16) {
|
||||||
return; // Pass.
|
return; // Pass.
|
||||||
|
@ -15,9 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.playbacktests.gts;
|
package com.google.android.exoplayer2.playbacktests.gts;
|
||||||
|
|
||||||
|
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
|
||||||
import android.test.ActivityInstrumentationTestCase2;
|
import androidx.test.rule.ActivityTestRule;
|
||||||
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.ExoPlayer;
|
import com.google.android.exoplayer2.ExoPlayer;
|
||||||
import com.google.android.exoplayer2.Player;
|
import com.google.android.exoplayer2.Player;
|
||||||
import com.google.android.exoplayer2.mediacodec.MediaCodecInfo;
|
import com.google.android.exoplayer2.mediacodec.MediaCodecInfo;
|
||||||
@ -27,11 +29,15 @@ import com.google.android.exoplayer2.testutil.ActionSchedule;
|
|||||||
import com.google.android.exoplayer2.testutil.HostActivity;
|
import com.google.android.exoplayer2.testutil.HostActivity;
|
||||||
import com.google.android.exoplayer2.util.MimeTypes;
|
import com.google.android.exoplayer2.util.MimeTypes;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
import com.google.android.exoplayer2.util.Util;
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Rule;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
/**
|
/** Tests DASH playbacks using {@link ExoPlayer}. */
|
||||||
* Tests DASH playbacks using {@link ExoPlayer}.
|
@RunWith(AndroidJUnit4.class)
|
||||||
*/
|
public final class DashStreamingTest {
|
||||||
public final class DashStreamingTest extends ActivityInstrumentationTestCase2<HostActivity> {
|
|
||||||
|
|
||||||
private static final String TAG = "DashStreamingTest";
|
private static final String TAG = "DashStreamingTest";
|
||||||
|
|
||||||
@ -78,27 +84,24 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
// Wait 10 seconds, then seek to near end.
|
// Wait 10 seconds, then seek to near end.
|
||||||
.delay(10000).seek(120000)
|
.delay(10000).seek(120000)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
@Rule public ActivityTestRule<HostActivity> testRule = new ActivityTestRule<>(HostActivity.class);
|
||||||
|
|
||||||
private DashTestRunner testRunner;
|
private DashTestRunner testRunner;
|
||||||
|
|
||||||
public DashStreamingTest() {
|
@Before
|
||||||
super(HostActivity.class);
|
public void setUp() {
|
||||||
|
testRunner = new DashTestRunner(TAG, testRule.getActivity(), getInstrumentation());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@After
|
||||||
protected void setUp() throws Exception {
|
public void tearDown() {
|
||||||
super.setUp();
|
|
||||||
testRunner = new DashTestRunner(TAG, getActivity(), getInstrumentation());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void tearDown() throws Exception {
|
|
||||||
testRunner = null;
|
testRunner = null;
|
||||||
super.tearDown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// H264 CDD.
|
// H264 CDD.
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testH264Fixed() {
|
public void testH264Fixed() {
|
||||||
if (Util.SDK_INT < 16) {
|
if (Util.SDK_INT < 16) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -113,6 +116,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testH264Adaptive() throws DecoderQueryException {
|
public void testH264Adaptive() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 16 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
if (Util.SDK_INT < 16 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -128,6 +132,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testH264AdaptiveWithSeeking() throws DecoderQueryException {
|
public void testH264AdaptiveWithSeeking() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 16 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
if (Util.SDK_INT < 16 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -145,6 +150,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testH264AdaptiveWithRendererDisabling() throws DecoderQueryException {
|
public void testH264AdaptiveWithRendererDisabling() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 16 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
if (Util.SDK_INT < 16 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -164,6 +170,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
|
|
||||||
// H265 CDD.
|
// H265 CDD.
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testH265FixedV23() {
|
public void testH265FixedV23() {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -178,6 +185,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testH265AdaptiveV24() throws DecoderQueryException {
|
public void testH265AdaptiveV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -193,6 +201,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testH265AdaptiveWithSeekingV24() throws DecoderQueryException {
|
public void testH265AdaptiveWithSeekingV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -209,6 +218,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testH265AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
public void testH265AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -227,6 +237,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
|
|
||||||
// VP9 (CDD).
|
// VP9 (CDD).
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testVp9Fixed360pV23() {
|
public void testVp9Fixed360pV23() {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -242,6 +253,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testVp9AdaptiveV24() throws DecoderQueryException {
|
public void testVp9AdaptiveV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -257,6 +269,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testVp9AdaptiveWithSeekingV24() throws DecoderQueryException {
|
public void testVp9AdaptiveWithSeekingV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -273,6 +286,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testVp9AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
public void testVp9AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -292,6 +306,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
// H264: Other frame-rates for output buffer count assertions.
|
// H264: Other frame-rates for output buffer count assertions.
|
||||||
|
|
||||||
// 23.976 fps.
|
// 23.976 fps.
|
||||||
|
@Test
|
||||||
public void test23FpsH264FixedV23() {
|
public void test23FpsH264FixedV23() {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -308,6 +323,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 24 fps.
|
// 24 fps.
|
||||||
|
@Test
|
||||||
public void test24FpsH264FixedV23() {
|
public void test24FpsH264FixedV23() {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -324,6 +340,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 29.97 fps.
|
// 29.97 fps.
|
||||||
|
@Test
|
||||||
public void test29FpsH264FixedV23() {
|
public void test29FpsH264FixedV23() {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -342,6 +359,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
// Widevine encrypted media tests.
|
// Widevine encrypted media tests.
|
||||||
// H264 CDD.
|
// H264 CDD.
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineH264FixedV18() throws DecoderQueryException {
|
public void testWidevineH264FixedV18() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 18) {
|
if (Util.SDK_INT < 18) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -358,6 +376,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineH264AdaptiveV18() throws DecoderQueryException {
|
public void testWidevineH264AdaptiveV18() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -374,6 +393,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineH264AdaptiveWithSeekingV18() throws DecoderQueryException {
|
public void testWidevineH264AdaptiveWithSeekingV18() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -391,6 +411,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineH264AdaptiveWithRendererDisablingV18() throws DecoderQueryException {
|
public void testWidevineH264AdaptiveWithRendererDisablingV18() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -410,6 +431,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
|
|
||||||
// H265 CDD.
|
// H265 CDD.
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineH265FixedV23() throws DecoderQueryException {
|
public void testWidevineH265FixedV23() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -426,6 +448,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineH265AdaptiveV24() throws DecoderQueryException {
|
public void testWidevineH265AdaptiveV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -442,6 +465,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineH265AdaptiveWithSeekingV24() throws DecoderQueryException {
|
public void testWidevineH265AdaptiveWithSeekingV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -459,6 +483,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineH265AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
public void testWidevineH265AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -478,6 +503,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
|
|
||||||
// VP9 (CDD).
|
// VP9 (CDD).
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineVp9Fixed360pV23() throws DecoderQueryException {
|
public void testWidevineVp9Fixed360pV23() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -494,6 +520,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineVp9AdaptiveV24() throws DecoderQueryException {
|
public void testWidevineVp9AdaptiveV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -510,6 +537,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineVp9AdaptiveWithSeekingV24() throws DecoderQueryException {
|
public void testWidevineVp9AdaptiveWithSeekingV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -527,6 +555,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineVp9AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
public void testWidevineVp9AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -547,6 +576,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
// H264: Other frame-rates for output buffer count assertions.
|
// H264: Other frame-rates for output buffer count assertions.
|
||||||
|
|
||||||
// 23.976 fps.
|
// 23.976 fps.
|
||||||
|
@Test
|
||||||
public void testWidevine23FpsH264FixedV23() throws DecoderQueryException {
|
public void testWidevine23FpsH264FixedV23() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -564,6 +594,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 24 fps.
|
// 24 fps.
|
||||||
|
@Test
|
||||||
public void testWidevine24FpsH264FixedV23() throws DecoderQueryException {
|
public void testWidevine24FpsH264FixedV23() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -581,6 +612,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 29.97 fps.
|
// 29.97 fps.
|
||||||
|
@Test
|
||||||
public void testWidevine29FpsH264FixedV23() throws DecoderQueryException {
|
public void testWidevine29FpsH264FixedV23() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 23) {
|
if (Util.SDK_INT < 23) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -599,6 +631,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
|
|
||||||
// Decoder info.
|
// Decoder info.
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testDecoderInfoH264() throws DecoderQueryException {
|
public void testDecoderInfoH264() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 16) {
|
if (Util.SDK_INT < 16) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -609,6 +642,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
assertThat(Util.SDK_INT < 21 || decoderInfo.adaptive).isTrue();
|
assertThat(Util.SDK_INT < 21 || decoderInfo.adaptive).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testDecoderInfoH265V24() throws DecoderQueryException {
|
public void testDecoderInfoH265V24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
@ -617,6 +651,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
|||||||
assertThat(MediaCodecUtil.getDecoderInfo(MimeTypes.VIDEO_H265, false).adaptive).isTrue();
|
assertThat(MediaCodecUtil.getDecoderInfo(MimeTypes.VIDEO_H265, false).adaptive).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testDecoderInfoVP9V24() throws DecoderQueryException {
|
public void testDecoderInfoVP9V24() throws DecoderQueryException {
|
||||||
if (Util.SDK_INT < 24) {
|
if (Util.SDK_INT < 24) {
|
||||||
// Pass.
|
// Pass.
|
||||||
|
@ -15,13 +15,16 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.playbacktests.gts;
|
package com.google.android.exoplayer2.playbacktests.gts;
|
||||||
|
|
||||||
|
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth.assertWithMessage;
|
import static com.google.common.truth.Truth.assertWithMessage;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import android.media.MediaDrm.MediaDrmStateException;
|
import android.media.MediaDrm.MediaDrmStateException;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.test.ActivityInstrumentationTestCase2;
|
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
|
import androidx.test.rule.ActivityTestRule;
|
||||||
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.Player;
|
import com.google.android.exoplayer2.Player;
|
||||||
import com.google.android.exoplayer2.drm.DrmInitData;
|
import com.google.android.exoplayer2.drm.DrmInitData;
|
||||||
import com.google.android.exoplayer2.drm.DrmSession.DrmSessionException;
|
import com.google.android.exoplayer2.drm.DrmSession.DrmSessionException;
|
||||||
@ -36,11 +39,15 @@ import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
|
|||||||
import com.google.android.exoplayer2.util.MimeTypes;
|
import com.google.android.exoplayer2.util.MimeTypes;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
import com.google.android.exoplayer2.util.Util;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Rule;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
/**
|
/** Tests Widevine encrypted DASH playbacks using offline keys. */
|
||||||
* Tests Widevine encrypted DASH playbacks using offline keys.
|
@RunWith(AndroidJUnit4.class)
|
||||||
*/
|
public final class DashWidevineOfflineTest {
|
||||||
public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCase2<HostActivity> {
|
|
||||||
|
|
||||||
private static final String TAG = "DashWidevineOfflineTest";
|
private static final String TAG = "DashWidevineOfflineTest";
|
||||||
private static final String USER_AGENT = "ExoPlayerPlaybackTests";
|
private static final String USER_AGENT = "ExoPlayerPlaybackTests";
|
||||||
@ -50,21 +57,20 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
|||||||
private OfflineLicenseHelper<FrameworkMediaCrypto> offlineLicenseHelper;
|
private OfflineLicenseHelper<FrameworkMediaCrypto> offlineLicenseHelper;
|
||||||
private byte[] offlineLicenseKeySetId;
|
private byte[] offlineLicenseKeySetId;
|
||||||
|
|
||||||
public DashWidevineOfflineTest() {
|
@Rule public ActivityTestRule<HostActivity> testRule = new ActivityTestRule<>(HostActivity.class);
|
||||||
super(HostActivity.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Before
|
||||||
protected void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
testRunner =
|
||||||
testRunner = new DashTestRunner(TAG, getActivity(), getInstrumentation())
|
new DashTestRunner(TAG, testRule.getActivity(), getInstrumentation())
|
||||||
.setStreamName("test_widevine_h264_fixed_offline")
|
.setStreamName("test_widevine_h264_fixed_offline")
|
||||||
.setManifestUrl(DashTestData.WIDEVINE_H264_MANIFEST)
|
.setManifestUrl(DashTestData.WIDEVINE_H264_MANIFEST)
|
||||||
.setWidevineInfo(MimeTypes.VIDEO_H264, true)
|
.setWidevineInfo(MimeTypes.VIDEO_H264, true)
|
||||||
.setFullPlaybackNoSeeking(true)
|
.setFullPlaybackNoSeeking(true)
|
||||||
.setCanIncludeAdditionalVideoFormats(false)
|
.setCanIncludeAdditionalVideoFormats(false)
|
||||||
.setAudioVideoFormats(DashTestData.WIDEVINE_AAC_AUDIO_REPRESENTATION_ID,
|
.setAudioVideoFormats(
|
||||||
DashTestData.WIDEVINE_H264_CDD_FIXED);
|
DashTestData.WIDEVINE_AAC_AUDIO_REPRESENTATION_ID,
|
||||||
|
DashTestData.WIDEVINE_H264_CDD_FIXED);
|
||||||
|
|
||||||
boolean useL1Widevine = DashTestRunner.isL1WidevineAvailable(MimeTypes.VIDEO_H264);
|
boolean useL1Widevine = DashTestRunner.isL1WidevineAvailable(MimeTypes.VIDEO_H264);
|
||||||
String widevineLicenseUrl = DashTestData.getWidevineLicenseUrl(true, useL1Widevine);
|
String widevineLicenseUrl = DashTestData.getWidevineLicenseUrl(true, useL1Widevine);
|
||||||
@ -75,8 +81,8 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@After
|
||||||
protected void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
testRunner = null;
|
testRunner = null;
|
||||||
if (offlineLicenseKeySetId != null) {
|
if (offlineLicenseKeySetId != null) {
|
||||||
releaseLicense();
|
releaseLicense();
|
||||||
@ -86,11 +92,11 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
|||||||
}
|
}
|
||||||
offlineLicenseHelper = null;
|
offlineLicenseHelper = null;
|
||||||
httpDataSourceFactory = null;
|
httpDataSourceFactory = null;
|
||||||
super.tearDown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Offline license tests
|
// Offline license tests
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineOfflineLicenseV22() throws Exception {
|
public void testWidevineOfflineLicenseV22() throws Exception {
|
||||||
if (Util.SDK_INT < 22) {
|
if (Util.SDK_INT < 22) {
|
||||||
return; // Pass.
|
return; // Pass.
|
||||||
@ -103,6 +109,7 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
|||||||
assertThat(offlineLicenseKeySetId).isNotNull();
|
assertThat(offlineLicenseKeySetId).isNotNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineOfflineReleasedLicenseV22() throws Throwable {
|
public void testWidevineOfflineReleasedLicenseV22() throws Throwable {
|
||||||
if (Util.SDK_INT < 22) {
|
if (Util.SDK_INT < 22) {
|
||||||
return; // Pass.
|
return; // Pass.
|
||||||
@ -129,6 +136,7 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineOfflineExpiredLicenseV22() throws Exception {
|
public void testWidevineOfflineExpiredLicenseV22() throws Exception {
|
||||||
if (Util.SDK_INT < 22) {
|
if (Util.SDK_INT < 22) {
|
||||||
return; // Pass.
|
return; // Pass.
|
||||||
@ -158,6 +166,7 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
|||||||
testRunner.run();
|
testRunner.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testWidevineOfflineLicenseExpiresOnPauseV22() throws Exception {
|
public void testWidevineOfflineLicenseExpiresOnPauseV22() throws Exception {
|
||||||
if (Util.SDK_INT < 22) {
|
if (Util.SDK_INT < 22) {
|
||||||
return; // Pass.
|
return; // Pass.
|
||||||
|
@ -15,11 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.playbacktests.gts;
|
package com.google.android.exoplayer2.playbacktests.gts;
|
||||||
|
|
||||||
|
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||||
|
|
||||||
import android.media.MediaCodecInfo.AudioCapabilities;
|
import android.media.MediaCodecInfo.AudioCapabilities;
|
||||||
import android.media.MediaCodecInfo.CodecCapabilities;
|
import android.media.MediaCodecInfo.CodecCapabilities;
|
||||||
import android.media.MediaCodecInfo.CodecProfileLevel;
|
import android.media.MediaCodecInfo.CodecProfileLevel;
|
||||||
import android.media.MediaCodecInfo.VideoCapabilities;
|
import android.media.MediaCodecInfo.VideoCapabilities;
|
||||||
import android.test.InstrumentationTestCase;
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.mediacodec.MediaCodecInfo;
|
import com.google.android.exoplayer2.mediacodec.MediaCodecInfo;
|
||||||
import com.google.android.exoplayer2.mediacodec.MediaCodecUtil;
|
import com.google.android.exoplayer2.mediacodec.MediaCodecUtil;
|
||||||
import com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException;
|
import com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException;
|
||||||
@ -29,9 +31,13 @@ import com.google.android.exoplayer2.util.MimeTypes;
|
|||||||
import com.google.android.exoplayer2.util.Util;
|
import com.google.android.exoplayer2.util.Util;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
/** Tests enumeration of decoders using {@link MediaCodecUtil}. */
|
/** Tests enumeration of decoders using {@link MediaCodecUtil}. */
|
||||||
public class EnumerateDecodersTest extends InstrumentationTestCase {
|
@RunWith(AndroidJUnit4.class)
|
||||||
|
public class EnumerateDecodersTest {
|
||||||
|
|
||||||
private static final String TAG = "EnumerateDecodersTest";
|
private static final String TAG = "EnumerateDecodersTest";
|
||||||
|
|
||||||
@ -40,14 +46,14 @@ public class EnumerateDecodersTest extends InstrumentationTestCase {
|
|||||||
|
|
||||||
private MetricsLogger metricsLogger;
|
private MetricsLogger metricsLogger;
|
||||||
|
|
||||||
@Override
|
@Before
|
||||||
protected void setUp() throws Exception {
|
public void setUp() {
|
||||||
super.setUp();
|
|
||||||
metricsLogger =
|
metricsLogger =
|
||||||
MetricsLogger.Factory.createDefault(
|
MetricsLogger.Factory.createDefault(
|
||||||
getInstrumentation(), TAG, REPORT_NAME, REPORT_OBJECT_NAME);
|
getInstrumentation(), TAG, REPORT_NAME, REPORT_OBJECT_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testEnumerateDecoders() throws Exception {
|
public void testEnumerateDecoders() throws Exception {
|
||||||
enumerateDecoders(MimeTypes.VIDEO_H263);
|
enumerateDecoders(MimeTypes.VIDEO_H263);
|
||||||
enumerateDecoders(MimeTypes.VIDEO_H264);
|
enumerateDecoders(MimeTypes.VIDEO_H264);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user