use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.
the class OfflineLicenseHelperTest method testDownloadDoesNotFailIfDurationNotAvailable.
public void testDownloadDoesNotFailIfDurationNotAvailable() throws Exception {
setDefaultStubKeySetId();
DashManifest manifest = newDashManifestWithAllElements();
byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
assertNotNull(offlineLicenseKeySetId);
}
use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.
the class OfflineLicenseHelperTest method testDownloadFailsIfThereIsNoRepresentation.
public void testDownloadFailsIfThereIsNoRepresentation() throws Exception {
setDefaultStubValues();
DashManifest manifest = newDashManifest(newPeriods(newAdaptationSets()));
byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
assertNull(offlineLicenseKeySetId);
}
use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.
the class OfflineLicenseHelperTest method testDownloadFailsIfNoKeySetIdIsReturned.
public void testDownloadFailsIfNoKeySetIdIsReturned() throws Exception {
setStubLicenseAndPlaybackDurationValues(1000, 200);
DashManifest manifest = newDashManifestWithAllElements();
byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
assertNull(offlineLicenseKeySetId);
}
use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.
the class OfflineLicenseHelperTest method testDownloadFailsIfThereIsNoPeriod.
public void testDownloadFailsIfThereIsNoPeriod() throws Exception {
setDefaultStubValues();
DashManifest manifest = newDashManifest();
byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
assertNull(offlineLicenseKeySetId);
}
use of com.google.android.exoplayer2.upstream.HttpDataSource in project ExoPlayer by google.
the class OfflineLicenseHelperTest method testDownloadFailsIfThereIsNoInitData.
public void testDownloadFailsIfThereIsNoInitData() throws Exception {
setDefaultStubValues();
DashManifest manifest = newDashManifest(newPeriods(newAdaptationSets(newRepresentations(null))));
byte[] offlineLicenseKeySetId = offlineLicenseHelper.download(httpDataSource, manifest);
assertNull(offlineLicenseKeySetId);
}
Aggregations