rem:  gDownloadCount++;  
context: function addDownload(){  const nsIWBP = Ci.nsIWebBrowserPersist;  var persist = Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]                .createInstance(Ci.nsIWebBrowserPersist);  persist.persistFlags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES |                         nsIWBP.PERSIST_FLAGS_BYPASS_CACHE |                         nsIWBP.PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION;  var destFile = dirSvc.get("ProfD", Ci.nsIFile);  destFile.append("download.result");  var srcFile = dirSvc.get("ProfD", Ci.nsIFile);  srcFile.append("LICENSE");  var dl = dm.addDownload(nsIDownloadManager.DOWNLOAD_TYPE_DOWNLOAD,                          createURI("http://localhost:4444/LICENSE"),                          createURI(destFile), null, null,                          Math.round(Date.now() * 1000), null, persist);  // This will throw if it isn't found, and that would mean test failure, so no  // try catch block  var test = dm.getDownload(dl.id);  // it is part of the active downloads now, even if it hasn't started.  gDownloadCount++;  persist.progressListener = dl.QueryInterface(Ci.nsIWebProgressListener);  persist.saveURI(dl.source, null, null, null, null, dl.targetFile);  return dl;}
meta: 10520	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10520/53e0a17853d0d2fdcb0993c4dd70cc22915e66c6/head_download_manager.js/clean/toolkit/components/downloads/test/unit/head_download_manager.js