Bug 1222046 - Follow-up: fix test properly this time. r+a=jorgk
authorJorg K <jorgk@jorgk.com>
Sun, 12 Jan 2020 09:14:36 +0100
changeset 36992 8efbc97ee1181794e7292ff7b7702698c306af50
parent 36991 1dcefcd94db905a5374efb3b7851fe3623436be4
child 36993 560911f4360eb9798dfd75f9138037c4b2373757
push id2545
push usergeoff@darktrojan.net
push dateWed, 15 Jan 2020 21:10:47 +0000
treeherdercomm-beta@d7e99ea4d5ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1222046
Bug 1222046 - Follow-up: fix test properly this time. r+a=jorgk
mailnews/compose/test/unit/test_longLines.js
--- a/mailnews/compose/test/unit/test_longLines.js
+++ b/mailnews/compose/test/unit/test_longLines.js
@@ -122,18 +122,17 @@ async function testBodyWithLongLine() {
   fields.to = "Nobody <nobody@tinderbox.invalid>";
   fields.subject = "Message with 1200 byte line in body";
   fields.characterSet = "UTF-8";
   let htmlMessage =
     "<html><head>" +
     '<meta http-equiv="content-type" content="text/html; charset=utf-8">' +
     "</head><body>" +
     longMultibyteLine +
-    "</body></html>" +
-    newline;
+    "</body></html>\r\n";
   fields.body = htmlMessage;
   await richCreateMessage(fields, [], identity);
   checkDraftHeadersAndBody(
     {
       "Content-Type": "text/html; charset=UTF-8",
       "Content-Transfer-Encoding": "base64",
     },
     htmlMessage
@@ -154,25 +153,25 @@ async function testBodyWithLongLine() {
 
   // Now CJK.
   fields.forcePlainText = false;
   htmlMessage =
     "<html><head>" +
     '<meta http-equiv="content-type" content="text/html; charset=utf-8">' +
     "</head><body>" +
     longMultibyteLineCJK +
-    "</body></html>";
+    "</body></html>\r\n";
   fields.body = htmlMessage;
   await richCreateMessage(fields, [], identity);
   checkDraftHeadersAndBody(
     {
       "Content-Type": "text/html; charset=UTF-8",
       "Content-Transfer-Encoding": "base64",
     },
-    htmlMessage + newline
+    htmlMessage
   );
 
   // Again, but this time as plain text.
   fields.body = htmlMessage;
   fields.forcePlainText = true;
   fields.useMultipartAlternative = false;
   await richCreateMessage(fields, [], identity);
   checkDraftHeadersAndBody(
@@ -187,25 +186,25 @@ async function testBodyWithLongLine() {
   fields.characterSet = "ISO-2022-JP";
 
   fields.forcePlainText = false;
   htmlMessage =
     "<html><head>" +
     '<meta http-equiv="content-type" content="text/html; charset=ISO-2022-JP">' +
     "</head><body>" +
     longMultibyteLineJapanese +
-    "</body></html>";
+    "</body></html>\r\n";
   fields.body = htmlMessage;
   await richCreateMessage(fields, [], identity);
   checkDraftHeadersAndBody(
     {
       "Content-Type": "text/html; charset=ISO-2022-JP",
       "Content-Transfer-Encoding": "base64",
     },
-    htmlMessage + newline,
+    htmlMessage,
     "ISO-2022-JP"
   );
 
   // Again, but this time as plain text.
   fields.body = htmlMessage;
   fields.forcePlainText = true;
   fields.useMultipartAlternative = false;
   await richCreateMessage(fields, [], identity);