Bug 765803 - Reply above quote (no signature, HTML composition) no longer leaves a blank line r=bwinton, a=rkent
authorMike Conley <mconley@mozilla.com>
Sat, 23 Mar 2013 07:11:00 -0400
changeset 20140 0b5a99cc7cc316ca513bb9615df01b65862fb2cf
parent 20139 8dda16e711dafa09e4cf9d53ba9d32aa9b7051af
child 20141 6d5a5e0c8c22ed531969194b74d8a937b1abbb7f
child 20143 cb8dab139590af3c7436f573b9f8fa74a5a67c95
push id42
push userkent@caspia.com
push dateFri, 20 Feb 2015 18:42:29 +0000
treeherdercomm-esr31@0b5a99cc7cc3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwinton, rkent
bugs765803
Bug 765803 - Reply above quote (no signature, HTML composition) no longer leaves a blank line r=bwinton, a=rkent
mail/test/mozmill/cloudfile/test-cloudfile-attachment-urls.js
--- a/mail/test/mozmill/cloudfile/test-cloudfile-attachment-urls.js
+++ b/mail/test/mozmill/cloudfile/test-cloudfile-attachment-urls.js
@@ -471,21 +471,20 @@ function subtest_adding_filelinks_to_rep
 
 /**
  * Subtest for test_adding_filelinks_to_reply_above for the HTML composer.
  */
 function subtest_adding_filelinks_to_reply_above(aText) {
   let cw = prepare_some_attachments_and_reply(aText, kFiles);
   let [root, list, urls] = wait_for_attachment_urls(cw, kFiles.length);
 
-  // So, we should have the root, followed by a br
-  let br = root.nextSibling;
-  assert_equals(br.localName, "br",
-                "The attachment URL containment node should be followed by " +
-                " a br");
+  // If there's any text written, then there's only a single break between the
+  // end of the text and the reply. Otherwise, there are two breaks.
+  let br = aText.length > 1 ? assert_next_nodes("br", root, 2)
+                            : assert_next_nodes("br", root, 1);
 
   // ... which is followed by a div with a class of "moz-cite-prefix".
   let div = br.nextSibling;
   assert_equals(div.localName, "div",
                 "The linebreak should be followed by a div");
 
   assert_true(div.classList.contains("moz-cite-prefix"));