Make it so that all mozmill tests in the composition directory get run, disabling the test that we know has random timeouts. rs=bwinton over irc, no bug.
authorMark Banner <bugzilla@standard8.plus.com>
Thu, 04 Nov 2010 15:37:20 +0000
changeset 6654 08b1cbc4540d4b85637d05dca97d21af855335e5
parent 6653 de944953524635b9458c114568176e17776e050f
child 6655 67033a790980e896d2f6a599b24d2d20c50eb0a3
push idunknown
push userunknown
push dateunknown
reviewersbwinton
Make it so that all mozmill tests in the composition directory get run, disabling the test that we know has random timeouts. rs=bwinton over irc, no bug.
mail/test/mozmill/composition/test-attachment-reminder.js
mail/test/mozmill/composition/test-signature-updating.js
mail/test/mozmill/mozmilltests.list
--- a/mail/test/mozmill/composition/test-attachment-reminder.js
+++ b/mail/test/mozmill/composition/test-attachment-reminder.js
@@ -65,16 +65,19 @@ var setupModule = function (module) {
 function setupComposeWin(toAddr, subj, body) {
   cwc.type(cwc.a("addressingWidget", {class: "addressingWidgetCell", crazyDeck: 1}), toAddr);
   cwc.type(cwc.eid("msgSubject"), subj)
   cwc.type(cwc.eid("content-frame"), body);
 }
 
 /** Test that the attachment works, in general. */
 function testAttachmentReminderPopsUpWhenItShould() {
+  // Disabled due to random timeouts, see bug 550843
+  return;
+
   cwc = composeHelper.open_compose_new_mail();
 
   setupComposeWin("test@example.org",
                   "testing attachment reminder!",
                   "Hjello! ");
 
   // Give the notification time to appear. It shouldn't.
   cwc.sleep(1100);
@@ -95,16 +98,19 @@ function testAttachmentReminderPopsUpWhe
   cwc.click(cwc.eid("button-send"));
   wait_for_modal_dialog("commonDialog");
 
   composeHelper.close_compose_window(cwc);
 }
 
 /** Test that the alert appears normally, but now after closing the notification. */
 function testAttachmentReminderDismissal() {
+  // Disabled due to random timeouts, see bug 550843
+  return;
+
   cwc = composeHelper.open_compose_new_mail();
 
   setupComposeWin("test@example.org",
                   "popping up, eh?",
                   "Hi there, remember the attachment!");
 
   // Give the notification time to appear.
   cwc.sleep(1100);
@@ -123,16 +129,19 @@ function testAttachmentReminderDismissal
   // anymore.
   cwc.e("attachmentNotificationBox").currentNotification.close();
 
   clickSendAndHandleSendError(cwc);
 }
 
 /** Test that the mail.compose.attachment_reminder_aggressive pref works. */
 function testAttachmentReminderAggressivePref() {
+  // Disabled due to random timeouts, see bug 550843
+  return;
+
   const PREF = "mail.compose.attachment_reminder_aggressive";
   let prefBranch = Cc["@mozilla.org/preferences-service;1"]
                       .getService(Ci.nsIPrefService).getBranch(null);
   prefBranch.setBoolPref(PREF, false);
 
   cwc = composeHelper.open_compose_new_mail();
 
   setupComposeWin("test@example.org",
@@ -148,16 +157,19 @@ function testAttachmentReminderAggressiv
 
   // Now reset the pref back to original value.
   if (prefBranch.prefHasUserValue(PREF))
     prefBranch.clearUserPref(PREF);
 }
 
 /** Test that clicking "No, Send Now" in the attachment reminder alert works. */
 function testNoSendNowSends() {
+  // Disabled due to random timeouts, see bug 550843
+  return;
+
   cwc = composeHelper.open_compose_new_mail();
 
   setupComposeWin("test@example.org",
                   "will the 'No, Send Now' button work?",
                   "Hello, i got your attachment!");
 
   // Give the notification time to appear.
   cwc.sleep(1100);
--- a/mail/test/mozmill/composition/test-signature-updating.js
+++ b/mail/test/mozmill/composition/test-signature-updating.js
@@ -62,16 +62,24 @@ var prefBranch = Cc["@mozilla.org/prefer
 
 var setupModule = function (module) {
   let fdh = collector.getModule("folder-display-helpers");
   fdh.installInto(module);
   composeHelper = collector.getModule("compose-helpers");
   composeHelper.installInto(module);
   let wh = collector.getModule("window-helpers");
   wh.installInto(module);
+
+  // Ensure we're in the tinderbox account as that has the right identities set
+  // up for this test.
+  let acctMgr = Cc["@mozilla.org/messenger/account-manager;1"]
+                  .getService(Ci.nsIMsgAccountManager);
+  let server = acctMgr.FindServer("tinderbox", "tinderbox", "pop3");
+  let inbox = server.rootFolder.getChildNamed("Inbox");
+  be_in_folder(inbox);
 };
 
 function setupComposeWin(toAddr, subj, body) {
   cwc.type(cwc.a("addressingWidget", {class: "addressingWidgetCell", crazyDeck: 1}), toAddr);
   cwc.type(cwc.eid("msgSubject"), subj);
   cwc.type(cwc.eid("content-frame"), body);
 }
 
--- a/mail/test/mozmill/mozmilltests.list
+++ b/mail/test/mozmill/mozmilltests.list
@@ -1,10 +1,10 @@
 account
-composition/test-signature-updating.js
+composition
 content-policy
 content-tabs
 cookies
 folder-display
 folder-pane
 folder-tree-modes
 folder-widget
 junk-commands