Fix test broken by bug 458812.
authorJustin Dolske <dolske@mozilla.com>
Sun, 13 Dec 2009 18:42:14 -0800
changeset 35700 1f0cfbdf428aa52fdb27dbef9061f2af486c73d1
parent 35699 f20c4c211ac85da40ed2b1098ea1c5049c9e621e
child 35701 808b422d1274118e540fe15616e23a202aa3bd6f
push id10684
push userjdolske@mozilla.com
push dateMon, 14 Dec 2009 02:42:29 +0000
treeherdermozilla-central@1f0cfbdf428a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs458812
milestone1.9.3a1pre
Fix test broken by bug 458812.
toolkit/components/satchel/test/unit/test_bug_329741.js
--- a/toolkit/components/satchel/test/unit/test_bug_329741.js
+++ b/toolkit/components/satchel/test/unit/test_bug_329741.js
@@ -37,26 +37,27 @@
 
 // Test to make sure we drop formhistory.dat when clearing form history
 
 
 
 function run_test()
 {
   var file = do_get_file("formhistory.dat");
-  var formhistFile = dirSvc.get("ProfD", Ci.nsIFile);
+  var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
+  var formhistFile = profileDir.clone();
+  formhistFile.append("formhistory.dat");
 
   // Cleanup from any previous test.
   if (formhistFile.exists())
       formhistFile.remove(false);
   do_check_false(formhistFile.exists());
 
   // Copy a formhistory.dat into place
-  file.copyTo(formhistFile, "formhistory.dat");
-  formhistFile.append("formhistory.dat");
+  file.copyTo(profileDir, "formhistory.dat");
   do_check_true(formhistFile.exists());
 
   // Clear form history, test that file was deleted.
   var formHistory = Cc["@mozilla.org/satchel/form-history;1"].
                     getService(Ci.nsIFormHistory2);
   formHistory.removeAllEntries();
   do_check_false(formhistFile.exists());
 }