Bug 1363281 - Follow-up: fix test_longLines.js. r=me
authorJorg K <jorgk@jorgk.com>
Thu, 15 Jun 2017 21:51:14 +0200
changeset 28350 b1d589f013a94aa03087bbef35db307e915fdb9e
parent 28349 3bc67f4dfdef95fefb635d104c34c897743105f0
child 28351 108327ec86f2e7f4a75701a0a5bbe7fbb3d0bb74
push id1986
push userclokep@gmail.com
push dateWed, 02 Aug 2017 14:43:31 +0000
treeherdercomm-beta@b51c9adf2c9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1363281
Bug 1363281 - Follow-up: fix test_longLines.js. r=me
mailnews/compose/test/unit/test_longLines.js
--- a/mailnews/compose/test/unit/test_longLines.js
+++ b/mailnews/compose/test/unit/test_longLines.js
@@ -113,16 +113,17 @@ function* testBodyWithLongLine() {
     {
       "Content-Type": "text/html; charset=UTF-8",
       "Content-Transfer-Encoding": "base64"
     },
     htmlMessage
   );
 
   // Again, but this time as plain text.
+  fields.body = htmlMessage;
   fields.forcePlainText = true;
   fields.useMultipartAlternative = false;
   yield richCreateMessage(fields, [], identity);
   checkDraftHeadersAndBody(
     {
       "Content-Type": "text/plain; charset=UTF-8; format=flowed",
       "Content-Transfer-Encoding": "base64"
     },
@@ -140,16 +141,17 @@ function* testBodyWithLongLine() {
     {
       "Content-Type": "text/html; charset=UTF-8",
       "Content-Transfer-Encoding": "base64"
     },
     htmlMessage
   );
 
   // Again, but this time as plain text.
+  fields.body = htmlMessage;
   fields.forcePlainText = true;
   fields.useMultipartAlternative = false;
   yield richCreateMessage(fields, [], identity);
   checkDraftHeadersAndBody(
     {
       "Content-Type": "text/plain; charset=UTF-8; format=flowed",
       "Content-Transfer-Encoding": "base64"
     },
@@ -170,16 +172,17 @@ function* testBodyWithLongLine() {
       "Content-Type": "text/html; charset=ISO-2022-JP",
       "Content-Transfer-Encoding": "base64"
     },
     htmlMessage,
     "ISO-2022-JP"
   );
 
   // Again, but this time as plain text.
+  fields.body = htmlMessage;
   fields.forcePlainText = true;
   fields.useMultipartAlternative = false;
   yield richCreateMessage(fields, [], identity);
 
   // Expected body: The message without the tags and chopped up in
   // chunks of 36 characters with a space appended to each line.
   let expectedBody = "";
   let lastIndex = 0;
@@ -194,16 +197,17 @@ function* testBodyWithLongLine() {
       "Content-Type": "text/plain; charset=ISO-2022-JP; format=flowed; delsp=yes",
       "Content-Transfer-Encoding": "7bit"
     },
     expectedBody,
     "ISO-2022-JP"
   );
 
   // Again, but this time not flowed.
+  fields.body = htmlMessage;
   Services.prefs.setBoolPref("mailnews.send_plaintext_flowed", false);
 
   yield richCreateMessage(fields, [], identity);
   checkDraftHeadersAndBody(
     {
       "Content-Type": "text/plain; charset=ISO-2022-JP",
       "Content-Transfer-Encoding": "7bit"
     },