Bug 1110166 - Port bug 1102219 - Rename String.prototype.contains to String.prototype.includes: mailnews. r=mkmelin
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 01 May 2015 21:56:56 +0200
changeset 17893 1cf79e3da57ab8d9b835e5d9201210eb984563ac
parent 17892 c61af7cb544ae8b24c4646a00151cac2e27766c5
child 17894 1f6cefb73596947b175691ec0baeb239fdba6f52
push id10995
push userarchaeopteryx@coole-files.de
push dateFri, 01 May 2015 20:21:44 +0000
treeherdercomm-central@1f6cefb73596 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1110166, 1102219
Bug 1110166 - Port bug 1102219 - Rename String.prototype.contains to String.prototype.includes: mailnews. r=mkmelin
mailnews/addrbook/content/abResultsPane.js
mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
mailnews/addrbook/src/nsAbAutoCompleteSearch.js
mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
mailnews/base/content/dateFormat.js
mailnews/base/prefs/content/accountcreation/createInBackend.js
mailnews/base/prefs/content/accountcreation/fetchConfig.js
mailnews/base/prefs/content/accountcreation/fetchhttp.js
mailnews/base/prefs/content/accountcreation/guessConfig.js
mailnews/base/prefs/content/am-identity-edit.js
mailnews/base/test/unit/test_bccInDatabase.js
mailnews/base/test/unit/test_detachToFile.js
mailnews/base/test/unit/test_mimemaltdetach.js
mailnews/base/test/unit/test_quarantineFilterMove.js
mailnews/base/test/unit/test_testsuite_fakeserver_imapd_gmail.js
mailnews/base/test/unit/test_testsuite_fakeserver_imapd_list-extended.js
mailnews/db/gloda/modules/fundattr.js
mailnews/db/gloda/test/unit/base_index_messages.js
mailnews/imap/test/unit/test_bccProperty.js
mailnews/imap/test/unit/test_dod.js
mailnews/imap/test/unit/test_imapAttachmentSaves.js
mailnews/imap/test/unit/test_imapFlagChange.js
mailnews/imap/test/unit/test_imapHdrStreaming.js
mailnews/imap/test/unit/test_offlineCopy.js
mailnews/imap/test/unit/test_partsOnDemand.js
mailnews/local/test/unit/test_streamHeaders.js
mailnews/mime/jsmime/jsmime.js
mailnews/mime/jsmime/test/mock_date.js
mailnews/mime/src/mimeJSComponents.js
mailnews/mime/test/unit/test_text_attachment.js
mailnews/news/src/nsNewsAutoCompleteSearch.js
mailnews/test/fakeserver/imapd.js
mailnews/test/fakeserver/pop3d.js
mailnews/test/resources/logHelper.js
--- a/mailnews/addrbook/content/abResultsPane.js
+++ b/mailnews/addrbook/content/abResultsPane.js
@@ -81,17 +81,17 @@ function SetAbView(aURI)
 
   UpdateSortIndicators(actualSortColumn, sortDirection);
 
   // If the selected address book is LDAP and the search box is empty,
   // inform the user of the empty results pane.
   let abResultsTree = document.getElementById("abResultsTree");
   let cardViewOuterBox = document.getElementById("CardViewOuterBox");
   let blankResultsPaneMessageBox = document.getElementById("blankResultsPaneMessageBox");
-  if (aURI.startsWith("moz-abldapdirectory://") && !aURI.contains("?")) {
+  if (aURI.startsWith("moz-abldapdirectory://") && !aURI.includes("?")) {
     if (abResultsTree)
       abResultsTree.hidden = true;
     if (cardViewOuterBox)
       cardViewOuterBox.hidden = true;
     if (blankResultsPaneMessageBox)
       blankResultsPaneMessageBox.hidden = false;
   } else {
     if (abResultsTree)
--- a/mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
+++ b/mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
@@ -17,23 +17,23 @@ nsAbAutoCompleteMyDomain.prototype = {
 
   applicableHeaders: new Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
 
   startSearch: function(aString, aSearchParam, aResult, aListener) {
     let params = JSON.parse(aSearchParam);
     let applicable = this.applicableHeaders.has(params.type);
     const ACR = Components.interfaces.nsIAutoCompleteResult;
     var address = null;
-    if (applicable && aString && !aString.contains(",")) {
+    if (applicable && aString && !aString.includes(",")) {
       if (params.idKey != this.cachedIdKey) {
         this.cachedIdentity = MailServices.accounts.getIdentity(params.idKey);
         this.cachedIdKey = params.idKey;
       }
       if (this.cachedIdentity.autocompleteToMyDomain)
-        address = aString.contains("@") ? aString :
+        address = aString.includes("@") ? aString :
                   this.cachedIdentity.email.replace(/[^@]*/, aString);
     }
 
     var result = {
       searchString: aString,
       searchResult: address ? ACR.RESULT_SUCCESS : ACR.RESULT_FAILURE,
       defaultIndex: -1,
       errorDescription: null,
--- a/mailnews/addrbook/src/nsAbAutoCompleteSearch.js
+++ b/mailnews/addrbook/src/nsAbAutoCompleteSearch.js
@@ -228,17 +228,17 @@ nsAbAutoCompleteSearch.prototype = {
                               aCard.firstName + " " +
                               aCard.lastName + " " +
                               aEmailToUse + " " +
                               aCard.getProperty("NickName", "");
     if (aCard.isMailList)
       cumulativeFieldText += " " + aCard.getProperty("Notes", "");
     cumulativeFieldText = cumulativeFieldText.toLocaleLowerCase();
 
-    return aSearchWords.every(String.prototype.contains,
+    return aSearchWords.every(String.prototype.includes,
                               cumulativeFieldText);
   },
 
   /**
    * Checks to see if an emailAddress (name/address) is a duplicate of an
    * existing entry already in the results. If the emailAddress is found, it
    * will remove the existing element if the popularity of the new card is
    * higher than the previous card.
@@ -330,17 +330,17 @@ nsAbAutoCompleteSearch.prototype = {
 
     let fullString = aSearchString && aSearchString.trim().toLocaleLowerCase();
 
     // If the search string is empty, or contains a comma, or the user
     // hasn't enabled autocomplete, then just return no matches or the
     // result ignored.
     // The comma check is so that we don't autocomplete against the user
     // entering multiple addresses.
-    if (!fullString || aSearchString.contains(",")) {
+    if (!fullString || aSearchString.includes(",")) {
       result.searchResult = ACR.RESULT_IGNORED;
       aListener.onSearchResult(this, result);
       return;
     }
 
     // Array of all the terms from the fullString search query
     // (separated on the basis of spaces or exact terms on the
     // basis of quotes).
--- a/mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
+++ b/mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
@@ -173,17 +173,17 @@ nsAbLDAPAutoCompleteSearch.prototype = {
     this._result = new nsAbLDAPAutoCompleteResult(aSearchString);
     aSearchString = aSearchString.toLocaleLowerCase();
 
     // If the search string isn't value, or contains a comma, or the user
     // hasn't enabled autocomplete, then just return no matches / or the
     // result ignored.
     // The comma check is so that we don't autocomplete against the user
     // entering multiple addresses.
-    if (!applicable || !aSearchString || aSearchString.contains(",")) {
+    if (!applicable || !aSearchString || aSearchString.includes(",")) {
       this._result.searchResult = ACR.RESULT_IGNORED;
       aListener.onSearchResult(this, this._result);
       return;
     }
 
     // The rules here: If the current identity has a directoryServer set, then
     // use that, otherwise, try the global preference instead.
     var acDirURI = null;
--- a/mailnews/base/content/dateFormat.js
+++ b/mailnews/base/content/dateFormat.js
@@ -46,17 +46,17 @@ function initLocaleShortDateFormat()
     // check the format option
     if ( arrayOfStrings.length != 3 )       // no successfull split
     {
       dump("getLocaleShortDateFormat: could not analyze the date format, defaulting to mm/dd/yyyy\n");
     }
     else
     {
       // the date will contain a zero if that system settings include leading zeros
-      gSearchDateLeadingZeros = dateString.contains("0");
+      gSearchDateLeadingZeros = dateString.includes("0");
 
       // match 1 as number, since that will match both "1" and "01"
       if ( arrayOfStrings[0] == 1 )
       {
         // 01.12.1999 or 01.1999.12
         gSearchDateFormat = arrayOfStrings[1] == "12" ? 5 : 6;
       }
       else if ( arrayOfStrings[1] == 1 )
--- a/mailnews/base/prefs/content/accountcreation/createInBackend.js
+++ b/mailnews/base/prefs/content/accountcreation/createInBackend.js
@@ -230,17 +230,17 @@ function rememberPassword(server, passwo
   else
     throw new NotReached("Server type not supported");
 
   let login = Cc["@mozilla.org/login-manager/loginInfo;1"]
               .createInstance(Ci.nsILoginInfo);
   login.init(passwordURI, null, passwordURI, server.username, password, "", "");
   try {
     Services.logins.addLogin(login);
-  } catch (e if e.message.contains("This login already exists")) {
+  } catch (e if e.message.includes("This login already exists")) {
     // TODO modify
   }
 }
 
 /**
  * Check whether the user's setup already has an incoming server
  * which matches (hostname, port, username) the primary one
  * in the config.
@@ -257,17 +257,17 @@ function checkIncomingServerAlreadyExist
   let incoming = config.incoming;
   let existing = MailServices.accounts.findRealServer(incoming.username,
         incoming.hostname,
         sanitize.enum(incoming.type, ["pop3", "imap", "nntp"]),
         incoming.port);
 
   // if username does not have an '@', also check the e-mail
   // address form of the name.
-  if (!existing && !incoming.username.contains("@"))
+  if (!existing && !incoming.username.includes("@"))
     existing = MailServices.accounts.findRealServer(config.identity.emailAddress,
           incoming.hostname,
           sanitize.enum(incoming.type, ["pop3", "imap", "nntp"]),
           incoming.port);
   return existing;
 };
 
 /**
--- a/mailnews/base/prefs/content/accountcreation/fetchConfig.js
+++ b/mailnews/base/prefs/content/accountcreation/fetchConfig.js
@@ -119,17 +119,17 @@ function fetchConfigFromISP(domain, emai
  */
 
 function fetchConfigFromDB(domain, successCallback, errorCallback)
 {
   let url = Services.prefs.getCharPref("mailnews.auto_config_url");
   domain = sanitize.hostname(domain);
 
   // If we don't specify a place to put the domain, put it at the end.
-  if (!url.contains("{{domain}}"))
+  if (!url.includes("{{domain}}"))
     url = url + domain;
   else
     url = url.replace("{{domain}}", domain);
   url = url.replace("{{accounts}}", MailServices.accounts.accounts.length);
 
   if (!url.length)
     return errorCallback("no fetch url set");
   let fetch = new FetchHTTP(url, null, false,
--- a/mailnews/base/prefs/content/accountcreation/fetchhttp.js
+++ b/mailnews/base/prefs/content/accountcreation/fetchhttp.js
@@ -93,17 +93,17 @@ FetchHTTP.prototype =
   _request : null, // the XMLHttpRequest object
   result : null,
 
   start : function()
   {
     var url = this._url;
     for (var name in this._urlArgs)
     {
-      url += (!url.contains("?") ? "?" : "&") +
+      url += (!url.includes("?") ? "?" : "&") +
               name + "=" + encodeURIComponent(this._urlArgs[name]);
     }
     this._request = new XMLHttpRequest();
     let request = this._request;
     request.open(this._post ? "POST" : "GET", url);
     request.channel.loadGroup = null;
     // needs bug 407190 patch v4 (or higher) - uncomment if that lands.
     // try {
--- a/mailnews/base/prefs/content/accountcreation/guessConfig.js
+++ b/mailnews/base/prefs/content/accountcreation/guessConfig.js
@@ -627,26 +627,26 @@ HostDetector.prototype =
       throw NotReached("must pass protocol");
     // add in decreasing order of preference
     if (new RegExp(prefix + "GSSAPI").test(line))
       result.push(Ci.nsMsgAuthMethod.GSSAPI);
     if (new RegExp(prefix + "CRAM-MD5").test(line))
       result.push(Ci.nsMsgAuthMethod.passwordEncrypted);
     if (new RegExp(prefix + "(NTLM|MSN)").test(line))
       result.push(Ci.nsMsgAuthMethod.NTLM);
-    if (protocol != IMAP || !line.contains("LOGINDISABLED"))
+    if (protocol != IMAP || !line.includes("LOGINDISABLED"))
       result.push(Ci.nsMsgAuthMethod.passwordCleartext);
     return result;
   },
 
   _hasTLS : function(thisTry, wiredata)
   {
     var capa = thisTry.protocol == POP ? "STLS" : "STARTTLS";
     return thisTry.ssl == TLS &&
-        wiredata.join("").toUpperCase().contains(capa);
+        wiredata.join("").toUpperCase().includes(capa);
   },
 }
 
 /**
  * @param authMethods @see return value of _advertisesAuthMethods()
  *    Note: the returned auth method will be removed from the array.
  * @return one of them, the preferred one
  * Note: this might be Kerberos, which might not actually work,
--- a/mailnews/base/prefs/content/am-identity-edit.js
+++ b/mailnews/base/prefs/content/am-identity-edit.js
@@ -144,17 +144,17 @@ function onOk()
 // returns false and prompts the user if
 // the identity does not have an email address
 function validEmailAddress()
 {
   var emailAddress = document.getElementById('identity.email').value;
 
   // quickly test for an @ sign to test for an email address. We don't have
   // to be anymore precise than that.
-  if (!emailAddress.contains("@"))
+  if (!emailAddress.includes("@"))
   {
     // alert user about an invalid email address
 
     var prefBundle = document.getElementById("bundle_prefs");
 
     Services.prompt.alert(window, prefBundle.getString("identity-edit-req-title"),
                           prefBundle.getString("identity-edit-req"));
     return false;
--- a/mailnews/base/test/unit/test_bccInDatabase.js
+++ b/mailnews/base/test/unit/test_bccInDatabase.js
@@ -32,15 +32,15 @@ function run_test()
                                     "", copyListener, null);
 }
 
 function continueTest()
 {
   //dump("\nbccList >" + hdr.bccList);
   //dump("\nccList >" + hdr.ccList);
   //dump("\n");
-  do_check_true(hdr.bccList.contains("Another Person"));
-  do_check_true(hdr.bccList.contains("<u1@example.com>"));
-  do_check_false(hdr.bccList.contains("IDoNotExist"));
+  do_check_true(hdr.bccList.includes("Another Person"));
+  do_check_true(hdr.bccList.includes("<u1@example.com>"));
+  do_check_false(hdr.bccList.includes("IDoNotExist"));
   hdr = null;
   do_test_finished();
 }
 
--- a/mailnews/base/test/unit/test_detachToFile.js
+++ b/mailnews/base/test/unit/test_detachToFile.js
@@ -69,17 +69,17 @@ function testDetach()
 
   // The message should now have a detached attachment. Read the message,
   //  and search for "AttachmentDetached" which is added on detachment.
 
   // Get the message header
   let msgHdr = mailTestUtils.firstMsgHdr(localAccountUtils.inboxFolder);
 
   let messageContent = getContentFromMessage(msgHdr);
-  do_check_true(messageContent.contains("AttachmentDetached"));
+  do_check_true(messageContent.includes("AttachmentDetached"));
 }
 
 function SaveAttachmentCallback() {
   this.attachments = null;
 }
 
 SaveAttachmentCallback.prototype = {
   callback: function saveAttachmentCallback_callback(aMsgHdr, aMimeMessage) {
--- a/mailnews/base/test/unit/test_mimemaltdetach.js
+++ b/mailnews/base/test/unit/test_mimemaltdetach.js
@@ -71,19 +71,19 @@ function testDetach()
 
   // The message should now have a detached attachment. Read the message,
   //  and search for "AttachmentDetached" which is added on detachment.
 
   // Get the message header
   let msgHdr = mailTestUtils.firstMsgHdr(localAccountUtils.inboxFolder);
 
   let messageContent = getContentFromMessage(msgHdr);
-  do_check_true(messageContent.contains("AttachmentDetached"));
+  do_check_true(messageContent.includes("AttachmentDetached"));
   // Make sure the body survived the detach.
-  do_check_true(messageContent.contains("body hello"));
+  do_check_true(messageContent.includes("body hello"));
 }
 
 function SaveAttachmentCallback() {
   this.attachments = null;
 }
 
 SaveAttachmentCallback.prototype = {
   callback: function saveAttachmentCallback_callback(aMsgHdr, aMimeMessage) {
--- a/mailnews/base/test/unit/test_quarantineFilterMove.js
+++ b/mailnews/base/test/unit/test_quarantineFilterMove.js
@@ -47,19 +47,19 @@ const gTestArray =
     // operation was a move
     do_check_eq(folderCount(localAccountUtils.inboxFolder), 0);
 
     let enumerator = gMoveFolder.msgDatabase.EnumerateMessages();
     let firstMsgHdr = enumerator.getNext().QueryInterface(Ci.nsIMsgDBHdr);
     let secondMsgHdr = enumerator.getNext().QueryInterface(Ci.nsIMsgDBHdr);
     // Check that the messages have content
     messageContent = getContentFromMessage(firstMsgHdr);
-    do_check_true(messageContent.contains("Some User <bugmail@example.org> changed"));
+    do_check_true(messageContent.includes("Some User <bugmail@example.org> changed"));
     messageContent = getContentFromMessage(secondMsgHdr);
-    do_check_true(messageContent.contains("https://bugzilla.mozilla.org/show_bug.cgi?id=436880"));
+    do_check_true(messageContent.includes("https://bugzilla.mozilla.org/show_bug.cgi?id=436880"));
   },
   function copyMovedMessages() {
     let messages = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
     let enumerator = gMoveFolder.msgDatabase.EnumerateMessages();
     let firstMsgHdr = enumerator.getNext().QueryInterface(Ci.nsIMsgDBHdr);
     let secondMsgHdr = enumerator.getNext().QueryInterface(Ci.nsIMsgDBHdr);
     messages.appendElement(firstMsgHdr, false);
     messages.appendElement(secondMsgHdr, false);
@@ -73,19 +73,19 @@ const gTestArray =
   function verifyFolders2() {
     do_check_eq(folderCount(gMoveFolder2), 2);
 
     let enumerator = gMoveFolder2.msgDatabase.EnumerateMessages();
     let firstMsgHdr = enumerator.getNext().QueryInterface(Ci.nsIMsgDBHdr);
     let secondMsgHdr = enumerator.getNext().QueryInterface(Ci.nsIMsgDBHdr);
     // Check that the messages have content
     messageContent = getContentFromMessage(firstMsgHdr);
-    do_check_true(messageContent.contains("Some User <bugmail@example.org> changed"));
+    do_check_true(messageContent.includes("Some User <bugmail@example.org> changed"));
     messageContent = getContentFromMessage(secondMsgHdr);
-    do_check_true(messageContent.contains("https://bugzilla.mozilla.org/show_bug.cgi?id=436880"));
+    do_check_true(messageContent.includes("https://bugzilla.mozilla.org/show_bug.cgi?id=436880"));
   },
   function endTest() {
     dump("Exiting mail tests\n");
     gPOP3Pump = null;
   }
 ];
 
 function folderCount(folder)
--- a/mailnews/base/test/unit/test_testsuite_fakeserver_imapd_gmail.js
+++ b/mailnews/base/test/unit/test_testsuite_fakeserver_imapd_gmail.js
@@ -39,36 +39,36 @@ function setupMailboxes()
   IMAPPump.daemon.createMailbox("[Gmail]/Sent", {specialUseFlag : "\\Sent"});
   IMAPPump.daemon.createMailbox("[Gmail]/Spam", {specialUseFlag : "\\Spam"});
   IMAPPump.daemon.createMailbox("[Gmail]/Starred", {specialUseFlag : "\\Starred"});
   IMAPPump.daemon.createMailbox("[Gmail]/Trash", {specialUseFlag : "\\Trash"});
   IMAPPump.daemon.createMailbox("test", {});
 
   handler = IMAPPump.server._handlerCreator(IMAPPump.daemon);
   let response = handler.onError('1', 'LOGIN user password');
-  do_check_true(response.contains('OK'));
+  do_check_true(response.includes('OK'));
   // wait for imap pump to do its thing or else we get memory leaks
   IMAPPump.inbox.updateFolderWithListener(null, asyncUrlListener);
   yield false;
 }
 
 // test that 'XLIST "" "*"' returns the proper responses
 function testXlist()
 {
   let response = handler.onError('2', 'XLIST "" "*"');
 
-  do_check_true(response.contains('* LIST (\\HasNoChildren \\Inbox) "/" "INBOX"'));
-  do_check_true(response.contains('* LIST (\\Noselect \\HasChildren) "/" "[Gmail]"'));
-  do_check_true(response.contains('* LIST (\\HasNoChildren \\AllMail) "/" "[Gmail]/All Mail"'));
-  do_check_true(response.contains('* LIST (\\HasNoChildren \\Drafts) "/" "[Gmail]/Drafts"'));
-  do_check_true(response.contains('* LIST (\\HasNoChildren \\Sent) "/" "[Gmail]/Sent"'));
-  do_check_true(response.contains('* LIST (\\HasNoChildren \\Spam) "/" "[Gmail]/Spam"'));
-  do_check_true(response.contains('* LIST (\\HasNoChildren \\Starred) "/" "[Gmail]/Starred"'));
-  do_check_true(response.contains('* LIST (\\HasNoChildren \\Trash) "/" "[Gmail]/Trash"'));
-  do_check_true(response.contains('* LIST (\\HasNoChildren) "/" "test"'));
+  do_check_true(response.includes('* LIST (\\HasNoChildren \\Inbox) "/" "INBOX"'));
+  do_check_true(response.includes('* LIST (\\Noselect \\HasChildren) "/" "[Gmail]"'));
+  do_check_true(response.includes('* LIST (\\HasNoChildren \\AllMail) "/" "[Gmail]/All Mail"'));
+  do_check_true(response.includes('* LIST (\\HasNoChildren \\Drafts) "/" "[Gmail]/Drafts"'));
+  do_check_true(response.includes('* LIST (\\HasNoChildren \\Sent) "/" "[Gmail]/Sent"'));
+  do_check_true(response.includes('* LIST (\\HasNoChildren \\Spam) "/" "[Gmail]/Spam"'));
+  do_check_true(response.includes('* LIST (\\HasNoChildren \\Starred) "/" "[Gmail]/Starred"'));
+  do_check_true(response.includes('* LIST (\\HasNoChildren \\Trash) "/" "[Gmail]/Trash"'));
+  do_check_true(response.includes('* LIST (\\HasNoChildren) "/" "test"'));
 
   yield true;
 }
 
 // Cleanup at end
 function endTest()
 {
   teardownIMAPPump();
--- a/mailnews/base/test/unit/test_testsuite_fakeserver_imapd_list-extended.js
+++ b/mailnews/base/test/unit/test_testsuite_fakeserver_imapd_list-extended.js
@@ -47,106 +47,106 @@ function setupMailboxes()
                                             subscribed : true});
   IMAPPump.daemon.createMailbox("Tofu", {});
   IMAPPump.daemon.createMailbox("Vegetable", {subscribed : true});
   IMAPPump.daemon.createMailbox("Vegetable/Broccoli", {subscribed : true});
   IMAPPump.daemon.createMailbox("Vegetable/Corn", {});
 
   handler = IMAPPump.server._handlerCreator(IMAPPump.daemon);
   let response = handler.onError('1', 'LOGIN user password');
-  do_check_true(response.contains('OK'));
+  do_check_true(response.includes('OK'));
   // wait for imap pump to do it's thing or else we get memory leaks
   IMAPPump.inbox.updateFolderWithListener(null, asyncUrlListener);
   yield false;
 }
 
 // test that 'LIST "" "*"' returns the proper responses (standard LIST usage)
 function testList()
 {
   let response = handler.onError('2', 'LIST "" "*"');
 
-  do_check_true(response.contains('* LIST (\\Marked \\NoInferiors) "/" "INBOX"'));
-  do_check_true(response.contains('* LIST () "/" "Fruit"'));
-  do_check_true(response.contains('* LIST () "/" "Fruit/Apple"'));
-  do_check_true(response.contains('* LIST () "/" "Fruit/Banana"'));
-  do_check_true(response.contains('* LIST () "/" "Tofu"'));
-  do_check_true(response.contains('* LIST () "/" "Vegetable"'));
-  do_check_true(response.contains('* LIST () "/" "Vegetable/Broccoli"'));
-  do_check_true(response.contains('* LIST () "/" "Vegetable/Corn"'));
-  do_check_false(response.contains('Peach'));
+  do_check_true(response.includes('* LIST (\\Marked \\NoInferiors) "/" "INBOX"'));
+  do_check_true(response.includes('* LIST () "/" "Fruit"'));
+  do_check_true(response.includes('* LIST () "/" "Fruit/Apple"'));
+  do_check_true(response.includes('* LIST () "/" "Fruit/Banana"'));
+  do_check_true(response.includes('* LIST () "/" "Tofu"'));
+  do_check_true(response.includes('* LIST () "/" "Vegetable"'));
+  do_check_true(response.includes('* LIST () "/" "Vegetable/Broccoli"'));
+  do_check_true(response.includes('* LIST () "/" "Vegetable/Corn"'));
+  do_check_false(response.includes('Peach'));
 
   yield true;
 }
 
 // test that 'LIST (SUBSCRIBED) "" "*"' returns the proper responses
 function testListSelectSubscribed()
 {
   let response = handler.onError('3', 'LIST (SUBSCRIBED) "" "*"');
 
-  do_check_true(response.contains('* LIST (\\Marked \\NoInferiors \\Subscribed) "/" "INBOX"'));
-  do_check_true(response.contains('* LIST (\\Subscribed) "/" "Fruit/Banana"'));
-  do_check_true(response.contains('* LIST (\\Subscribed \\NonExistent) "/" "Fruit/Peach"'));
-  do_check_true(response.contains('* LIST (\\Subscribed) "/" "Vegetable"'));
-  do_check_true(response.contains('* LIST (\\Subscribed) "/" "Vegetable/Broccoli"'));
-  do_check_false(response.contains('"Fruit"'));
-  do_check_false(response.contains('Apple'));
-  do_check_false(response.contains('Tofu'));
-  do_check_false(response.contains('Corn'));
+  do_check_true(response.includes('* LIST (\\Marked \\NoInferiors \\Subscribed) "/" "INBOX"'));
+  do_check_true(response.includes('* LIST (\\Subscribed) "/" "Fruit/Banana"'));
+  do_check_true(response.includes('* LIST (\\Subscribed \\NonExistent) "/" "Fruit/Peach"'));
+  do_check_true(response.includes('* LIST (\\Subscribed) "/" "Vegetable"'));
+  do_check_true(response.includes('* LIST (\\Subscribed) "/" "Vegetable/Broccoli"'));
+  do_check_false(response.includes('"Fruit"'));
+  do_check_false(response.includes('Apple'));
+  do_check_false(response.includes('Tofu'));
+  do_check_false(response.includes('Corn'));
 
   yield true;
 }
 
 // test that 'LIST "" "%" RETURN (CHILDEREN)' returns the proper responses
 function testListReturnChilderen()
 {
   let response = handler.onError('4', 'LIST "" "%" RETURN (CHILDREN)');
 
-  do_check_true(response.contains('* LIST (\\Marked \\NoInferiors) "/" "INBOX"'));
-  do_check_true(response.contains('* LIST (\\HasChildren) "/" "Fruit"'));
-  do_check_true(response.contains('* LIST (\\HasNoChildren) "/" "Tofu"'));
-  do_check_true(response.contains('* LIST (\\HasChildren) "/" "Vegetable"'));
-  do_check_false(response.contains('Apple'));
-  do_check_false(response.contains('Banana'));
-  do_check_false(response.contains('Peach'));
-  do_check_false(response.contains('Broccoli'));
-  do_check_false(response.contains('Corn'));
+  do_check_true(response.includes('* LIST (\\Marked \\NoInferiors) "/" "INBOX"'));
+  do_check_true(response.includes('* LIST (\\HasChildren) "/" "Fruit"'));
+  do_check_true(response.includes('* LIST (\\HasNoChildren) "/" "Tofu"'));
+  do_check_true(response.includes('* LIST (\\HasChildren) "/" "Vegetable"'));
+  do_check_false(response.includes('Apple'));
+  do_check_false(response.includes('Banana'));
+  do_check_false(response.includes('Peach'));
+  do_check_false(response.includes('Broccoli'));
+  do_check_false(response.includes('Corn'));
 
   yield true;
 }
 
 // test that 'LIST "" "*" RETURN (SUBSCRIBED)' returns the proper responses
 function testListReturnSubscribed()
 {
   let response = handler.onError('5', 'LIST "" "*" RETURN (SUBSCRIBED)');
 
-  do_check_true(response.contains('* LIST (\\Marked \\NoInferiors \\Subscribed) "/" "INBOX"'));
-  do_check_true(response.contains('* LIST () "/" "Fruit"'));
-  do_check_true(response.contains('* LIST () "/" "Fruit/Apple"'));
-  do_check_true(response.contains('* LIST (\\Subscribed) "/" "Fruit/Banana"'));
-  do_check_true(response.contains('* LIST () "/" "Tofu"'));
-  do_check_true(response.contains('* LIST (\\Subscribed) "/" "Vegetable"'));
-  do_check_true(response.contains('* LIST (\\Subscribed) "/" "Vegetable/Broccoli"'));
-  do_check_true(response.contains('* LIST () "/" "Vegetable/Corn"'));
-  do_check_false(response.contains('Peach'));
+  do_check_true(response.includes('* LIST (\\Marked \\NoInferiors \\Subscribed) "/" "INBOX"'));
+  do_check_true(response.includes('* LIST () "/" "Fruit"'));
+  do_check_true(response.includes('* LIST () "/" "Fruit/Apple"'));
+  do_check_true(response.includes('* LIST (\\Subscribed) "/" "Fruit/Banana"'));
+  do_check_true(response.includes('* LIST () "/" "Tofu"'));
+  do_check_true(response.includes('* LIST (\\Subscribed) "/" "Vegetable"'));
+  do_check_true(response.includes('* LIST (\\Subscribed) "/" "Vegetable/Broccoli"'));
+  do_check_true(response.includes('* LIST () "/" "Vegetable/Corn"'));
+  do_check_false(response.includes('Peach'));
 
   yield true;
 }
 
 // test that 'LIST "" ("INBOX" "Tofu" "Vegetable/%")' returns the proper responses
 function testListSelectMultiple()
 {
   let response = handler._dispatchCommand('LIST', ['', '("INBOX" "Tofu" "Vegetable/%")']);
 
-  do_check_true(response.contains('* LIST (\\Marked \\NoInferiors) "/" "INBOX"'));
-  do_check_true(response.contains('* LIST () "/" "Tofu"'));
-  do_check_true(response.contains('* LIST () "/" "Vegetable/Broccoli"'));
-  do_check_true(response.contains('* LIST () "/" "Vegetable/Corn"'));
-  do_check_false(response.contains('"Vegetable"'));
-  do_check_false(response.contains('Fruit'));
-  do_check_false(response.contains('Peach'));
+  do_check_true(response.includes('* LIST (\\Marked \\NoInferiors) "/" "INBOX"'));
+  do_check_true(response.includes('* LIST () "/" "Tofu"'));
+  do_check_true(response.includes('* LIST () "/" "Vegetable/Broccoli"'));
+  do_check_true(response.includes('* LIST () "/" "Vegetable/Corn"'));
+  do_check_false(response.includes('"Vegetable"'));
+  do_check_false(response.includes('Fruit'));
+  do_check_false(response.includes('Peach'));
 
   yield true;
 }
 
 // Cleanup at end
 function endTest()
 {
   handler = null;
--- a/mailnews/db/gloda/modules/fundattr.js
+++ b/mailnews/db/gloda/modules/fundattr.js
@@ -540,17 +540,17 @@ var GlodaFundAttr = {
       let foundRealAttachment = false;
       let attachmentTypes = [];
       for each (let [, attachment] in Iterator(aMimeMsg.allAttachments)) {
         // We don't care about would-be attachments that are not user-intended
         //  attachments but rather artifacts of the message content.
         // We also want to avoid dealing with obviously bogus mime types.
         //  (If you don't have a "/", you are probably bogus.)
         if (attachment.isRealAttachment &&
-            attachment.contentType.contains("/")) {
+            attachment.contentType.includes("/")) {
           attachmentTypes.push(MimeTypeNoun.getMimeType(attachment.contentType));
         }
         if (attachment.isRealAttachment)
           foundRealAttachment = true;
       }
       if (attachmentTypes.length) {
         aGlodaMessage.attachmentTypes = attachmentTypes;
       }
@@ -846,17 +846,17 @@ var GlodaFundAttr = {
 
       if (line.startsWith(">")) {
         if (!inQuoteDepth) {
           let rangeEnd = iLine - 1;
           let quoteRangeStart = iLine;
           // see if the last non-blank-line was a lead-in...
           if (lastNonBlankLine != null) {
             // TODO: localize quote range start detection
-            if (aBodyLines[lastNonBlankLine].contains("wrote")) {
+            if (aBodyLines[lastNonBlankLine].includes("wrote")) {
               quoteRangeStart = lastNonBlankLine;
               rangeEnd = lastNonBlankLine - 1;
               // we 'used up' lastNonBlankLine, let's promote the prev guy to
               //  be the new lastNonBlankLine for the next logic block
               lastNonBlankLine = prevLastNonBlankLine;
             }
             // eat the trailing whitespace...
             if (lastNonBlankLine != null)
--- a/mailnews/db/gloda/test/unit/base_index_messages.js
+++ b/mailnews/db/gloda/test/unit/base_index_messages.js
@@ -718,17 +718,17 @@ function test_streamed_bodies_are_size_c
   if (goOffline) {
     yield wait_for_gloda_indexer(msgSet);
     yield make_folder_and_contents_offline(folder);
   }
 
   yield wait_for_gloda_indexer(msgSet, {augment: true});
   let gmsg = msgSet.glodaMessages[0];
   do_check_true(gmsg.indexedBodyText.startsWith("aabb"));
-  do_check_false(gmsg.indexedBodyText.contains("xxyy"));
+  do_check_false(gmsg.indexedBodyText.includes("xxyy"));
 
   if (gmsg.indexedBodyText.length > (20 * 1024 + 58 + 10))
     do_throw("indexed body text is too big! (" + gmsg.indexedBodyText.length +
              ")");
 }
 
 
 /* ===== Message Deletion ===== */
--- a/mailnews/imap/test/unit/test_bccProperty.js
+++ b/mailnews/imap/test/unit/test_bccProperty.js
@@ -43,19 +43,19 @@ function downloadAllForOffline() {
   yield false;
 }
 
 function checkBccs() {
   // locate the new message by enumerating through the database
   let enumerator = IMAPPump.inbox.msgDatabase.EnumerateMessages();
   while(enumerator.hasMoreElements()) {
     let hdr = enumerator.getNext().QueryInterface(Ci.nsIMsgDBHdr);
-    do_check_true(hdr.bccList.contains("Another Person"));
-    do_check_true(hdr.bccList.contains("<u1@example.com>"));
-    do_check_false(hdr.bccList.contains("IDoNotExist"));
+    do_check_true(hdr.bccList.includes("Another Person"));
+    do_check_true(hdr.bccList.includes("<u1@example.com>"));
+    do_check_false(hdr.bccList.includes("IDoNotExist"));
   }
 }
 
 function teardown() {
   teardownIMAPPump();
 }
 
 function run_test() {
--- a/mailnews/imap/test/unit/test_dod.js
+++ b/mailnews/imap/test/unit/test_dod.js
@@ -86,17 +86,17 @@ function streamMessages() {
       yield false;
       let buf = gStreamListener._data;
       dump("##########\nTesting--->" + fileNames[i-1] +
            "; 'prefer plain text': " + isPlain + "\n" +
            buf + "\n" +
            "##########\nTesting--->" + fileNames[i-1] +
            "; 'prefer plain text': " + isPlain + "\n");
       try {
-        do_check_true(buf.contains(marker));
+        do_check_true(buf.includes(marker));
       }
       catch(e){}
     }
   }
   yield true;
 }
 
 let gStreamListener = {
--- a/mailnews/imap/test/unit/test_imapAttachmentSaves.js
+++ b/mailnews/imap/test/unit/test_imapAttachmentSaves.js
@@ -105,17 +105,17 @@ function testDetach()
 
   // The message should now have a detached attachment. Read the message,
   //  and search for "AttachmentDetached" which is added on detachment.
 
   // Get the message header - detached copy has UID 2.
   let msgHdr = IMAPPump.inbox.GetMessageHeader(2);
   do_check_neq(msgHdr, null);
   let messageContent = getContentFromMessage(msgHdr);
-  do_check_true(messageContent.contains("AttachmentDetached"));
+  do_check_true(messageContent.includes("AttachmentDetached"));
 }
 
 // Cleanup
 function endTest()
 {
   teardownIMAPPump();
 }
 
--- a/mailnews/imap/test/unit/test_imapFlagChange.js
+++ b/mailnews/imap/test/unit/test_imapFlagChange.js
@@ -78,29 +78,29 @@ var tests = [
   function simulateTagAdded() {
     gMessage.setFlag("randomtag");
     IMAPPump.inbox.updateFolderWithListener(null, asyncUrlListener);
     yield false;
   },
   function checkTagSet() {
     let msgHdr = IMAPPump.inbox.msgDatabase.getMsgHdrForMessageID(gSynthMessage.messageId);
     let keywords = msgHdr.getStringProperty("keywords");
-    do_check_true(keywords.contains("randomtag"));
+    do_check_true(keywords.includes("randomtag"));
     gSecondFolder.updateFolderWithListener(null, asyncUrlListener);
     yield false;
   },
   function clearTag() {
     gMessage.clearFlag("randomtag");
     IMAPPump.inbox.updateFolderWithListener(null, asyncUrlListener);
     yield false;
   },
   function checkTagCleared() {
     let msgHdr = IMAPPump.inbox.msgDatabase.getMsgHdrForMessageID(gSynthMessage.messageId);
     let keywords = msgHdr.getStringProperty("keywords");
-    do_check_false(keywords.contains("randomtag"));
+    do_check_false(keywords.includes("randomtag"));
   },
   teardown
 ];
 
 function setup() {
   Services.prefs.setBoolPref("mail.server.default.autosync_offline_stores", false);
 
   setupIMAPPump();
--- a/mailnews/imap/test/unit/test_imapHdrStreaming.js
+++ b/mailnews/imap/test/unit/test_imapHdrStreaming.js
@@ -33,17 +33,17 @@ var streamListener =
   QueryInterface:
     XPCOMUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
   // nsIRequestObserver
   onStartRequest: function(aRequest, aContext) {
   },
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     do_check_eq(aStatusCode, 0);
-    do_check_true(this._data.contains("Content-Type"));
+    do_check_true(this._data.includes("Content-Type"));
     async_driver();
   },
 
   // nsIStreamListener
   onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, aCount) {
     if (this._stream == null) {
       this._stream = Cc["@mozilla.org/scriptableinputstream;1"].createInstance(Ci.nsIScriptableInputStream);
       this._stream.init(aInputStream);
--- a/mailnews/imap/test/unit/test_offlineCopy.js
+++ b/mailnews/imap/test/unit/test_offlineCopy.js
@@ -180,17 +180,17 @@ var tests = [
       Assert.ok(newMsgHdr.flags & Ci.nsMsgMessageFlags.Offline);
       let msgURI = newMsgHdr.folder.getUriForMsg(newMsgHdr);
       let messenger = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger);
       let msgServ = messenger.messageServiceFromURI(msgURI);
       let promiseStreamListener = new PromiseTestUtils.PromiseStreamListener();
       msgServ.streamHeaders(msgURI, promiseStreamListener, null, true);
       let data = yield promiseStreamListener.promise;
       dump('\nheaders for messageId ' + msgId + '\n' + data + '\n\n');
-      Assert.ok(data.contains(msgId));
+      Assert.ok(data.includes(msgId));
     }
   },
   function moveMessagesToSubfolder() {
     let db = IMAPPump.inbox.msgDatabase;
     let enumerator = db.EnumerateMessages();
     Assert.ok(enumerator.hasMoreElements());
     let messages = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
     while (enumerator.hasMoreElements())
--- a/mailnews/imap/test/unit/test_partsOnDemand.js
+++ b/mailnews/imap/test/unit/test_partsOnDemand.js
@@ -79,17 +79,17 @@ function loadImapMessage()
 function startMime()
 {
   let msgHdr = mailTestUtils.firstMsgHdr(IMAPPump.inbox);
 
   mimeMsg.MsgHdrToMimeMessage(msgHdr, this, function (aMsgHdr, aMimeMessage) {
     let url = aMimeMessage.allUserAttachments[0].url;
     // A URL containing this string indicates that the attachment will be
     // downloaded on demand.
-    do_check_true(url.contains("/;section="));
+    do_check_true(url.includes("/;section="));
     async_driver();
   }, true /* allowDownload */, { partsOnDemand: true, examineEncryptedParts: true });
   yield false;
 }
 
 // test that we don't mark all inline messages as read.
 function testAllInlineMessage()
 {
--- a/mailnews/local/test/unit/test_streamHeaders.js
+++ b/mailnews/local/test/unit/test_streamHeaders.js
@@ -53,17 +53,17 @@ function goodStreaming()
   // try to stream the headers of the last message
   let uri = gHdr.folder.getUriForMsg(gHdr);
   let messageService = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger)
                                                      .messageServiceFromURI(uri);
   messageService.streamHeaders(uri, createStreamListener(
     function theString(k) {
       dump('the string:\n' + k + '\n');
       // The message contains this header
-      do_check_true(k.contains("X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0"));
+      do_check_true(k.includes("X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0"));
       async_driver();
     }), null, true);
   yield false;
 }
 
 // crash from bug 752768
 function badStreaming()
 {
--- a/mailnews/mime/jsmime/jsmime.js
+++ b/mailnews/mime/jsmime/jsmime.js
@@ -462,20 +462,20 @@ function getHeaderTokens(value, delimite
     // to do at this point:
     // tokenIsEnding: The current character is not able to be accumulated to an
     // atom, so we need to flush the atom if there is one.
     // tokenIsStarting: The current character could begin an atom (or
     // anything that requires us to mark the starting point), so we need to save
     // the location.
     // isSpecial: The current character is a delimiter that needs to be output.
     let tokenIsEnding = false, tokenIsStarting = false, isSpecial = false;
-    if (wsp.contains(ch)) {
+    if (wsp.includes(ch)) {
       // Whitespace ends current tokens, doesn't emit anything.
       tokenIsEnding = true;
-    } else if (commentDepth == 0 && delimiters.contains(ch)) {
+    } else if (commentDepth == 0 && delimiters.includes(ch)) {
       // Delimiters end the current token, and need to be output. They do not
       // apply within comments.
       tokenIsEnding = true;
       isSpecial = true;
     } else if (opts.qstring && ch == '"') {
       // Quoted strings end the last token and start a new one.
       tokenIsEnding = true;
       tokenIsStarting = true;
@@ -2754,17 +2754,17 @@ HeaderEmitter.prototype.addQuotable = fu
     return;
 
   // Figure out if we need to quote the string. Don't quote a string which
   // already appears to be quoted.
   let needsQuote = false;
 
   if (!(text[0] == '"' && text[text.length - 1] == '"') && qchars != '') {
     for (let i = 0; i < text.length; i++) {
-      if (qchars.contains(text[i])) {
+      if (qchars.includes(text[i])) {
         needsQuote = true;
         break;
       }
     }
   }
 
   if (needsQuote)
     text = '"' + text.replace(/["\\]/g, "\\$&") + '"';
@@ -2799,17 +2799,17 @@ HeaderEmitter.prototype.addPhrase = func
   // so. The check here is very loose, but this will inform is if we are going
   // to definitely overrun the soft margin.
   if ((this._currentLine.length + text.length) < this._softMargin) {
     try {
       this.addQuotable(text, qchars, mayBreakAfter);
       // If we don't have a breakpoint, and the text is encoded as a sequence of
       // atoms (and not a quoted-string), then make the last space we added a
       // breakpoint, regardless of the mayBreakAfter setting.
-      if (this._preferredBreakpoint == 0 && text.contains(" ")) {
+      if (this._preferredBreakpoint == 0 && text.includes(" ")) {
         if (this._currentLine[this._currentLine.length - 1] != '"')
           this._preferredBreakpoint = this._currentLine.lastIndexOf(" ");
       }
       return;
     } catch (e) {
       // If we get an error at this point, we failed to add the quoted string
       // because the string was too long. Fall through to the case where we know
       // that the input was too long to begin with.
@@ -2850,17 +2850,17 @@ const hexString = "0123456789abcdef";
  */
 HeaderEmitter.prototype._addRFC2047Word = function (encodedText, useQP,
     mayBreakAfter) {
   let binaryString = mimeutils.typedArrayToString(encodedText);
   if (useQP) {
     var token = qpPrelude;
     for (let i = 0; i < encodedText.length; i++) {
       if (encodedText[i] < 0x20 || encodedText[i] >= 0x7F ||
-          qpForbidden.contains(binaryString[i])) {
+          qpForbidden.includes(binaryString[i])) {
         let ch = encodedText[i];
         token += "=" + hexString[(ch & 0xf0) >> 4] + hexString[ch & 0x0f];
       } else if (binaryString[i] == " ") {
         token += "_";
       } else {
         token += binaryString[i];
       }
     }
@@ -2896,17 +2896,17 @@ HeaderEmitter.prototype.encodeRFC2047Phr
   for (let i = 0; i < encodedText.length; i++) {
     let b64Inc = 0, qpInc = 0;
     // The length we need for base64 is ceil(length / 3) * 4...
     if ((i - start) % 3 == 0)
       b64Inc += 4;
 
     // The length for quoted-printable is 3 chars only if encoded
     if (encodedText[i] < 0x20 || encodedText[i] >= 0x7f ||
-        qpForbidden.contains(String.fromCharCode(encodedText[i]))) {
+        qpForbidden.includes(String.fromCharCode(encodedText[i]))) {
       qpInc = 3;
     } else {
       qpInc = 1;
     }
 
     if (b64Len + b64Inc > maxChars && qpLen + qpInc > maxChars) {
       // Oops, we have too many characters! We need to encode everything through
       // the current character. However, we can't split in the middle of a
--- a/mailnews/mime/jsmime/test/mock_date.js
+++ b/mailnews/mime/jsmime/test/mock_date.js
@@ -47,17 +47,17 @@ MockDate.prototype = {
 for (let name of Object.getOwnPropertyNames(Date.prototype)) {
   // Only copy getters, not setters or x.toString.
   if (!name.startsWith('get'))
     continue;
   // No redefining any other names on MockDate.
   if (MockDate.prototype.hasOwnProperty(name))
     continue;
 
-  if (name.contains('UTC')) {
+  if (name.includes('UTC')) {
     // 'name' is already supposed to be freshly bound per newest ES6 drafts, but
     // current ES6 implementations reuse the bindings. Until implementations
     // catch up, use a new let to bind it freshly.
     let boundName = name;
     Object.defineProperty(MockDate.prototype, name, { value: function () {
       return Date.prototype[boundName].call(this._realDate, arguments);
     }});
   } else {
--- a/mailnews/mime/src/mimeJSComponents.js
+++ b/mailnews/mime/src/mimeJSComponents.js
@@ -365,17 +365,17 @@ MimeAddressParser.prototype = {
     }
     if (count)
       count.value = output.length;
     return output;
   },
 
   /// Construct a single email address from a name <local@domain> token.
   _makeSingleAddress: function (aDisplayName) {
-    if (aDisplayName.contains('<')) {
+    if (aDisplayName.includes('<')) {
       let lbracket = aDisplayName.lastIndexOf('<');
       let rbracket = aDisplayName.lastIndexOf('>');
       // If there are multiple spaces between the display name and the bracket,
       // strip off only a single space.
       return this.makeMailboxObject(
         lbracket == 0 ? '' : aDisplayName.slice(0, lbracket - 1),
         aDisplayName.slice(lbracket + 1, rbracket));
     } else {
--- a/mailnews/mime/test/unit/test_text_attachment.js
+++ b/mailnews/mime/test/unit/test_text_attachment.js
@@ -35,17 +35,17 @@ let gStreamListener = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
 
   _str:"",
   // nsIRequestObserver part
   onStartRequest: function (aRequest, aContext) {
   },
   onStopRequest: function (aRequest, aContext, aStatusCode) {
     // check that text attachment contents didn't end up inline.
-    do_check_true(!this._str.contains(textAttachment));
+    do_check_true(!this._str.includes(textAttachment));
     async_driver();
   },
 
   /* okay, our onDataAvailable should actually never be called.  the stream
      converter is actually eating everything except the start and stop
      notification. */
   // nsIStreamListener part
   _stream : null,
--- a/mailnews/news/src/nsNewsAutoCompleteSearch.js
+++ b/mailnews/news/src/nsNewsAutoCompleteSearch.js
@@ -107,17 +107,17 @@ nsNewsAutoCompleteSearch.prototype = {
       this.cachedAccountKey  = params.accountKey;
       this.cachedServer = this._findServer(params.accountKey);
     }
 
     if (this.cachedServer) {
       let groups = this.cachedServer.rootFolder.subFolders;
       while (groups.hasMoreElements()) {
         let curr = groups.getNext().QueryInterface(Ci.nsIMsgFolder);
-        if (curr.prettiestName.contains(aSearchString)) {
+        if (curr.prettiestName.includes(aSearchString)) {
           result._searchResults.push({
             value: curr.prettiestName,
             comment: this.cachedServer.prettyName
           });
         }
       }
     }
 
--- a/mailnews/test/fakeserver/imapd.js
+++ b/mailnews/test/fakeserver/imapd.js
@@ -1286,17 +1286,17 @@ IMAP_RFC3501_handler.prototype = {
     }
     return response + "OK FETCH completed";
   },
   STORE : function (args, uid) {
     var ids = [];
     var messages = this._parseSequenceSet(args[0], uid, ids);
 
     args[1] = args[1].toUpperCase();
-    var silent = args[1].contains('.SILENT', 1);
+    var silent = args[1].includes('.SILENT', 1);
     if (silent)
       args[1] = args[1].substring(0, args[1].indexOf('.'));
 
     if (typeof args[2] != "object")
       args[2] = [args[2]];
 
     var response = "";
     for (var i = 0; i < messages.length; i++) {
@@ -1419,17 +1419,17 @@ IMAP_RFC3501_handler.prototype = {
       if(!num || (num.length != part.length))
         throw "BAD invalid UID " + part;
       return parseInt(part);
     }
 
     var elements = set.split(/,/);
     set = [];
     for each (var part in elements) {
-      if (!part.contains(':')) {
+      if (!part.includes(':')) {
         set.push(part2num(part));
       } else {
         var range = part.split(/:/);
         range[0] = part2num(range[0]);
         range[1] = part2num(range[1]);
         if (range[0] > range[1]) {
           let temp = range[1];
           range[1] = range[0];
@@ -1493,22 +1493,22 @@ IMAP_RFC3501_handler.prototype = {
 
     // What's inside the command?
     var data = /((?:\d+\.)*\d+)(?:\.([^ ]+))?/.exec(parts[1]);
     if (data) {
       var partNum = data[1];
       query = data[2];
     } else {
       var partNum = "";
-      if (parts[1].contains(" ", 1))
+      if (parts[1].includes(" ", 1))
         query = parts[1].substring(0, parts[1].indexOf(" "));
       else
         query = parts[1];
     }
-    if (parts[1].contains(" ", 1))
+    if (parts[1].includes(" ", 1))
       var queryArgs = parseCommand(parts[1].substr(parts[1].indexOf(" ")))[0];
     else
       var queryArgs = [];
 
     // Now we have three parameters representing the part number (empty for top-
     // level), the subportion representing what we want to find (empty for the
     // body), and an array of arguments if we have a subquery. If we made an
     // error here, it will pop until it gets to FETCH, which will just pop at a
--- a/mailnews/test/fakeserver/pop3d.js
+++ b/mailnews/test/fakeserver/pop3d.js
@@ -35,17 +35,17 @@ function readFile(fileName) {
   let cwd = Services.dirsvc.get("CurWorkD", Ci.nsIFile);
 
   // Try to find the file relative to either the data directory or to the
   // current working directory.
   let file = cwd.clone();
   if ("@mozilla.org/windows-registry-key;1" in Components.classes) {
     // Windows doesn't allow '..' in appendRelativePath,
     // so we'll have to do this the long way.
-    if (fileName.contains('/')) {
+    if (fileName.includes('/')) {
       let parts = fileName.split('/');
       for (let part of parts) {
         if (part == "..")
           file = file.parent;
         else
           file.append(part);
       }
     }
--- a/mailnews/test/resources/logHelper.js
+++ b/mailnews/test/resources/logHelper.js
@@ -59,17 +59,17 @@ let _errorConsoleTunnel = {
       this.shutdown();
       return;
     }
 
     try {
       // meh, let's just use mark_failure for now.
       // and let's avoid feedback loops (happens in mozmill)
       if ((aMessage instanceof Components.interfaces.nsIScriptError) &&
-        (!aMessage.errorMessage.contains("Error console says")))
+        (!aMessage.errorMessage.includes("Error console says")))
         {
           // Unfortunately changes to mozilla-central are throwing lots
           // of console errors during testing, so disable (we hope temporarily)
           // failing on XPCOM console errors (see bug 1014350).
           // An XPCOM error aMessage looks like this:
           //   [JavaScript Error: "uncaught exception: 2147500037"]
           // Capture the number, and allow known XPCOM results.
           let matches = /exception: (\d+)/.exec(aMessage);