From 69fbda60118fd1c1a2cc37792c4b490724921c21 Mon Sep 17 00:00:00 2001 From: Shawn Wilsher Date: Wed, 8 Oct 2008 16:31:14 -0400 Subject: [PATCH] More test file cleanup so failed runs don't cause perpetual failures... --- toolkit/components/downloads/test/unit/test_offline_support.js | 2 ++ toolkit/components/downloads/test/unit/test_resume.js | 2 ++ toolkit/components/downloads/test/unit/test_sleep_wake.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/toolkit/components/downloads/test/unit/test_offline_support.js b/toolkit/components/downloads/test/unit/test_offline_support.js index a1eb043ee62..84017954c71 100644 --- a/toolkit/components/downloads/test/unit/test_offline_support.js +++ b/toolkit/components/downloads/test/unit/test_offline_support.js @@ -170,6 +170,8 @@ function run_test() */ let destFile = dirSvc.get("ProfD", nsIF); destFile.append("offline_online"); + if (destFile.exists()) + destFile.remove(false); let persist = Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]. createInstance(nsIWBP); persist.persistFlags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES | diff --git a/toolkit/components/downloads/test/unit/test_resume.js b/toolkit/components/downloads/test/unit/test_resume.js index 65647004062..90f7f9adbf5 100644 --- a/toolkit/components/downloads/test/unit/test_resume.js +++ b/toolkit/components/downloads/test/unit/test_resume.js @@ -148,6 +148,8 @@ function run_test() */ var destFile = dirSvc.get("ProfD", nsIF); destFile.append("resumed"); + if (destFile.exists()) + destFile.remove(false); var persist = Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]. createInstance(nsIWBP); persist.persistFlags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES | diff --git a/toolkit/components/downloads/test/unit/test_sleep_wake.js b/toolkit/components/downloads/test/unit/test_sleep_wake.js index 5069e89e921..ce68036d491 100644 --- a/toolkit/components/downloads/test/unit/test_sleep_wake.js +++ b/toolkit/components/downloads/test/unit/test_sleep_wake.js @@ -169,6 +169,8 @@ function run_test() */ let destFile = dirSvc.get("ProfD", nsIF); destFile.append("sleep_wake"); + if (destFile.exists()) + destFile.remove(false); let persist = Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]. createInstance(nsIWBP); persist.persistFlags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES |