Commit 737cee07 authored by Kate Glazko's avatar Kate Glazko
Browse files

For #1159: Enable to download blob files in GeckoViewFetchClient

parent 4d71b7ab
......@@ -55,10 +55,7 @@ class FetchDownloadManager<T : AbstractFetchDownloadService>(
* @return the id reference of the scheduled download.
override fun download(download: DownloadState, cookie: String): Long? {
if (!download.isScheme(listOf("http", "https", "data"))) {
// We are ignoring everything that is not http(s) or data. This is a limitation of
// GeckoView: and
if (!download.isScheme(listOf("http", "https", "data", "blob"))) {
return null
......@@ -22,15 +22,16 @@ import
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito.verify
import mozilla.components.feature.downloads.AbstractFetchDownloadService.DownloadJobStatus
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Assert.assertNull
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertEquals
import org.mockito.Mockito.times
......@@ -136,6 +137,15 @@ class FetchDownloadManagerTest {
fun `trying to download a file with a blob scheme should trigger a download`() {
val validBlobDownload = download.copy(url = "blob:")
val id =!!
fun `sendBroadcast with valid downloadID must call onDownloadStopped after download`() {
var downloadCompleted = false
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment