bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Add tests for network failures

NEW
Unassigned

Status

()

Toolkit
Downloads API
5 years ago
5 years ago

People

(Reporter: Paolo, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
The new jsdownloads API already includes a generic test for network failures,
"test_download_error_source". It tests one of many possible failure cases,
because it was the simplest to implement with the existing httpd.js. See:

http://mxr.mozilla.org/mozilla-central/source/toolkit/components/jsdownloads/test/unit/test_DownloadCore.js

However, there are other possible network failure cases that aren't tested
neither in the new API nor in the current Download Manager tests. We should
understand if we have the infrastructure for those tests and add it if not.

One case that isn't currently tested, for example, is when a download is
interrupted midway, for any network reason (if more than one reason is
possible, ideally we should have separate tests). The current test checks
the case where a download fails before any data is received.
You need to log in before you can comment on or make changes to this bug.