QA/Desktop Firefox/Downloads.jsm

From MozillaWiki
Jump to: navigation, search

Summary

The following documents the overall strategy and quality status for refactoring the nsIDownloadManager interface into the Downloads.jsm JavaScript module.

Current Status
Landed in Nightly (2013-08-06)

Feature Overview

We have been working on this new module over the past few months, with the goal of eliminating any temporary unresponsiveness that could be observed when downloads are started, as well as making the browser more responsive in general while there are downloads in progress.

To make this possible, we removed all access to the "downloads.sqlite" database, replacing it with an in-memory representation of the state of current downloads. In Firefox for Desktop, the history of past downloads is handled separately, using the "places.sqlite" database.

The new API is fully asynchronous and works somewhat differently from the old one. It has the advantage of being designed for JavaScript from the start, and is much simpler than the old XPCOM API. In particular, listing and handling current downloads may be done using JavaScript objects, without any special code for database access.

We may still update existing methods to address specific needs or new requirements, but the general mechanisms will remain the same.

Important Artifacts

Testing

A new about:config preference named "browser.download.useJSTransfer" enables the browser and the Downloads Panel to use the Downloads.jsm module instead of nsIDownloadManager as the back-end. The browser must be restarted for the preference to take effect.

Support for this preference will be available in Nightly 25. This means that it will be ready for testing in the Aurora channel starting from version 25, on August 8th.

In the Firefox 26 release train, nsIDownloadManager will not be used anymore. The preference will be removed and there will be no way to revert to the old system that caused potential performance issues. We will finally be able to remove a lot of front-end code that is complex to maintain and only needed for backwards compatibility.

Feedback

The version of the module in Firefox 25 is still in development, and while the interface is complete, some features like restoring downloads after a restart and the related prompts are not implemented yet. The remaining work is tracked with dependencies of bug 847863:

https://bugzilla.mozilla.org/showdependencytree.cgi?id=847863&hide_resolved=1

If you notice any unexpected behavior with the new preference that is not already listed there, feel free to file a new bug and mark it as blocking bug 847863. For any other question or need, feel free to reply to this thread in the relevant list (extensions or platform), or contact myself directly. Any relevant information emerging from the discussion will be summarized in a new project update.

Responsibilities

The following people are involved with and ultimately responsible for a quality delivery of this feature.

  • Mihaela Velimiroviciu (QA Lead), responsible for developing and driving the overall test strategy
  • Paolo Amadini (Dev Lead), responsible for driving development of any code and related fixes

Test Strategy

The overall strategy will be to ensure that areas of code which rely on nsIDownloadManager, inclusive of Firefox and add-ons, does not regress upon migration to Downloads.jsm. As this is a refactor and does not introduce new functionality we will be looking for parity between builds utilizing the old interface and builds using the new module.

Sign-off Criteria

The following criteria shall be met before QA gives a stamp of approval to release:

  • 0 unfixed regressions found with existing automation frameworks
  • 0 unfixed regressions found with manually testing several download file types over various protocols
  • 0 unfixed regressions found with manually testing several top add-ons
  • 0 unfixed regressions found by community and users

Tasks

  • Triage unconfirmed bugs for potential regressions
  • Verification of any fixed bugs
  • Triage of daily automation for potential regressions
  • Development of new automated tests, where applicable
  • Manual regression testing through Moztrap - results here
  • Cataloging compatibility with known add-ons

Testing

Unconfirmed Bugs

Fixed Bug Verifications

Feature dependency tree

Automation

Manual Testing

Moztrap test run

Add-on Compatibility