Bug 771207 - Fix permanent orange in test_temporaryFilesRemoved.js XPCShell test that was passing a fake docShell around. r=Standard8.
authorMike Conley <mconley@mozilla.com>
Thu, 05 Jul 2012 16:18:05 -0400
changeset 10586 cab17ecd7ab8
parent 10585 5f0f8b16b477
child 10587 106c1726c7d7
push id7997
push usermconley@mozilla.com
push date2012-07-05 20:18 +0000
treeherdercomm-central@cab17ecd7ab8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs771207
Bug 771207 - Fix permanent orange in test_temporaryFilesRemoved.js XPCShell test that was passing a fake docShell around. r=Standard8.
mailnews/compose/test/unit/test_temporaryFilesRemoved.js
--- a/mailnews/compose/test/unit/test_temporaryFilesRemoved.js
+++ b/mailnews/compose/test/unit/test_temporaryFilesRemoved.js
@@ -25,21 +25,16 @@ var progressListener = {
         iid.equals(Ci.nsISupportsWeakReference) ||
         iid.equals(Ci.nsISupports))
       return this;
 
     throw Components.results.NS_NOINTERFACE;
   }
 };
 
-var dummyDocShell = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIDocShell,
-                                         Ci.nsISupportsWeakReference,])
-}
-
 function get_temporary_files_for(name) {
   let file = Cc["@mozilla.org/file/directory_service;1"]
                .getService(Ci.nsIProperties)
                .get("TmpD", Ci.nsIFile);
   file.append(name);
   file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
 
   file.remove(false);
@@ -62,18 +57,16 @@ function check_files_not_exist(files) {
     do_check_false(file.exists());
   });
 }
 
 function check_result() {
   // temp files should be deleted as soon as the draft is finished saving.
   check_files_not_exist(gExpectedFiles);
 
-  gMsgCompose.CloseWindow(true);
-
   do_test_finished();
 }
 
 function run_test() {
   gExpectedFiles = collect_expected_temporary_files();
   do_register_cleanup(function() {
     gExpectedFiles.forEach(function(file) {
       if (file.exists())
@@ -93,17 +86,17 @@ function run_test() {
 
   fields.body = "body text";
   // set multipart for nsemail.html
   fields.useMultipartAlternative = true;
 
   params.composeFields = fields;
   params.format = Ci.nsIMsgCompFormat.HTML;
 
-  gMsgCompose.initialize(params, null, dummyDocShell);
+  gMsgCompose.initialize(params, null, null);
 
   let identity = getSmtpIdentity(null, getBasicSmtpServer());
 
   let rootFolder = gLocalIncomingServer.rootMsgFolder;
   let draftFolder = rootFolder.createLocalSubfolder("Drafts");
 
   let progress = Cc["@mozilla.org/messenger/progress;1"]
                    .createInstance(Ci.nsIMsgProgress);