Fix tests for bug 410894 and reenable them. r=sdwilsh

This commit is contained in:
rflint@ryanflint.com 2008-01-08 21:38:16 -08:00
Родитель 32f60782c3
Коммит 9573cbc2a5
2 изменённых файлов: 22 добавлений и 16 удалений

Просмотреть файл

@ -45,10 +45,9 @@ relativesrcdir = toolkit/mozapps/downloads/tests/browser
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
# XXX this test currently fails on windows
#_BROWSER_FILES = \
# browser_basic_functionality.js
# $(NULL)
_BROWSER_FILES = \
browser_basic_functionality.js \
$(NULL)
#libs:: $(_BROWSER_FILES)
# $(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
libs:: $(_BROWSER_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)

Просмотреть файл

@ -35,39 +35,46 @@
*
* ***** END LICENSE BLOCK ***** */
var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
var dmFile = Cc["@mozilla.org/file/directory_service;1"].
getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile);
dmFile.append("dmuitest.file");
dmFile.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666);
var gTestPath = ios.newFileURI(dmFile).spec;
const DownloadData = [
/* Active states first */
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859239,
state: Ci.nsIDownloadManager.DOWNLOAD_NOTSTARTED,
currBytes: 0, maxBytes: -1, preferredAction: 0, autoResume: 0 },
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859238,
state: Ci.nsIDownloadManager.DOWNLOAD_DOWNLOADING,
currBytes: 0, maxBytes: -1, preferredAction: 0, autoResume: 0 },
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859237,
state: Ci.nsIDownloadManager.DOWNLOAD_PAUSED,
currBytes: 0, maxBytes: -1, preferredAction: 0, autoResume: 0 },
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859236,
state: Ci.nsIDownloadManager.DOWNLOAD_SCANNING,
currBytes: 0, maxBytes: -1, preferredAction: 0, autoResume: 0 },
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859235,
state: Ci.nsIDownloadManager.DOWNLOAD_QUEUED,
@ -75,35 +82,35 @@ const DownloadData = [
/* Finished states */
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859234,
state: Ci.nsIDownloadManager.DOWNLOAD_FINISHED,
currBytes: 0, maxBytes: -1, preferredAction: 0, autoResume: 0 },
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859233,
state: Ci.nsIDownloadManager.DOWNLOAD_FAILED,
currBytes: 0, maxBytes: -1, preferredAction: 0, autoResume: 0 },
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859232,
state: Ci.nsIDownloadManager.DOWNLOAD_CANCELED,
currBytes: 0, maxBytes: -1, preferredAction: 0, autoResume: 0 },
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859231,
state: Ci.nsIDownloadManager.DOWNLOAD_BLOCKED,
currBytes: 0, maxBytes: -1, preferredAction: 0, autoResume: 0 },
{ name: "381603.patch",
source: "https://bugzilla.mozilla.org/attachment.cgi?id=266520",
target: "file:///Users/sdwilsh/Desktop/381603.patch",
target: gTestPath,
startTime: 1180493839859230,
endTime: 1180493839859230,
state: Ci.nsIDownloadManager.DOWNLOAD_DIRTY,