Bug 1432949 - Return error if channel cannot be opened. Expand download blob test case r=geckoview-reviewers,snorp

Differential Revision: https://phabricator.services.mozilla.com/D75687
This commit is contained in:
owlishDeveloper 2021-03-09 00:45:22 +00:00
Родитель 8a6e6ca874
Коммит 5f323edf67
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -6,11 +6,13 @@
<script>
const blob = new Blob(["Downloaded Data"], {type: "text/plain"});
const element = document.createElement("a");
element.href = URL.createObjectURL(blob);
const uri = URL.createObjectURL(blob);
element.href = uri;
element.download = "download.txt";
element.style.display = "none";
document.body.appendChild(element);
element.click();
URL.revokeObjectURL(uri);
</script>
</body>
</html>

Просмотреть файл

@ -414,9 +414,7 @@ nsresult WebExecutorSupport::CreateStreamLoader(
NS_ENSURE_SUCCESS(rv, rv);
// Finally, open the channel
rv = channel->AsyncOpen(listener);
return NS_OK;
return channel->AsyncOpen(listener);
}
void WebExecutorSupport::Fetch(jni::Object::Param aRequest, int32_t aFlags,