Bug 1039453 - Ensure drafts folder empty after tests run. r+a=Standard8
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Thu, 04 Sep 2014 08:44:59 +0100
changeset 25463 c193641bc0fa209fdfd4dff8874905974a4aa684
parent 25462 8a44ad6139fea545b980bba7a2f4f49634009f07
child 25464 e186316c0430cdb377621eda5f2ec606a72f3875
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1039453
Bug 1039453 - Ensure drafts folder empty after tests run. r+a=Standard8
mail/test/mozmill/composition/test-attachment-reminder.js
--- a/mail/test/mozmill/composition/test-attachment-reminder.js
+++ b/mail/test/mozmill/composition/test-attachment-reminder.js
@@ -472,8 +472,15 @@ function click_ok_on_send_error(controll
  * Click Save in the Save message dialog.
  */
 function click_save_message(controller) {
   if (controller.window.document.title != "Save Message")
     throw new Error("Not a Save message dialog; title=" +
                     controller.window.document.title);
   controller.window.document.documentElement.getButton('accept').doCommand();
 }
+
+function teardownModule(module) {
+  let drafts = MailServices.accounts.localFoldersServer.rootFolder
+                           .getFolderWithFlags(Ci.nsMsgFolderFlags.Drafts);
+  MailServices.accounts.localFoldersServer.rootFolder
+              .propagateDelete(drafts, true, null);
+}