From 62292fbdd392432f0a5dfbb36ec07e3b7d88315b Mon Sep 17 00:00:00 2001 From: "sdwilsh%shawnwilsher.com" Date: Fri, 21 Nov 2008 21:33:10 +0000 Subject: [PATCH] Attempt to fix oragne. Backout should not have caused this. The test is not cleaning up after itself. No bug git-svn-id: svn://10.0.0.236/trunk@255177 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/storage/test/unit/test_bug-365166.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mozilla/storage/test/unit/test_bug-365166.js b/mozilla/storage/test/unit/test_bug-365166.js index 5a8e5e9bb25..93f781031f4 100644 --- a/mozilla/storage/test/unit/test_bug-365166.js +++ b/mozilla/storage/test/unit/test_bug-365166.js @@ -5,6 +5,13 @@ // mozIStorageStatement::getColumnName of a statement created with // "PRAGMA user_version" or "PRAGMA schema_version" function run_test() { + var file = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("TmpD", Components.interfaces.nsIFile); + file.append("bug-365166.sqlite"); + if (file.exists()) + file.remove(false); + test('user'); test('schema'); @@ -13,10 +20,6 @@ function run_test() { var colName = param + "_version"; var sql = "PRAGMA " + colName; - var file = Components.classes["@mozilla.org/file/directory_service;1"] - .getService(Components.interfaces.nsIProperties) - .get("TmpD", Components.interfaces.nsIFile); - file.append("bug-365166.sqlite"); var storageService = Components.classes["@mozilla.org/storage/service;1"]. getService(Components.interfaces.mozIStorageService); var conn = storageService.openDatabase(file);