Bug 1235896 - Make it possible to run browser_download.js with --run-until-failure; r=bkelly

This commit is contained in:
Ehsan Akhgari 2015-12-30 15:58:42 -05:00
parent 95e56ef3c8
commit 2ad5769e79

View File

@ -3,6 +3,7 @@
Cu.import('resource://gre/modules/Services.jsm');
var Downloads = Cu.import("resource://gre/modules/Downloads.jsm", {}).Downloads;
var DownloadsCommon = Cu.import("resource:///modules/DownloadsCommon.jsm", {}).DownloadsCommon;
Cu.import('resource://gre/modules/NetUtil.jsm');
var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
@ -60,6 +61,7 @@ function test() {
ok(file.exists(), 'download completed');
is(file.fileSize, 33, 'downloaded file has correct size');
file.remove(false);
DownloadsCommon.removeAndFinalizeDownload(aDownload);
downloadList.removeView(downloadListener);
gBrowser.removeTab(tab);