another test fix followup from bug 459114
authorTed Mielczarek <ted.mielczarek@gmail.com>
Thu, 06 Aug 2009 16:17:22 -0400
changeset 31192 884483e28aae2ff149332f33c8b6aa31331e5b65
parent 31191 51f02ed639c9ad8171e092066ffef177568dc9c8
child 31193 f911882ac4195b4f02a3b9a85e24031a8c1b4735
push id8421
push usertmielczarek@mozilla.com
push dateThu, 06 Aug 2009 20:18:40 +0000
treeherdermozilla-central@884483e28aae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs459114
milestone1.9.2a1pre
another test fix followup from bug 459114
js/src/Makefile.in
toolkit/components/downloads/test/unit/test_bug_401430.js
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -36,16 +36,17 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= .
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 
+run_for_side_effects := $(shell echo "MAKE: $(MAKE)")
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= config
 
 ifdef DEHYDRA_PATH
 DIRS += analysis-tests
 endif
 
--- a/toolkit/components/downloads/test/unit/test_bug_401430.js
+++ b/toolkit/components/downloads/test/unit/test_bug_401430.js
@@ -43,18 +43,17 @@ const dm = Cc["@mozilla.org/download-man
 // Make sure Unicode is supported:
 // U+00E3 : LATIN SMALL LETTER A WITH TILDE
 // U+041B : CYRILLIC CAPITAL LETTER EL
 // U+3056 : HIRAGANA LETTER ZA
 const resultFileName = "test\u00e3\u041b\u3056" + Date.now() + ".doc";
 
 function checkResult() {
   // delete the saved file (this doesn't affect the "recent documents" list)
-  var resultFile = dirSvc.get("ProfD", Ci.nsIFile);
-  resultFile.append(resultFileName);
+  var resultFile = do_get_file(resultFileName);
   resultFile.remove(false);
 
   do_check_true(checkRecentDocsFor(resultFileName));
   do_test_finished();
 }
 
 function checkRecentDocsFor(aFileName) {
   var recentDocsKey = Cc["@mozilla.org/windows-registry-key;1"].
@@ -113,10 +112,14 @@ function run_test()
     onStateChange: function(a, b, c, d, e) { },
     onProgressChange: function(a, b, c, d, e, f, g) { },
     onSecurityChange: function(a, b, c, d) { }
   };
 
   dm.addListener(listener);
   dm.addListener(getDownloadListener());
 
-  var dl = addDownload({resultFileName: resultFileName});
+  // need to save the file to the CWD, because the profile dir is in $TEMP,
+  // and Windows apparently doesn't like putting things from $TEMP into
+  // the recent files list.
+  var dl = addDownload({resultFileName: resultFileName,
+			targetFile: do_get_file(resultFileName, true)});
 }