Bug 419691 - Get multiword search testcase working on windows. r=sdwilsh

This commit is contained in:
Edward Lee 2008-06-07 16:29:38 -07:00
parent e0db1865d6
commit 4943c4e435
2 changed files with 9 additions and 7 deletions

View File

@ -59,6 +59,7 @@ _BROWSER_FILES = \
browser_bug_429247.js \
browser_cleanup_search.js \
browser_multi_select.js \
browser_multiword_search.js \
browser_search_clearlist.js \
browser_select_all.js \
$(NULL)
@ -69,11 +70,5 @@ _BROWSER_FILES += \
$(NULL)
endif
ifneq ($(OS_ARCH), WINNT)
_BROWSER_FILES += \
browser_multiword_search.js \
$(NULL)
endif
libs:: $(_BROWSER_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)

View File

@ -49,6 +49,13 @@ function test()
// Empty any old downloads
db.executeSimpleSQL("DELETE FROM moz_downloads");
// Make a file name for the downloads
let file = Cc["@mozilla.org/file/directory_service;1"].
getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile);
file.append("multiWord");
let filePath = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService).newFileURI(file).spec;
let stmt = db.createStatement(
"INSERT INTO moz_downloads (name, target, source, state, endTime, maxBytes) " +
"VALUES (?1, ?2, ?3, ?4, ?5, ?6)");
@ -56,7 +63,7 @@ function test()
try {
for each (let site in ["ed.agadak.net", "mozilla.org"]) {
stmt.bindStringParameter(0, "Super Pimped Download");
stmt.bindStringParameter(1, "file://dummy/file");
stmt.bindStringParameter(1, filePath);
stmt.bindStringParameter(2, "http://" + site + "/file");
stmt.bindInt32Parameter(3, dm.DOWNLOAD_FINISHED);
stmt.bindInt64Parameter(4, new Date(1985, 7, 2) * 1000);