Commit 8d739067 by eguven Committed by Oliver Woodman

Add HlsDownloadTest

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169064003
parent 457d0ba1
...@@ -17,6 +17,7 @@ package com.google.android.exoplayer2.playbacktests.gts; ...@@ -17,6 +17,7 @@ package com.google.android.exoplayer2.playbacktests.gts;
import android.net.Uri; import android.net.Uri;
import android.test.ActivityInstrumentationTestCase2; import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
import com.google.android.exoplayer2.offline.Downloader; import com.google.android.exoplayer2.offline.Downloader;
import com.google.android.exoplayer2.offline.Downloader.ProgressListener; import com.google.android.exoplayer2.offline.Downloader.ProgressListener;
import com.google.android.exoplayer2.offline.DownloaderConstructorHelper; import com.google.android.exoplayer2.offline.DownloaderConstructorHelper;
...@@ -178,8 +179,9 @@ public final class DashDownloadTest extends ActivityInstrumentationTestCase2<Hos ...@@ -178,8 +179,9 @@ public final class DashDownloadTest extends ActivityInstrumentationTestCase2<Hos
@Override @Override
public void onDownloadProgress(Downloader downloader, float downloadPercentage, public void onDownloadProgress(Downloader downloader, float downloadPercentage,
long downloadedBytes) { long downloadedBytes) {
System.out.printf("onDownloadProgress downloadPercentage = [%g], downloadedData = [%d]%n", Log.d("DashDownloadTest",
downloadPercentage, downloadedBytes); String.format("onDownloadProgress downloadPercentage = [%g], downloadedData = [%d]%n",
downloadPercentage, downloadedBytes));
if (downloadPercentage >= stopAt) { if (downloadPercentage >= stopAt) {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment