rem: onStatusChange: function(a, b, c, d, e) { }, onLocationChange: function(a, b, c, d) { }, 
context: function run_test(){  httpserv = new nsHttpServer();  httpserv.registerDirectory("/", dirSvc.get("ProfD", Ci.nsILocalFile));  httpserv.start(4444);  // our download listener  var listener = {    onDownloadStateChange: function(aOldState, aDownload)    {      if (Ci.nsIDownloadManager.DOWNLOAD_PAUSED == aDownload.state) {        // This is so hacky, but it let's the nsWebBrowserPersist catch up with        // the script...        timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);        timer.init(observer, 0, Ci.nsITimer.TYPE_ONE_SHOT);      }      if (Ci.nsIDownloadManager.DOWNLOAD_FINISHED == aDownload.state) {        httpserv.stop();        do_test_finished();      }    },    onStateChange: function(a, b, c, d, e) { },    onProgressChange: function(a, b, c, d, e, f, g) { },    onStatusChange: function(a, b, c, d, e) { },    onLocationChange: function(a, b, c, d) { },    onSecurityChange: function(a, b, c, d) { }  };  dm.addListener(listener);  var os = Cc["@mozilla.org/observer-service;1"].           getService(Ci.nsIObserverService);  os.addObserver(observer, "dl-start", false);  addDownload();  do_test_pending();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/83ad46db2c5e5c573e41a141bdfd04f66cde4aa4/test_bug_395092.js/clean/toolkit/components/downloads/test/unit/test_bug_395092.js