Bug 1102219 - Part 4: Replace `String.prototype.contains` with `String.prototype.includes` in chrome code. r=till
authorziyunfei <446240525@qq.com>
Thu, 30 Apr 2015 00:32:05 +0900
changeset 241601 61e6cb9215a43c081fbc00376b7d6ffe9ffb6315
parent 241600 39659c916ff905975797e17b4bfa501fe6ea1973
child 241602 e81e122159516710c783a7058129a1fb16f5bffe
push id28665
push userkwierso@gmail.com
push dateWed, 29 Apr 2015 23:43:43 +0000
treeherdermozilla-central@a86ed85747d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1102219
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1102219 - Part 4: Replace `String.prototype.contains` with `String.prototype.includes` in chrome code. r=till
addon-sdk/source/lib/sdk/self.js
addon-sdk/source/test/fixtures.js
addon-sdk/source/test/test-content-events.js
addon-sdk/source/test/test-page-worker.js
addon-sdk/source/test/test-system-input-output.js
browser/base/content/aboutaccounts/aboutaccounts.js
browser/base/content/browser-social.js
browser/base/content/browser.js
browser/base/content/sync/aboutSyncTabs.js
browser/base/content/tabbrowser.xml
browser/base/content/test/general/browser_bug839103.js
browser/base/content/test/general/browser_bug970746.js
browser/base/content/test/general/browser_devices_get_user_media.js
browser/base/content/test/general/browser_homeDrop.js
browser/base/content/test/general/browser_parsable_css.js
browser/base/content/test/general/browser_parsable_script.js
browser/base/content/test/general/browser_save_private_link_perwindowpb.js
browser/base/content/test/general/test_offline_gzip.html
browser/base/content/test/newtab/browser_newtab_search.js
browser/base/content/test/plugins/browser_CTP_remove_navigate.js
browser/base/content/test/plugins/browser_bug797677.js
browser/base/content/test/popupNotifications/head.js
browser/base/content/urlbarBindings.xml
browser/components/customizableui/content/panelUI.js
browser/components/downloads/content/allDownloadsViewOverlay.js
browser/components/loop/LoopCalls.jsm
browser/components/loop/content/js/contacts.js
browser/components/loop/content/js/contacts.jsx
browser/components/loop/test/xpcshell/test_loopservice_token_send.js
browser/components/nsBrowserGlue.js
browser/components/places/content/menu.xml
browser/components/sessionstore/test/browser_454908.js
browser/components/tabview/test/browser_tabview_bug626455.js
browser/components/test/browser_polaris_prefs.js
browser/components/translation/BingTranslator.jsm
browser/components/translation/test/bing.sjs
browser/components/translation/test/browser_translation_exceptions.js
browser/devtools/canvasdebugger/test/browser_canvas-actor-test-03.js
browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-stack-01.js
browser/devtools/canvasdebugger/test/browser_canvas-frontend-img-screenshots.js
browser/devtools/commandline/test/browser_cmd_appcache_valid.js
browser/devtools/commandline/test/browser_cmd_cookie.js
browser/devtools/debugger/test/browser_dbg_addonactor.js
browser/devtools/debugger/test/browser_dbg_auto-pretty-print-01.js
browser/devtools/debugger/test/browser_dbg_auto-pretty-print-02.js
browser/devtools/debugger/test/browser_dbg_break-on-dom-03.js
browser/devtools/debugger/test/browser_dbg_file-reload.js
browser/devtools/debugger/test/browser_dbg_globalactor.js
browser/devtools/debugger/test/browser_dbg_pretty-print-01.js
browser/devtools/debugger/test/browser_dbg_pretty-print-02.js
browser/devtools/debugger/test/browser_dbg_pretty-print-05.js
browser/devtools/debugger/test/browser_dbg_pretty-print-06.js
browser/devtools/debugger/test/browser_dbg_pretty-print-07.js
browser/devtools/debugger/test/browser_dbg_pretty-print-08.js
browser/devtools/debugger/test/browser_dbg_pretty-print-09.js
browser/devtools/debugger/test/browser_dbg_pretty-print-10.js
browser/devtools/debugger/test/browser_dbg_pretty-print-11.js
browser/devtools/debugger/test/browser_dbg_pretty-print-13.js
browser/devtools/debugger/test/browser_dbg_scripts-switching-03.js
browser/devtools/debugger/test/browser_dbg_search-basic-02.js
browser/devtools/debugger/test/browser_dbg_search-basic-03.js
browser/devtools/debugger/test/browser_dbg_search-global-01.js
browser/devtools/debugger/test/browser_dbg_search-global-02.js
browser/devtools/debugger/test/browser_dbg_search-global-03.js
browser/devtools/debugger/test/browser_dbg_search-global-04.js
browser/devtools/debugger/test/browser_dbg_search-global-05.js
browser/devtools/debugger/test/browser_dbg_search-global-06.js
browser/devtools/debugger/test/browser_dbg_search-symbols.js
browser/devtools/debugger/test/browser_dbg_sources-cache.js
browser/devtools/debugger/test/browser_dbg_tabactor-01.js
browser/devtools/debugger/test/browser_dbg_tabactor-02.js
browser/devtools/debugger/test/browser_dbg_tracing-01.js
browser/devtools/debugger/test/browser_dbg_variables-view-01.js
browser/devtools/debugger/test/browser_dbg_variables-view-02.js
browser/devtools/debugger/test/browser_dbg_variables-view-frame-parameters-01.js
browser/devtools/debugger/test/browser_dbg_variables-view-frame-parameters-02.js
browser/devtools/debugger/test/browser_dbg_variables-view-frame-with.js
browser/devtools/debugger/test/browser_dbg_variables-view-large-array-buffer.js
browser/devtools/debugger/test/browser_dbg_variables-view-popup-01.js
browser/devtools/debugger/test/browser_dbg_variables-view-popup-02.js
browser/devtools/debugger/test/browser_dbg_variables-view-popup-07.js
browser/devtools/debugger/test/browser_dbg_variables-view-popup-08.js
browser/devtools/debugger/test/browser_dbg_variables-view-webidl.js
browser/devtools/debugger/test/head.js
browser/devtools/debugger/utils.js
browser/devtools/debugger/views/event-listeners-view.js
browser/devtools/debugger/views/global-search-view.js
browser/devtools/debugger/views/tracer-view.js
browser/devtools/framework/test/browser_toolbox_tool_remote_reopen.js
browser/devtools/framework/test/browser_toolbox_window_shortcuts.js
browser/devtools/markupview/markup-view.js
browser/devtools/netmonitor/netmonitor-view.js
browser/devtools/netmonitor/test/browser_net_post-data-01.js
browser/devtools/netmonitor/test/browser_net_simple-request-details.js
browser/devtools/netmonitor/test/sjs_content-type-test-server.sjs
browser/devtools/netmonitor/test/sjs_sorting-test-server.sjs
browser/devtools/netmonitor/test/sjs_status-codes-test-server.sjs
browser/devtools/performance/test/browser_profiler_tree-view-02.js
browser/devtools/projecteditor/lib/editors.js
browser/devtools/scratchpad/test/browser_scratchpad_eval_func.js
browser/devtools/scratchpad/test/browser_scratchpad_pprint-02.js
browser/devtools/scratchpad/test/browser_scratchpad_pprint.js
browser/devtools/shadereditor/test/browser_se_editors-error-gutter.js
browser/devtools/shadereditor/test/browser_se_editors-error-tooltip.js
browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-05.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-06.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-08.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-09.js
browser/devtools/shadereditor/test/browser_webgl-actor-test-12.js
browser/devtools/shared/Curl.jsm
browser/devtools/shared/Parser.jsm
browser/devtools/shared/autocomplete-popup.js
browser/devtools/shared/test/browser_telemetry_button_paintflashing.js
browser/devtools/shared/test/browser_telemetry_button_responsive.js
browser/devtools/shared/test/browser_telemetry_button_scratchpad.js
browser/devtools/shared/test/browser_telemetry_button_tilt.js
browser/devtools/shared/widgets/SideMenuWidget.jsm
browser/devtools/shared/widgets/VariablesView.jsm
browser/devtools/sourceeditor/editor.js
browser/devtools/storage/ui.js
browser/devtools/styleinspector/css-parsing-utils.js
browser/devtools/webconsole/test/browser_bug_865871_variables_view_close_on_esc_key.js
browser/devtools/webconsole/test/browser_bug_869003_inspect_cross_domain_object.js
browser/devtools/webconsole/test/browser_console_log_inspectable_object.js
browser/devtools/webconsole/test/browser_console_variables_view.js
browser/devtools/webconsole/test/browser_console_variables_view_while_debugging.js
browser/devtools/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js
browser/devtools/webconsole/test/browser_webconsole_column_numbers.js
browser/modules/Chat.jsm
dom/base/test/csp/test_CSP_frameancestors.html
dom/base/test/csp/test_connect-src.html
dom/base/test/csp/test_form-action.html
dom/base/test/csp/test_leading_wildcard.html
dom/base/test/test_getFeature_with_perm.html
dom/base/test/test_hasFeature.html
dom/bindings/test/test_sequence_detection.html
dom/canvas/test/test_drawWindow.html
dom/canvas/test/webgl-mochitest/driver-info.js
dom/manifest/ManifestProcessor.jsm
dom/media/tests/mochitest/identity/test_setIdentityProvider.html
dom/media/tests/mochitest/identity/test_setIdentityProviderWithErrors.html
dom/media/tests/mochitest/nonTrickleIce.js
dom/media/tests/mochitest/pc.js
dom/media/tests/mochitest/test_dataChannel_noOffer.html
dom/media/tests/mochitest/test_peerConnection_bug1042791.html
dom/tests/browser/browser_bug1008941_dismissGeolocationHanger.js
dom/tests/mochitest/general/test_donottrack.html
dom/tests/mochitest/general/test_interfaces.html
dom/workers/test/test_worker_interfaces.js
dom/xul/test/test_import_xul_to_content.xul
js/src/jit-test/tests/ion/bug945294.js
js/xpconnect/tests/chrome/test_xrayToJS.xul
layout/reftests/invalidation/nudge-to-integer-invalidation.html
layout/reftests/invalidation/transform-floating-point-invalidation.html
memory/replace/dmd/test/test_dmd.js
mobile/android/chrome/content/browser.js
modules/libpref/test/unit/test_warnings.js
services/common/modules-testing/bagheeraserver.js
services/healthreport/healthreporter.jsm
services/healthreport/providers.jsm
services/healthreport/tests/xpcshell/test_healthreporter.js
services/metrics/tests/xpcshell/test_metrics_provider_manager.js
services/metrics/tests/xpcshell/test_metrics_storage.js
services/sync/Weave.js
services/sync/modules/service.js
services/sync/tests/unit/test_browserid_identity.js
testing/modules/Assert.jsm
testing/xpcshell/head.js
toolkit/components/aboutmemory/tests/test_memoryReporters.xul
toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown.js
toolkit/components/osfile/tests/xpcshell/test_osfile_async_largefiles.js
toolkit/components/places/PlacesUtils.jsm
toolkit/components/places/UnifiedComplete.js
toolkit/components/places/nsPlacesAutoComplete.js
toolkit/components/search/tests/xpcshell/test_multipleIcons.js
toolkit/content/tests/widgets/test_videocontrols_standalone.html
toolkit/content/widgets/autocomplete.xml
toolkit/devtools/event-emitter.js
toolkit/devtools/event-parsers.js
toolkit/devtools/server/actors/script.js
toolkit/devtools/server/tests/unit/test_source-01.js
toolkit/devtools/tests/unit/test_safeErrorString.js
toolkit/devtools/webconsole/utils.js
toolkit/modules/GMPInstallManager.jsm
toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
toolkit/modules/tests/xpcshell/test_Log.js
toolkit/modules/tests/xpcshell/test_task.js
toolkit/mozapps/extensions/test/xpcshell/test_XPIStates.js
toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js
toolkit/webapps/tests/test_hosted_uninstall.xul
toolkit/webapps/tests/test_packaged_uninstall.xul
webapprt/content/downloads/downloads.js
--- a/addon-sdk/source/lib/sdk/self.js
+++ b/addon-sdk/source/lib/sdk/self.js
@@ -23,17 +23,17 @@ const loadReason = readPref("load.reason
 const rootURI = readPref("rootURI") || options.rootURI || "";
 const baseURI = readPref("baseURI") || options.prefixURI + name + "/"
 const addonDataURI = baseURI + "data/";
 const metadata = options.metadata || {};
 const permissions = metadata.permissions || {};
 const isPacked = rootURI && rootURI.indexOf("jar:") === 0;
 
 const uri = (path="") =>
-  path.contains(":") ? path : addonDataURI + path.replace(/^\.\//, "");
+  path.includes(":") ? path : addonDataURI + path.replace(/^\.\//, "");
 
 let preferencesBranch = ("preferences-branch" in metadata)
                             ? metadata["preferences-branch"]
                             : options.preferencesBranch
 
 if (/[^\w{@}.-]/.test(preferencesBranch)) {
   preferencesBranch = id;
   console.warn("Ignoring preferences-branch (not a valid branch name)");
--- a/addon-sdk/source/test/fixtures.js
+++ b/addon-sdk/source/test/fixtures.js
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const { uri } = module;
 const prefix = uri.substr(0, uri.lastIndexOf("/") + 1) + "fixtures/";
 
-exports.url = (path="") => path && path.contains(":")
+exports.url = (path="") => path && path.includes(":")
   ? path
   : prefix + path.replace(/^\.\//, "");
 
 const base64jpeg = "data:image/jpeg;base64,%2F9j%2F4AAQSkZJRgABAQAAAQABAAD%2F" +
                   "2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCg" +
                   "sOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD%2F2wBDAQMDAwQDBAgEBAgQCw" +
                   "kLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ" +
                   "EBAQEBAQEBD%2FwAARCAAgACADAREAAhEBAxEB%2F8QAHwAAAQUBAQEBAQ" +
--- a/addon-sdk/source/test/test-content-events.js
+++ b/addon-sdk/source/test/test-content-events.js
@@ -129,17 +129,17 @@ exports["test dead object errors"] = fun
 
   // The dead object error is properly reported on console but
   // doesn't raise any test's exception
   function onMessage({ subject }) {
     let message = subject.wrappedJSObject;
     let { level } = message;
     let text = String(message.arguments[0]);
 
-    if (level === "error" && text.contains("can't access dead object"))
+    if (level === "error" && text.includes("can't access dead object"))
       fail(text);
   }
 
   let cleanup = () => system.off("console-api-log-event", onMessage);
   let fail = (reason) => {
     cleanup();
     assert.fail(reason);
   }
--- a/addon-sdk/source/test/test-page-worker.js
+++ b/addon-sdk/source/test/test-page-worker.js
@@ -483,17 +483,17 @@ exports.testMessageQueue = function (ass
 };
 
 exports.testWindowStopDontBreak = function (assert, done) {
   const { Ci, Cc } = require('chrome');
   const consoleService = Cc['@mozilla.org/consoleservice;1'].
                             getService(Ci.nsIConsoleService);
   const listener = {
     observe: ({message}) => {
-      if (message.contains('contentWorker is null'))
+      if (message.includes('contentWorker is null'))
         assert.fail('contentWorker is null');
     }
   };
   consoleService.registerListener(listener)
 
   let page = new Page({
     contentURL: 'data:text/html;charset=utf-8,testWindowStopDontBreak',
     contentScriptWhen: 'ready',
--- a/addon-sdk/source/test/test-system-input-output.js
+++ b/addon-sdk/source/test/test-system-input-output.js
@@ -21,17 +21,17 @@ const isConsoleEvent = topic =>
    "console-storage-cache-event"].indexOf(topic) >= 0;
 
 const message = x => ({wrappedJSObject: {data: x}});
 
 exports["test start / stop ports"] = assert => {
   const input = new InputPort({ id: Date.now().toString(32), initial: {data:0} });
   const topic = input.topic;
 
-  assert.ok(topic.contains(addonID), "topics are namespaced to add-on");
+  assert.ok(topic.includes(addonID), "topics are namespaced to add-on");
 
   const xs = lift(({data}) => "x:" + data, input);
   const ys = lift(({data}) => "y:" + data, input);
 
   assert.deepEqual(input.value, {data:0}, "initila value is set");
   assert.deepEqual(xs.value, "x:0", "initial value is mapped");
   assert.deepEqual(ys.value, "y:0", "initial value is mapped");
 
@@ -211,17 +211,17 @@ exports["test explicit input topic"] = (
 };
 
 
 exports["test receive what was send"] = assert => {
   const id = Date.now().toString(32);
   const input = new InputPort({ id: id, initial: 0});
   const output = new OutputPort({ id: id, sync: true });
 
-  assert.ok(input.topic.contains(addonID),
+  assert.ok(input.topic.includes(addonID),
             "input topic is namespaced to addon");
   assert.equal(input.topic, output.topic,
               "input & output get same topics from id.");
 
   start(input);
 
   assert.equal(input.value, 0, "initial value is set");
 
--- a/browser/base/content/aboutaccounts/aboutaccounts.js
+++ b/browser/base/content/aboutaccounts/aboutaccounts.js
@@ -108,17 +108,17 @@ let wrapper = {
     let iframe = document.getElementById("remote");
     this.iframe = iframe;
     iframe.addEventListener("load", this);
 
     // Ideally we'd just merge urlParams with new URL(url).searchParams, but our
     // URLSearchParams implementation doesn't support iteration (bug 1085284).
     let urlParamStr = urlParams.toString();
     if (urlParamStr) {
-      url += (url.contains("?") ? "&" : "?") + urlParamStr;
+      url += (url.includes("?") ? "&" : "?") + urlParamStr;
     }
     iframe.src = url;
   },
 
   handleEvent: function (evt) {
     switch (evt.type) {
       case "load":
         this.iframe.contentWindow.addEventListener("FirefoxAccountsCommand", this);
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -199,18 +199,18 @@ SocialUI = {
     }
   },
 
   get _chromeless() {
     // Is this a popup window that doesn't want chrome shown?
     let docElem = document.documentElement;
     // extrachrome is not restored during session restore, so we need
     // to check for the toolbar as well.
-    let chromeless = docElem.getAttribute("chromehidden").contains("extrachrome") ||
-                     docElem.getAttribute('chromehidden').contains("toolbar");
+    let chromeless = docElem.getAttribute("chromehidden").includes("extrachrome") ||
+                     docElem.getAttribute('chromehidden').includes("toolbar");
     // This property is "fixed" for a window, so avoid doing the check above
     // multiple times...
     delete this._chromeless;
     this._chromeless = chromeless;
     return chromeless;
   },
 
   get enabled() {
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -2983,17 +2983,17 @@ let BrowserOnClick = {
 function getMeOutOfHere() {
   // Get the start page from the *default* pref branch, not the user's
   var prefs = Services.prefs.getDefaultBranch(null);
   var url = BROWSER_NEW_TAB_URL;
   try {
     url = prefs.getComplexValue("browser.startup.homepage",
                                 Ci.nsIPrefLocalizedString).data;
     // If url is a pipe-delimited set of pages, just take the first one.
-    if (url.contains("|"))
+    if (url.includes("|"))
       url = url.split("|")[0];
   } catch(e) {
     Components.utils.reportError("Couldn't get homepage pref: " + e);
   }
   gBrowser.loadURI(url);
 }
 
 function BrowserFullScreen()
@@ -3675,17 +3675,17 @@ function FillHistoryMenu(aParent) {
     aParent.appendChild(item);
   }
   return true;
 }
 
 function addToUrlbarHistory(aUrlToAdd) {
   if (!PrivateBrowsingUtils.isWindowPrivate(window) &&
       aUrlToAdd &&
-      !aUrlToAdd.contains(" ") &&
+      !aUrlToAdd.includes(" ") &&
       !/[\x00-\x1F]/.test(aUrlToAdd))
     PlacesUIUtils.markPageAsTyped(aUrlToAdd);
 }
 
 function toJavaScriptConsole()
 {
   toOpenWindowByType("global:console", "chrome://global/content/console.xul");
 }
@@ -6420,17 +6420,17 @@ function GetSearchFieldBookmarkData(node
     }
   }
 
   var postData;
 
   if (isURLEncoded)
     postData = formData.join("&");
   else {
-    let separator = spec.contains("?") ? "&" : "?";
+    let separator = spec.includes("?") ? "&" : "?";
     spec += separator + formData.join("&");
   }
 
   return {
     spec: spec,
     title: title,
     description: description,
     postData: postData,
--- a/browser/base/content/sync/aboutSyncTabs.js
+++ b/browser/base/content/sync/aboutSyncTabs.js
@@ -62,18 +62,18 @@ let RemoteTabViewer = {
     let numTabs = this._tabsList.getRowCount();
     let clientTabs = 0;
     let currentClient = null;
 
     for (let i = 0; i < numTabs; i++) {
       let item = this._tabsList.getItemAtIndex(i);
       let hide = false;
       if (item.getAttribute("type") == "tab") {
-        if (!item.getAttribute("url").toLowerCase().contains(val) &&
-            !item.getAttribute("title").toLowerCase().contains(val)) {
+        if (!item.getAttribute("url").toLowerCase().includes(val) &&
+            !item.getAttribute("title").toLowerCase().includes(val)) {
           hide = true;
         } else {
           clientTabs++;
         }
       }
       else if (item.getAttribute("type") == "client") {
         if (currentClient) {
           if (clientTabs == 0) {
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -996,17 +996,17 @@
                 newTitle += sep;
             }
             newTitle += modifier;
 
             // If location bar is hidden and the URL type supports a host,
             // add the scheme and host to the title to prevent spoofing.
             // XXX https://bugzilla.mozilla.org/show_bug.cgi?id=22183#c239
             try {
-              if (docElement.getAttribute("chromehidden").contains("location")) {
+              if (docElement.getAttribute("chromehidden").includes("location")) {
                 var uri = this.mURIFixup.createExposableURI(
                             aBrowser.currentURI);
                 if (uri.scheme == "about")
                   newTitle = uri.spec + sep + newTitle;
                 else
                   newTitle = uri.prePath + sep + newTitle;
               }
             } catch (e) {}
--- a/browser/base/content/test/general/browser_bug839103.js
+++ b/browser/base/content/test/general/browser_bug839103.js
@@ -13,17 +13,17 @@ function test() {
 }
 
 function initialStylesheetAdded(evt) {
   gBrowser.removeEventListener("StyleSheetAdded", initialStylesheetAdded, true);
   ok(true, "received initial style sheet event");
   is(evt.type, "StyleSheetAdded", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
-  ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
+  ok(evt.stylesheet.toString().includes("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
   ok(evt.documentSheet, "style sheet is a document sheet");
 }
 
 function tabLoad(evt) {
   gTab.linkedBrowser.removeEventListener(evt.type, tabLoad, true);
   executeSoon(continueTest);
 }
 
@@ -58,17 +58,17 @@ function continueTest() {
 }
 
 function dynamicStylesheetAdded(evt) {
   gBrowser.removeEventListener("StyleSheetAdded", dynamicStylesheetAdded, true);
   ok(true, "received dynamic style sheet event");
   is(evt.type, "StyleSheetAdded", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
-  ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
+  ok(evt.stylesheet.toString().includes("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
   ok(evt.documentSheet, "style sheet is a document sheet");
 }
 
 function dynamicStylesheetApplicableStateChanged(evt) {
   gBrowser.removeEventListener("StyleSheetApplicableStateChanged", dynamicStylesheetApplicableStateChanged, true);
   ok(true, "received dynamic style sheet applicable state change event");
   is(evt.type, "StyleSheetApplicableStateChanged", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
@@ -92,58 +92,58 @@ function dynamicStylesheetApplicableStat
 }
 
 function dynamicStylesheetRemoved(evt) {
   gBrowser.removeEventListener("StyleSheetRemoved", dynamicStylesheetRemoved, true);
   ok(true, "received dynamic style sheet removal");
   is(evt.type, "StyleSheetRemoved", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
-  ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
-  ok(evt.stylesheet.href.contains(gStyleSheet), "evt.stylesheet is the removed stylesheet");
+  ok(evt.stylesheet.toString().includes("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
+  ok(evt.stylesheet.href.includes(gStyleSheet), "evt.stylesheet is the removed stylesheet");
 
   gBrowser.addEventListener("StyleRuleAdded", styleRuleAdded, true);
   gBrowser.contentDocument.querySelector("style").sheet.insertRule("*{color:black}", 0);
 }
 
 function styleRuleAdded(evt) {
   gBrowser.removeEventListener("StyleRuleAdded", styleRuleAdded, true);
   ok(true, "received style rule added event");
   is(evt.type, "StyleRuleAdded", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
-  ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
+  ok(evt.stylesheet.toString().includes("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
   ok(evt.rule, "evt.rule is defined");
   is(evt.rule.cssText, "* { color: black; }", "evt.rule.cssText has expected value");
 
   gBrowser.addEventListener("StyleRuleChanged", styleRuleChanged, true);
   evt.rule.style.cssText = "color:green";
 }
 
 function styleRuleChanged(evt) {
   gBrowser.removeEventListener("StyleRuleChanged", styleRuleChanged, true);
   ok(true, "received style rule changed event");
   is(evt.type, "StyleRuleChanged", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
-  ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
+  ok(evt.stylesheet.toString().includes("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
   ok(evt.rule, "evt.rule is defined");
   is(evt.rule.cssText, "* { color: green; }", "evt.rule.cssText has expected value");
 
   gBrowser.addEventListener("StyleRuleRemoved", styleRuleRemoved, true);
   evt.stylesheet.deleteRule(0);
 }
 
 function styleRuleRemoved(evt) {
   gBrowser.removeEventListener("StyleRuleRemoved", styleRuleRemoved, true);
   ok(true, "received style rule removed event");
   is(evt.type, "StyleRuleRemoved", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
-  ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
+  ok(evt.stylesheet.toString().includes("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
   ok(evt.rule, "evt.rule is defined");
 
   executeSoon(concludeTest);
 }
 
 function concludeTest() {
   let doc = gBrowser.contentDocument;
   doc.removeEventListener("StyleSheetAdded", unexpectedContentEvent, false);
--- a/browser/base/content/test/general/browser_bug970746.js
+++ b/browser/base/content/test/general/browser_bug970746.js
@@ -102,17 +102,17 @@ add_task(function *() {
           { type: "contextmenu", button: 2}, gBrowser.selectedBrowser);
     yield popupShownPromise;
 
     let menuItem = document.getElementById("context-searchselect");
     is(menuItem.hidden, !test.shouldBeShown,
         "search context menu item is shown for  '#" + test.id + "' and selected is '" + test.isSelected + "'");
 
     if (test.shouldBeShown) {
-      ok(menuItem.label.contains(test.expectedLabelContents),
+      ok(menuItem.label.includes(test.expectedLabelContents),
          "Menu item text '" + menuItem.label  + "' contains the correct search terms '" + test.expectedLabelContents  + "'");
     }
 
     let popupHiddenPromise = BrowserTestUtils.waitForEvent(contentAreaContextMenu, "popuphidden");
     contentAreaContextMenu.hidePopup();
     yield popupHiddenPromise;
   }
 
--- a/browser/base/content/test/general/browser_devices_get_user_media.js
+++ b/browser/base/content/test/general/browser_devices_get_user_media.js
@@ -149,17 +149,17 @@ function activateSecondaryAction(aAction
       EventUtils.synthesizeKey("VK_DOWN", {});
 
     // Activate
     EventUtils.synthesizeKey("VK_RETURN", {});
   }, false);
 
   // One down event to open the popup
   EventUtils.synthesizeKey("VK_DOWN",
-                           { altKey: !navigator.platform.contains("Mac") });
+                           { altKey: !navigator.platform.includes("Mac") });
 }
 
 registerCleanupFunction(function() {
   gBrowser.removeCurrentTab();
   kObservedTopics.forEach(topic => {
     Services.obs.removeObserver(observer, topic);
   });
   Services.prefs.clearUserPref(PREF_PERMISSION_FAKE);
--- a/browser/base/content/test/general/browser_homeDrop.js
+++ b/browser/base/content/test/general/browser_homeDrop.js
@@ -32,17 +32,17 @@ function test() {
     ok(true, "dialog appeared in response to home button drop");
     domwindow.document.documentElement.cancelDialog();
     Services.wm.removeListener(dialogListener);
 
     // Now trigger the invalid URI test
     executeSoon(function () {
       let consoleListener = {
         observe: function (m) {
-          if (m.message.contains("NS_ERROR_DOM_BAD_URI")) {
+          if (m.message.includes("NS_ERROR_DOM_BAD_URI")) {
             ok(true, "drop was blocked");
             executeSoon(finish);
           }
         }
       }
       Services.console.registerListener(consoleListener);
       registerCleanupFunction(function () {
         Services.console.unregisterListener(consoleListener);
--- a/browser/base/content/test/general/browser_parsable_css.js
+++ b/browser/base/content/test/general/browser_parsable_css.js
@@ -68,17 +68,17 @@ add_task(function checkAllTheCSS() {
 
   // Listen for errors caused by the CSS:
   let errorListener = {
     observe: function(aMessage) {
       if (!aMessage || !(aMessage instanceof Ci.nsIScriptError)) {
         return;
       }
       // Only care about CSS errors generated by our iframe:
-      if (aMessage.category.contains("CSS") && aMessage.innerWindowID === 0 && aMessage.outerWindowID === 0) {
+      if (aMessage.category.includes("CSS") && aMessage.innerWindowID === 0 && aMessage.outerWindowID === 0) {
         // Check if this error is whitelisted in kWhitelist
         if (!ignoredError(aMessage)) {
           ok(false, "Got error message for " + aMessage.sourceName + ": " + aMessage.errorMessage);
           errors++;
         } else {
           info("Ignored error for " + aMessage.sourceName + " because of filter.");
         }
       }
--- a/browser/base/content/test/general/browser_parsable_script.js
+++ b/browser/base/content/test/general/browser_parsable_script.js
@@ -78,32 +78,32 @@ add_task(function* checkAllTheJS() {
       return;
     }
     // Request a 10 minutes timeout (30 seconds * 20) for debug builds.
     requestLongerTimeout(20);
   }
 
   let uris;
   // If an absolute URI is specified on the command line, use it immediately.
-  if (parseValue && parseValue.contains(":")) {
+  if (parseValue && parseValue.includes(":")) {
     uris = [NetUtil.newURI(parseValue)];
   } else {
     let appDir = Services.dirsvc.get("XCurProcD", Ci.nsIFile);
     // This asynchronously produces a list of URLs (sadly, mostly sync on our
     // test infrastructure because it runs against jarfiles there, and
     // our zipreader APIs are all sync)
     let startTimeMs = Date.now();
     info("Collecting URIs");
     uris = yield generateURIsFromDirTree(appDir, [".js", ".jsm"]);
     info("Collected URIs in " + (Date.now() - startTimeMs) + "ms");
 
     // Apply the filter specified on the command line, if any.
     if (parseValue) {
       uris = uris.filter(uri => {
-        if (uri.spec.contains(parseValue)) {
+        if (uri.spec.includes(parseValue)) {
           return true;
         }
         info("Not checking filtered out " + uri.spec);
         return false;
       });
     }
   }
 
--- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
+++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
@@ -19,17 +19,17 @@ function test() {
       onCacheStorageInfo: function(num, consumption)
       {
         info("disk storage contains " + num + " entries");
       },
       onCacheEntryInfo: function(uri)
       {
         var urispec = uri.asciiSpec;
         info(urispec);
-        is(urispec.contains(filename), false, "web content present in disk cache");
+        is(urispec.includes(filename), false, "web content present in disk cache");
       },
       onCacheEntryVisitCompleted: function()
       {
         goon();
       }
     };
     function Visitor() {}
 
--- a/browser/base/content/test/general/test_offline_gzip.html
+++ b/browser/base/content/test/general/test_offline_gzip.html
@@ -73,17 +73,17 @@ function handleMessageEvents(event) {
         // Sometimes document.body may not exist, and trying to access
         // it will throw an exception, so handle this case.
         try {
           var bodyInnerHTML = frames.testFrame.document.body.innerHTML;
         }
         catch (e) {
           var bodyInnerHTML = "";
         }
-        if (cacheCount == 2 || bodyInnerHTML.contains("error")) {
+        if (cacheCount == 2 || bodyInnerHTML.includes("error")) {
           clearInterval(intervalID);
           is(cacheCount, 2, "frame not reloaded successfully");
           if (cacheCount != 2) {
             finishTest();
           }
         }
       }, 100);
       break;
--- a/browser/base/content/test/newtab/browser_newtab_search.js
+++ b/browser/base/content/test/newtab/browser_newtab_search.js
@@ -299,17 +299,17 @@ function blobToBase64(blob) {
     }
     reader.onerror = reject;
     reader.readAsDataURL(blob);
   });
 }
 
 let checkCurrentEngine = Task.async(function* ({name: basename, logoPrefix1x, logoPrefix2x}) {
   let engine = Services.search.currentEngine;
-  ok(engine.name.contains(basename),
+  ok(engine.name.includes(basename),
      "Sanity check: current engine: engine.name=" + engine.name +
      " basename=" + basename);
 
   // gSearch.currentEngineName
   is(gSearch().currentEngineName, engine.name,
      "currentEngineName: " + engine.name);
 });
 
--- a/browser/base/content/test/plugins/browser_CTP_remove_navigate.js
+++ b/browser/base/content/test/plugins/browser_CTP_remove_navigate.js
@@ -70,13 +70,13 @@ add_task(function* () {
   let plugin = browser.contentDocument.getElementById("test");
   plugin.remove();
   yield loadPage(browser, gTestRoot + "plugin_small_2.html");
   let notification = yield waitForNotificationBar("plugin-hidden", browser);
   ok(notification, "There should be a notification shown for the new page.");
 
   // Ensure that the notification is showing information about
   // the x-second-test plugin.
-  ok(notification.label.contains("Second Test"), "Should mention the second plugin");
-  ok(!notification.label.contains("127.0.0.1"), "Should not refer to old principal");
-  ok(notification.label.contains("null"), "Should refer to the new principal");
+  ok(notification.label.includes("Second Test"), "Should mention the second plugin");
+  ok(!notification.label.includes("127.0.0.1"), "Should not refer to old principal");
+  ok(notification.label.includes("null"), "Should refer to the new principal");
   gBrowser.removeTab(newTab);
 });
--- a/browser/base/content/test/plugins/browser_bug797677.js
+++ b/browser/base/content/test/plugins/browser_bug797677.js
@@ -14,17 +14,17 @@ function test() {
   var newTab = gBrowser.addTab();
   gBrowser.selectedTab = newTab;
   gTestBrowser = gBrowser.selectedBrowser;
   gTestBrowser.addEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
   var consoleService = Cc["@mozilla.org/consoleservice;1"]
                          .getService(Ci.nsIConsoleService);
   var errorListener = {
     observe: function(aMessage) {
-      if (aMessage.message.contains("NS_ERROR"))
+      if (aMessage.message.includes("NS_ERROR"))
         gConsoleErrors++;
     }
   };
   consoleService.registerListener(errorListener);
   registerCleanupFunction(function() {
     gTestBrowser.removeEventListener("PluginBindingAttached", pluginBindingAttached, true);
     consoleService.unregisterListener(errorListener);
     gBrowser.removeCurrentTab();
--- a/browser/base/content/test/popupNotifications/head.js
+++ b/browser/base/content/test/popupNotifications/head.js
@@ -302,10 +302,10 @@ function triggerSecondaryCommand(popup, 
       EventUtils.synthesizeKey("VK_DOWN", {});
     }
     // Activate
     EventUtils.synthesizeKey("VK_RETURN", {});
   }, false);
 
   // One down event to open the popup
   info("Open the popup to trigger secondary command for notification " + notification.id);
-  EventUtils.synthesizeKey("VK_DOWN", { altKey: !navigator.platform.contains("Mac") });
+  EventUtils.synthesizeKey("VK_DOWN", { altKey: !navigator.platform.includes("Mac") });
 }
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -518,17 +518,17 @@ file, You can obtain one at http://mozil
           var selectedVal = inputVal.substring(this.selectionStart, this.selectionEnd);
 
           // If the selection doesn't start at the beginning or doesn't span the full domain or
           // the URL bar is modified, nothing else to do here.
           if (this.selectionStart > 0 || this.valueIsTyped)
             return selectedVal;
           // The selection doesn't span the full domain if it doesn't contain a slash and is
           // followed by some character other than a slash.
-          if (!selectedVal.contains("/")) {
+          if (!selectedVal.includes("/")) {
             let remainder = inputVal.replace(selectedVal, "");
             if (remainder != "" && remainder[0] != "/")
               return selectedVal;
           }
 
           let uriFixup = Cc["@mozilla.org/docshell/urifixup;1"].getService(Ci.nsIURIFixup);
 
           let uri;
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -429,17 +429,17 @@ const PanelUI = {
   _adjustLabelsForAutoHyphens: function(aNode) {
     let toolbarButtons = aNode ? [aNode] :
                                  this.contents.querySelectorAll(".toolbarbutton-1");
     for (let node of toolbarButtons) {
       let label = node.getAttribute("label");
       if (!label) {
         continue;
       }
-      if (label.contains("\u00ad")) {
+      if (label.includes("\u00ad")) {
         node.setAttribute("auto-hyphens", "off");
       } else {
         node.removeAttribute("auto-hyphens");
       }
     }
   },
 
   /**
--- a/browser/components/downloads/content/allDownloadsViewOverlay.js
+++ b/browser/components/downloads/content/allDownloadsViewOverlay.js
@@ -413,18 +413,18 @@ HistoryDownloadElementShell.prototype = 
   // Returns whether or not the download handled by this shell should
   // show up in the search results for the given term.  Both the display
   // name for the download and the url are searched.
   matchesSearchTerm(aTerm) {
     if (!aTerm) {
       return true;
     }
     aTerm = aTerm.toLowerCase();
-    return this.displayName.toLowerCase().contains(aTerm) ||
-           this.download.source.url.toLowerCase().contains(aTerm);
+    return this.displayName.toLowerCase().includes(aTerm) ||
+           this.download.source.url.toLowerCase().includes(aTerm);
   },
 
   // Handles return keypress on the element (the keypress listener is
   // set in the DownloadsPlacesView object).
   doDefaultCommand() {
     function getDefaultCommandForState(aState) {
       switch (aState) {
         case nsIDM.DOWNLOAD_FINISHED:
--- a/browser/components/loop/LoopCalls.jsm
+++ b/browser/components/loop/LoopCalls.jsm
@@ -287,17 +287,17 @@ let LoopCallsInternal = {
         this.conversationInProgress.id = windowId;
       }
     };
 
     if (callData.type == "incoming" && ("callerId" in callData) &&
         EMAIL_OR_PHONE_RE.test(callData.callerId)) {
       LoopContacts.search({
         q: callData.callerId,
-        field: callData.callerId.contains("@") ? "email" : "tel"
+        field: callData.callerId.includes("@") ? "email" : "tel"
       }, (err, contacts) => {
         if (err) {
           // Database error, helas!
           openChat();
           return;
         }
 
         for (let contact of contacts) {
--- a/browser/components/loop/content/js/contacts.js
+++ b/browser/components/loop/content/js/contacts.js
@@ -564,18 +564,18 @@ loop.contacts = (function(_, mozL10n) {
       });
 
       let showFilter = Object.getOwnPropertyNames(this.contacts).length >=
                        MIN_CONTACTS_FOR_FILTERING;
       if (showFilter) {
         let filter = this.state.filter.trim().toLocaleLowerCase();
         if (filter) {
           let filterFn = contact => {
-            return contact.name[0].toLocaleLowerCase().contains(filter) ||
-                   getPreferred(contact, "email").value.toLocaleLowerCase().contains(filter);
+            return contact.name[0].toLocaleLowerCase().includes(filter) ||
+                   getPreferred(contact, "email").value.toLocaleLowerCase().includes(filter);
           };
           if (shownContacts.available) {
             shownContacts.available = shownContacts.available.filter(filterFn);
           }
           if (shownContacts.blocked) {
             shownContacts.blocked = shownContacts.blocked.filter(filterFn);
           }
         }
--- a/browser/components/loop/content/js/contacts.jsx
+++ b/browser/components/loop/content/js/contacts.jsx
@@ -564,18 +564,18 @@ loop.contacts = (function(_, mozL10n) {
       });
 
       let showFilter = Object.getOwnPropertyNames(this.contacts).length >=
                        MIN_CONTACTS_FOR_FILTERING;
       if (showFilter) {
         let filter = this.state.filter.trim().toLocaleLowerCase();
         if (filter) {
           let filterFn = contact => {
-            return contact.name[0].toLocaleLowerCase().contains(filter) ||
-                   getPreferred(contact, "email").value.toLocaleLowerCase().contains(filter);
+            return contact.name[0].toLocaleLowerCase().includes(filter) ||
+                   getPreferred(contact, "email").value.toLocaleLowerCase().includes(filter);
           };
           if (shownContacts.available) {
             shownContacts.available = shownContacts.available.filter(filterFn);
           }
           if (shownContacts.blocked) {
             shownContacts.blocked = shownContacts.blocked.filter(filterFn);
           }
         }
--- a/browser/components/loop/test/xpcshell/test_loopservice_token_send.js
+++ b/browser/components/loop/test/xpcshell/test_loopservice_token_send.js
@@ -8,21 +8,21 @@ add_test(function test_registration_uses
   loopServer.registerPathHandler("/registration", (request, response) => {
     // Check that we have an Authorization header with the correct bits. The
     // translation of values are tested in different modules, for the components
     // that we use.
     // XXX In future, we should reconsider our stubbing model, and possibly stub
     // components/interfaces at a higher level.
     let header = request.getHeader("Authorization");
 
-    Assert.notEqual(header.contains("Hawk id="), -1, "Should contain a hawk id");
-    Assert.notEqual(header.contains("ts="), -1, "Should contain a timestamp");
-    Assert.notEqual(header.contains("nonce="), -1, "Should contain a nonce");
-    Assert.notEqual(header.contains("hash="), -1, "Should contain a hash");
-    Assert.notEqual(header.contains("mac="), -1, "Should contain a mac");
+    Assert.notEqual(header.includes("Hawk id="), -1, "Should contain a hawk id");
+    Assert.notEqual(header.includes("ts="), -1, "Should contain a timestamp");
+    Assert.notEqual(header.includes("nonce="), -1, "Should contain a nonce");
+    Assert.notEqual(header.includes("hash="), -1, "Should contain a hash");
+    Assert.notEqual(header.includes("mac="), -1, "Should contain a mac");
 
     response.setStatusLine(null, 200, "OK");
     response.processAsync();
     response.finish();
   });
 
   MozLoopService.promiseRegisteredWithServers().then(() => {
     run_next_test();
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1794,17 +1794,17 @@ BrowserGlue.prototype = {
     }
 
     if (currentUIVersion < 12) {
       // Remove bookmarks-menu-button-container, then place
       // bookmarks-menu-button into its position.
       let currentset = xulStore.getValue(BROWSER_DOCURL, "nav-bar", "currentset");
       // Need to migrate only if toolbar is customized.
       if (currentset) {
-        if (currentset.contains("bookmarks-menu-button-container")) {
+        if (currentset.includes("bookmarks-menu-button-container")) {
           currentset = currentset.replace(/(^|,)bookmarks-menu-button-container($|,)/,
                                           "$1bookmarks-menu-button$2");
           xulStore.setValue(BROWSER_DOCURL, "nav-bar", "currentset", currentset);
         }
       }
     }
 
     if (currentUIVersion < 14) {
@@ -1822,23 +1822,23 @@ BrowserGlue.prototype = {
     }
 
     // Insert the bookmarks-menu-button into the nav-bar if it isn't already
     // there.
     if (currentUIVersion < 17) {
       let currentset = xulStore.getValue(BROWSER_DOCURL, "nav-bar", "currentset");
       // Need to migrate only if toolbar is customized.
       if (currentset) {
-        if (!currentset.contains("bookmarks-menu-button")) {
+        if (!currentset.includes("bookmarks-menu-button")) {
           // The button isn't in the nav-bar, so let's look for an appropriate
           // place to put it.
-          if (currentset.contains("downloads-button")) {
+          if (currentset.includes("downloads-button")) {
             currentset = currentset.replace(/(^|,)downloads-button($|,)/,
                                             "$1bookmarks-menu-button,downloads-button$2");
-          } else if (currentset.contains("home-button")) {
+          } else if (currentset.includes("home-button")) {
             currentset = currentset.replace(/(^|,)home-button($|,)/,
                                             "$1bookmarks-menu-button,home-button$2");
           } else {
             // Just append.
             currentset = currentset.replace(/(^|,)window-controls($|,)/,
                                             "$1bookmarks-menu-button,window-controls$2")
           }
           xulStore.setValue(BROWSER_DOCURL, "nav-bar", "currentset", currentset);
--- a/browser/components/places/content/menu.xml
+++ b/browser/components/places/content/menu.xml
@@ -587,17 +587,17 @@
       <handler event="popupshown" phase="target"><![CDATA[
         this.setAttribute("panelopen", "true");
         let disablePointerEvents;
         if (!this.hasAttribute("disablepointereventsfortransition")) {
           let container = document.getAnonymousElementByAttribute(this, "anonid", "container");
           let cs = getComputedStyle(container);
           let transitionProp = cs.transitionProperty;
           let transitionTime = parseFloat(cs.transitionDuration);
-          disablePointerEvents = (transitionProp.contains("transform") ||
+          disablePointerEvents = (transitionProp.includes("transform") ||
                                   transitionProp == "all") &&
                                  transitionTime > 0;
           this.setAttribute("disablepointereventsfortransition", disablePointerEvents);
         } else {
           disablePointerEvents = this.getAttribute("disablepointereventsfortransition") == "true";
         }
         if (!disablePointerEvents) {
           this.style.removeProperty("pointer-events");
--- a/browser/components/sessionstore/test/browser_454908.js
+++ b/browser/components/sessionstore/test/browser_454908.js
@@ -38,15 +38,15 @@ add_task(function* test_dont_save_passwo
   is(username, usernameValue, "username was saved/restored");
   let passwd = yield getInputValue(browser, {id: "passwd"});
   is(passwd, "", "password wasn't saved/restored");
 
   // Write to disk and read our file.
   yield forceSaveState();
   yield promiseForEachSessionRestoreFile((state, key) =>
     // Ensure that we have not saved our password.
-    ok(!state.contains(PASS), "password has not been written to file " + key)
+    ok(!state.includes(PASS), "password has not been written to file " + key)
   );
 
 
   // Cleanup.
   gBrowser.removeTab(tab);
 });
--- a/browser/components/tabview/test/browser_tabview_bug626455.js
+++ b/browser/components/tabview/test/browser_tabview_bug626455.js
@@ -40,17 +40,17 @@ function testStayOnPage(win, blockingTab
     executeSoon(function () {
       showTabView(function () {
         is(win.gBrowser.tabs.length, 1,
            "The total number of tab is 1 when staying on the page");
 
         // The other initial tab has been closed when trying to close the tab
         // group. The only tab left is the one with the onbeforeunload dialog.
         let url = win.gBrowser.browsers[0].currentURI.spec;
-        ok(url.contains("onbeforeunload"), "The open tab is the expected one");
+        ok(url.includes("onbeforeunload"), "The open tab is the expected one");
 
         is(contentWindow.GroupItems.getActiveGroupItem(), activeGroup,
            "Active group is still the same");
 
         is(contentWindow.GroupItems.groupItems.length, 1,
            "Only one group is open");
 
         // start the next test
--- a/browser/components/test/browser_polaris_prefs.js
+++ b/browser/components/test/browser_polaris_prefs.js
@@ -19,17 +19,17 @@ function* assertPref(pref, enabled) {
 
 function* testPrefs(test) {
   for (let pref of prefs) {
     yield test(pref);
   }
 }
 
 function isNightly() {
-  return Services.appinfo.version.contains("a1");
+  return Services.appinfo.version.includes("a1");
 }
 
 add_task(function* test_default_values() {
   if (!isNightly()) {
     ok(true, "Skipping test, not Nightly")
     return;
   }
   Assert.ok(!Services.prefs.getBoolPref(POLARIS_ENABLED), POLARIS_ENABLED + " is disabled by default.");
--- a/browser/components/translation/BingTranslator.jsm
+++ b/browser/components/translation/BingTranslator.jsm
@@ -130,18 +130,18 @@ this.BingTranslator.prototype = {
    * request left.
    *
    * @param   aError   [optional] The XHR object of the request that failed.
    */
   _chunkFailed: function(aError) {
     if (aError instanceof Ci.nsIXMLHttpRequest &&
         [400, 401].indexOf(aError.status) != -1) {
       let body = aError.responseText;
-      if (body && body.contains("TranslateApiException") &&
-          (body.contains("balance") || body.contains("active state")))
+      if (body && body.includes("TranslateApiException") &&
+          (body.includes("balance") || body.includes("active state")))
         this._serviceUnavailable = true;
     }
 
     this._checkIfFinished();
   },
 
   /**
    * Function called when a request sent to the server has completed.
--- a/browser/components/translation/test/bing.sjs
+++ b/browser/components/translation/test/bing.sjs
@@ -125,17 +125,17 @@ function checkAuth(req) {
   if (!req.hasHeader("Authorization"))
     throw new HTTPError(401, "No Authorization header provided.");
 
   let auth = req.getHeader("Authorization");
   if (!auth.startsWith("Bearer "))
     throw new HTTPError(401, "Invalid Authorization header content: '" + auth + "'");
 
   // Rejecting inactive subscriptions.
-  if (auth.contains("inactive")) {
+  if (auth.includes("inactive")) {
     const INACTIVE_STATE_RESPONSE = "<html><body><h1>TranslateApiException</h1><p>Method: TranslateArray()</p><p>Message: The Azure Market Place Translator Subscription associated with the request credentials is not in an active state.</p><code></code><p>message id=5641.V2_Rest.TranslateArray.48CC6470</p></body></html>";
     throw new HTTPError(401, INACTIVE_STATE_RESPONSE);
   }
 
 }
 
 function reallyHandleRequest(req, res) {
   log("method: " + req.method);
--- a/browser/components/translation/test/browser_translation_exceptions.js
+++ b/browser/components/translation/test/browser_translation_exceptions.js
@@ -67,17 +67,17 @@ function openPopup(aPopup) {
   aPopup.addEventListener("popupshown", function popupShown() {
     aPopup.removeEventListener("popupshown", popupShown);
     deferred.resolve();
   });
 
   aPopup.focus();
   // One down event to open the popup.
   EventUtils.synthesizeKey("VK_DOWN",
-                           { altKey: !navigator.platform.contains("Mac") });
+                           { altKey: !navigator.platform.includes("Mac") });
 
   return deferred.promise;
 }
 
 function waitForWindowLoad(aWin) {
   let deferred = Promise.defer();
 
   aWin.addEventListener("load", function onload() {
--- a/browser/devtools/canvasdebugger/test/browser_canvas-actor-test-03.js
+++ b/browser/devtools/canvasdebugger/test/browser_canvas-actor-test-03.js
@@ -60,16 +60,16 @@ function ifTestingSupported() {
   is(functionCalls[7].type, CallWatcherFront.METHOD_FUNCTION,
     "The last called function is correctly identified as a method.");
   is(functionCalls[7].name, "requestAnimationFrame",
     "The last called function's name is correct.");
   is(functionCalls[7].file, SIMPLE_CANVAS_URL,
     "The last called function's file is correct.");
   is(functionCalls[7].line, 30,
     "The last called function's line is correct.");
-  ok(functionCalls[7].argsPreview.contains("Function"),
+  ok(functionCalls[7].argsPreview.includes("Function"),
     "The last called function's args preview is correct.");
   is(functionCalls[7].callerPreview, "",
     "The last called function's caller preview is correct.");
 
   yield removeTab(target.tab);
   finish();
 }
--- a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-stack-01.js
+++ b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-stack-01.js
@@ -27,26 +27,26 @@ function ifTestingSupported() {
   yield callStackDisplayed;
 
   isnot($(".call-item-stack", callItem.target), null,
     "There should be a stack container available now for the draw call.");
   is($all(".call-item-stack-fn", callItem.target).length, 4,
     "There should be 4 functions on the stack for the draw call.");
 
   ok($all(".call-item-stack-fn-name", callItem.target)[0].getAttribute("value")
-    .contains("C()"),
+    .includes("C()"),
     "The first function on the stack has the correct name.");
   ok($all(".call-item-stack-fn-name", callItem.target)[1].getAttribute("value")
-    .contains("B()"),
+    .includes("B()"),
     "The second function on the stack has the correct name.");
   ok($all(".call-item-stack-fn-name", callItem.target)[2].getAttribute("value")
-    .contains("A()"),
+    .includes("A()"),
     "The third function on the stack has the correct name.");
   ok($all(".call-item-stack-fn-name", callItem.target)[3].getAttribute("value")
-    .contains("drawRect()"),
+    .includes("drawRect()"),
     "The fourth function on the stack has the correct name.");
 
   is($all(".call-item-stack-fn-location", callItem.target)[0].getAttribute("value"),
     "doc_simple-canvas-deep-stack.html:26",
     "The first function on the stack has the correct location.");
   is($all(".call-item-stack-fn-location", callItem.target)[1].getAttribute("value"),
     "doc_simple-canvas-deep-stack.html:28",
     "The second function on the stack has the correct location.");
--- a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-img-screenshots.js
+++ b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-img-screenshots.js
@@ -21,14 +21,14 @@ function ifTestingSupported() {
     "The screenshot container should now be visible.");
 
   is($("#screenshot-dimensions").getAttribute("value"), "128" + "\u00D7" + "128",
     "The screenshot dimensions label has the expected value.");
 
   is($("#screenshot-image").getAttribute("flipped"), "false",
     "The screenshot element should not be flipped vertically.");
 
-  ok(window.getComputedStyle($("#screenshot-image")).backgroundImage.contains("#screenshot-rendering"),
+  ok(window.getComputedStyle($("#screenshot-image")).backgroundImage.includes("#screenshot-rendering"),
     "The screenshot element should have an offscreen canvas element as a background.");
 
   yield teardown(panel);
   finish();
 }
--- a/browser/devtools/commandline/test/browser_cmd_appcache_valid.js
+++ b/browser/devtools/commandline/test/browser_cmd_appcache_valid.js
@@ -84,17 +84,17 @@ function* spawnTest() {
         args: {
           search: { value: 'page' },
         }
       },
       exec: {
         output: [ /page1/, /page2/, /page3/ ]
       },
       post: function(output, text) {
-        ok(!text.contains("index"), "index is not contained in output");
+        ok(!text.includes("index"), "index is not contained in output");
       }
     },
 
     {
       setup: 'appcache validate',
       check: {
         input:  'appcache validate',
         markup: 'VVVVVVVVVVVVVVVVV',
@@ -144,20 +144,20 @@ function* spawnTest() {
         markup: 'VVVVVVVVVVVVV',
         status: 'VALID',
         args: {},
       },
       exec: {
         output: [ /no results/ ]
       },
       post: function(output, text) {
-        ok(!text.contains("index"), "index is not contained in output");
-        ok(!text.contains("page1"), "page1 is not contained in output");
-        ok(!text.contains("page2"), "page1 is not contained in output");
-        ok(!text.contains("page3"), "page1 is not contained in output");
+        ok(!text.includes("index"), "index is not contained in output");
+        ok(!text.includes("page1"), "page1 is not contained in output");
+        ok(!text.includes("page2"), "page1 is not contained in output");
+        ok(!text.includes("page3"), "page1 is not contained in output");
       }
     },
 
     {
       setup: 'appcache viewentry --key ' + TEST_URI,
       check: {
         input:  'appcache viewentry --key ' + TEST_URI,
               // appcache viewentry --key http://sub1.test2.example.com/browser/browser/devtools/commandline/test/browser_cmd_appcache_valid_index.html
--- a/browser/devtools/commandline/test/browser_cmd_cookie.js
+++ b/browser/devtools/commandline/test/browser_cmd_cookie.js
@@ -121,50 +121,50 @@ function test() {
         exec: { },
       },
       {
         setup: "cookie list",
         exec: {
           output: [ /zap=zep/, /zup=banana/, /Edit/ ]
         },
         post: function(output, text) {
-          ok(!text.contains("zip"), "");
-          ok(!text.contains("zop"), "");
+          ok(!text.includes("zip"), "");
+          ok(!text.includes("zop"), "");
         }
       },
       {
         setup: "cookie remove zap",
         exec: { },
       },
       {
         setup: "cookie list",
         exec: {
           output: [ /zup=banana/, /Edit/ ]
         },
         post: function(output, text) {
-          ok(!text.contains("zap"), "");
-          ok(!text.contains("zep"), "");
-          ok(!text.contains("zip"), "");
-          ok(!text.contains("zop"), "");
+          ok(!text.includes("zap"), "");
+          ok(!text.includes("zep"), "");
+          ok(!text.includes("zip"), "");
+          ok(!text.includes("zop"), "");
         }
       },
       {
         setup: "cookie remove zup",
         exec: { }
       },
       {
         setup: "cookie list",
         exec: {
           output: 'No cookies found for host example.com'
         },
         post: function(output, text) {
-          ok(!text.contains("zap"), "");
-          ok(!text.contains("zep"), "");
-          ok(!text.contains("zip"), "");
-          ok(!text.contains("zop"), "");
-          ok(!text.contains("zup"), "");
-          ok(!text.contains("banana"), "");
-          ok(!text.contains("Edit"), "");
+          ok(!text.includes("zap"), "");
+          ok(!text.includes("zep"), "");
+          ok(!text.includes("zip"), "");
+          ok(!text.includes("zop"), "");
+          ok(!text.includes("zup"), "");
+          ok(!text.includes("banana"), "");
+          ok(!text.includes("Edit"), "");
         }
       },
     ]);
   }).then(finish, helpers.handleError);
 }
--- a/browser/devtools/debugger/test/browser_dbg_addonactor.js
+++ b/browser/devtools/debugger/test/browser_dbg_addonactor.js
@@ -67,17 +67,17 @@ function testDebugger() {
 }
 
 function testSources() {
   let deferred = promise.defer();
 
   gThreadClient.getSources(aResponse => {
     // source URLs contain launch-specific temporary directory path,
     // hence the ".contains" call.
-    const matches = aResponse.sources.filter(s => s.url.contains(ADDON_MODULE_URL));
+    const matches = aResponse.sources.filter(s => s.url.includes(ADDON_MODULE_URL));
     ok(matches.length > 0,
        "the main script of the addon is present in the source list");
     deferred.resolve();
   });
 
   return deferred.promise;
 }
 
--- a/browser/devtools/debugger/test/browser_dbg_auto-pretty-print-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_auto-pretty-print-01.js
@@ -46,17 +46,17 @@ function test(){
       .then(() => closeDebuggerAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + DevToolsUtils.safeErrorString(aError));
       })
   });
 }
 
 function testSourceIsUgly() {
-  ok(!gEditor.getText().contains("\n  "),
+  ok(!gEditor.getText().includes("\n  "),
     "The source shouldn't be pretty printed yet.");
 }
 
 function testSecondSourceLabel(){
   let source = gSources.selectedItem.attachment.source;
   ok(source.url === EXAMPLE_URL + gSecondSourceLabel,
     "Second source url is correct.");
 }
@@ -88,17 +88,17 @@ function enableAutoPrettyPrint(){
 function testAutoPrettyPrintOff(){
   is(gPrefs.autoPrettyPrint, false,
     "The auto-pretty-print pref should be off.");
   isnot(gOptions._autoPrettyPrint.getAttribute("checked"), "true",
        "The Auto pretty print menu item should not be checked.");
 }
 
 function testSourceIsPretty() {
-  ok(gEditor.getText().contains("\n  "),
+  ok(gEditor.getText().includes("\n  "),
     "The source should be pretty printed.")
 }
 
 registerCleanupFunction(function() {
   gTab = null;
   gPanel = null;
   gDebugger = null;
   gEditor = null;
--- a/browser/devtools/debugger/test/browser_dbg_auto-pretty-print-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_auto-pretty-print-02.js
@@ -58,17 +58,17 @@ function test(){
       .then(() => closeDebuggerAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + DevToolsUtils.safeErrorString(aError));
       })
   });
 }
 
 function testSourceIsUgly() {
-  ok(!gEditor.getText().contains("\n  "),
+  ok(!gEditor.getText().includes("\n  "),
     "The source shouldn't be pretty printed yet.");
 }
 
 function testFirstSourceLabel(){
   let source = gSources.selectedItem.attachment.source;
   ok(source.url === EXAMPLE_URL + gFirstSourceLabel,
     "First source url is correct.");
 }
@@ -96,17 +96,17 @@ function disableAutoPrettyPrint(){
   gOptions._toggleAutoPrettyPrint();
   gOptions._onPopupHidden();
   info("Disabled auto pretty printing.");
   // Wait for the pref update to be communicated to the server.
   return waitForDebuggerEvents(gPanel, gDebugger.EVENTS.SOURCE_SHOWN);
 }
 
 function testSourceIsPretty() {
-  ok(gEditor.getText().contains("\n  "),
+  ok(gEditor.getText().includes("\n  "),
     "The source should be pretty printed.")
 }
 
 registerCleanupFunction(function() {
   gTab = null;
   gDebuggee = null;
   gPanel = null;
   gDebugger = null;
--- a/browser/devtools/debugger/test/browser_dbg_break-on-dom-03.js
+++ b/browser/devtools/debugger/test/browser_dbg_break-on-dom-03.js
@@ -47,17 +47,17 @@ function test() {
       yield ensureThreadClientState(aPanel, "resumed");
       yield closeDebuggerAndFinish(aPanel);
     });
 
     function testEventItem(index, label, type, selectors, checked) {
       let item = gEvents.items[index];
       let node = item.target;
 
-      ok(item.attachment.url.contains(label),
+      ok(item.attachment.url.includes(label),
         "The event at index " + index + " has the correct url.");
       is(item.attachment.type, type,
         "The event at index " + index + " has the correct type.");
       is(item.attachment.selectors.toString(), selectors,
         "The event at index " + index + " has the correct selectors.");
       is(item.attachment.checkboxState, checked,
         "The event at index " + index + " has the correct checkbox state.");
 
--- a/browser/devtools/debugger/test/browser_dbg_file-reload.js
+++ b/browser/devtools/debugger/test/browser_dbg_file-reload.js
@@ -17,17 +17,17 @@ function test() {
 
     Task.spawn(function() {
       yield waitForSourceShown(aPanel, JS_URL);
 
       is(gSources.itemCount, 1,
         "There should be one source displayed in the view.")
       is(getSelectedSourceURL(gSources), JS_URL,
         "The correct source is currently selected in the view.");
-      ok(gEditor.getText().contains("bacon"),
+      ok(gEditor.getText().includes("bacon"),
         "The currently shown source contains bacon. Mmm, delicious!");
 
       let { source } = gSources.selectedItem.attachment;
       let [, firstText] = yield gControllerSources.getText(source);
       let firstNumber = parseFloat(firstText.match(/\d\.\d+/)[0]);
 
       is(firstText, gEditor.getText(),
         "gControllerSources.getText() returned the expected contents.");
@@ -35,17 +35,17 @@ function test() {
         "The generated number seems to be created correctly.");
 
       yield reloadActiveTab(aPanel, gDebugger.EVENTS.SOURCE_SHOWN);
 
       is(gSources.itemCount, 1,
         "There should be one source displayed in the view after reloading.")
       is(getSelectedSourceURL(gSources), JS_URL,
         "The correct source is currently selected in the view after reloading.");
-      ok(gEditor.getText().contains("bacon"),
+      ok(gEditor.getText().includes("bacon"),
         "The newly shown source contains bacon. Mmm, delicious!");
 
       ({ source } = gSources.selectedItem.attachment);
       let [, secondText] = yield gControllerSources.getText(source);
       let secondNumber = parseFloat(secondText.match(/\d\.\d+/)[0]);
 
       is(secondText, gEditor.getText(),
         "gControllerSources.getText() returned the expected contents.");
--- a/browser/devtools/debugger/test/browser_dbg_globalactor.js
+++ b/browser/devtools/debugger/test/browser_dbg_globalactor.js
@@ -22,17 +22,17 @@ function test() {
   gClient = new DebuggerClient(transport);
   gClient.connect((aType, aTraits) => {
     is(aType, "browser",
       "Root actor should identify itself as a browser.");
 
     gClient.listTabs(aResponse => {
       let globalActor = aResponse.testGlobalActor1;
       ok(globalActor, "Found the test tab actor.")
-      ok(globalActor.contains("test_one"),
+      ok(globalActor.includes("test_one"),
         "testGlobalActor1's actorPrefix should be used.");
 
       gClient.request({ to: globalActor, type: "ping" }, aResponse => {
         is(aResponse.pong, "pong", "Actor should respond to requests.");
 
         // Send another ping to see if the same actor is used.
         gClient.request({ to: globalActor, type: "ping" }, aResponse => {
           is(aResponse.pong, "pong", "Actor should respond to requests.");
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-01.js
@@ -32,45 +32,45 @@ function test() {
       .then(() => closeDebuggerAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + DevToolsUtils.safeErrorString(aError));
       });
   });
 }
 
 function testSourceIsUgly() {
-  ok(!gEditor.getText().contains("\n  "),
+  ok(!gEditor.getText().includes("\n  "),
      "The source shouldn't be pretty printed yet.");
 }
 
 function clickPrettyPrintButton() {
   gDebugger.document.getElementById("pretty-print").click();
 }
 
 function testProgressBarShown() {
   const deck = gDebugger.document.getElementById("editor-deck");
   is(deck.selectedIndex, 2, "The progress bar should be shown");
 }
 
 function testSourceIsPretty() {
-  ok(gEditor.getText().contains("\n  "),
+  ok(gEditor.getText().includes("\n  "),
      "The source should be pretty printed.")
 }
 
 function testEditorShown() {
   const deck = gDebugger.document.getElementById("editor-deck");
   is(deck.selectedIndex, 0, "The editor should be shown");
 }
 
 function testSourceIsStillPretty() {
   const deferred = promise.defer();
 
   const { source } = gSources.selectedItem.attachment;
   gDebugger.DebuggerController.SourceScripts.getText(source).then(([, text]) => {
-    ok(text.contains("\n  "),
+    ok(text.includes("\n  "),
        "Subsequent calls to getText return the pretty printed source.");
     deferred.resolve();
   });
 
   return deferred.promise;
 }
 
 registerCleanupFunction(function() {
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-02.js
@@ -37,17 +37,17 @@ function selectContextMenuItem() {
   once(gContextMenu, "popupshown").then(() => {
     const menuItem = gDebugger.document.getElementById("se-dbg-cMenu-prettyPrint");
     menuItem.click();
   });
   gContextMenu.openPopup(gEditor.container, "overlap", 0, 0, true, false);
 }
 
 function testSourceIsPretty() {
-  ok(gEditor.getText().contains("\n  "),
+  ok(gEditor.getText().includes("\n  "),
      "The source should be pretty printed.")
 }
 
 registerCleanupFunction(function() {
   gTab = null;
   gPanel = null;
   gDebugger = null;
   gEditor = null;
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-05.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-05.js
@@ -24,17 +24,17 @@ function test() {
 
       // From this point onward, the source editor's text should never change.
       gEditor.once("change", () => {
         ok(false, "The source editor text shouldn't have changed.");
       });
 
       is(getSelectedSourceURL(gSources), TAB_URL,
         "The correct source is currently selected.");
-      ok(gEditor.getText().contains("myFunction"),
+      ok(gEditor.getText().includes("myFunction"),
         "The source shouldn't be pretty printed yet.");
 
       clickPrettyPrintButton();
 
       let { source } = gSources.selectedItem.attachment;
       try {
         yield gControllerSources.togglePrettyPrint(source);
         ok(false, "The promise for a prettified source should be rejected!");
@@ -42,19 +42,19 @@ function test() {
         is(error, "Can't prettify non-javascript files.",
           "The promise was correctly rejected with a meaningful message.");
       }
 
       let text;
       [source, text] = yield gControllerSources.getText(source);
       is(getSelectedSourceURL(gSources), TAB_URL,
         "The correct source is still selected.");
-      ok(gEditor.getText().contains("myFunction"),
+      ok(gEditor.getText().includes("myFunction"),
         "The displayed source hasn't changed.");
-      ok(text.contains("myFunction"),
+      ok(text.includes("myFunction"),
         "The cached source text wasn't altered in any way.");
 
       yield closeDebuggerAndFinish(gPanel);
     });
   });
 }
 
 function clickPrettyPrintButton() {
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-06.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-06.js
@@ -40,37 +40,37 @@ function test() {
 
       // From this point onward, the source editor's text should never change.
       gEditor.once("change", () => {
         ok(false, "The source editor text shouldn't have changed.");
       });
 
       is(getSelectedSourceURL(gSources), JS_URL,
         "The correct source is currently selected.");
-      ok(gEditor.getText().contains("myFunction"),
+      ok(gEditor.getText().includes("myFunction"),
         "The source shouldn't be pretty printed yet.");
 
       clickPrettyPrintButton();
 
       let { source } = gSources.selectedItem.attachment;
       try {
         yield gControllerSources.togglePrettyPrint(source);
         ok(false, "The promise for a prettified source should be rejected!");
       } catch ([source, error]) {
-        ok(error.contains("prettyPrintError"),
+        ok(error.includes("prettyPrintError"),
           "The promise was correctly rejected with a meaningful message.");
       }
 
       let text;
       [source, text] = yield gControllerSources.getText(source);
       is(getSelectedSourceURL(gSources), JS_URL,
         "The correct source is still selected.");
-      ok(gEditor.getText().contains("myFunction"),
+      ok(gEditor.getText().includes("myFunction"),
         "The displayed source hasn't changed.");
-      ok(text.contains("myFunction"),
+      ok(text.includes("myFunction"),
         "The cached source text wasn't altered in any way.");
 
       is(gPrettyPrinted, true,
         "The hijacked pretty print method was executed.");
 
       yield closeDebuggerAndFinish(gPanel);
     });
   });
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-07.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-07.js
@@ -18,40 +18,40 @@ function test() {
 
     findSource();
   });
 }
 
 function findSource() {
   gThreadClient.getSources(({ error, sources }) => {
     ok(!error);
-    sources = sources.filter(s => s.url.contains('code_ugly-2.js'));
+    sources = sources.filter(s => s.url.includes('code_ugly-2.js'));
     is(sources.length, 1);
     gSource = sources[0];
     prettyPrintSource();
   });
 }
 
 function prettyPrintSource() {
   gThreadClient.source(gSource).prettyPrint(4, testPrettyPrinted);
 }
 
 function testPrettyPrinted({ error, source }) {
   ok(!error, "Should not get an error while pretty-printing");
-  ok(source.contains("\n    "),
+  ok(source.includes("\n    "),
     "Source should be pretty-printed");
   disablePrettyPrint();
 }
 
 function disablePrettyPrint() {
   gThreadClient.source(gSource).disablePrettyPrint(testUgly);
 }
 
 function testUgly({ error, source }) {
   ok(!error, "Should not get an error while disabling pretty-printing");
-  ok(!source.contains("\n    "),
+  ok(!source.includes("\n    "),
      "Source should not be pretty after disabling pretty-printing");
   closeDebuggerAndFinish(gPanel);
 }
 
 registerCleanupFunction(function() {
   gTab = gPanel = gClient = gThreadClient = gSource = null;
 });
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-08.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-08.js
@@ -22,17 +22,17 @@ function test() {
 const BP_LOCATION = {
   line: 5,
   // column: 0
 };
 
 function findSource() {
   gThreadClient.getSources(({ error, sources }) => {
     ok(!error, "error should exist");
-    sources = sources.filter(s => s.url.contains("code_ugly-3.js"));
+    sources = sources.filter(s => s.url.includes("code_ugly-3.js"));
     is(sources.length, 1, "sources.length should be 1");
     [gSource] = sources;
     BP_LOCATION.actor = gSource.actor;
 
     prettyPrintSource(sources[0]);
   });
 }
 
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-09.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-09.js
@@ -61,17 +61,17 @@ function testDbgStatement(event, { frame
 }
 
 function disablePrettyPrint() {
   gThreadClient.source(gSource).disablePrettyPrint(testUgly);
 }
 
 function testUgly({ error, source }) {
   ok(!error);
-  ok(!source.contains("\n  "));
+  ok(!source.includes("\n  "));
   getFrame();
 }
 
 function getFrame() {
   gThreadClient.getFrames(0, 1, testFrame);
 }
 
 function testFrame({ frames: [frame] }) {
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-10.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-10.js
@@ -27,33 +27,33 @@ function test() {
       .then(() => closeDebuggerAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + DevToolsUtils.safeErrorString(aError));
       });
   });
 }
 
 function testSourceIsUgly() {
-  ok(!gEditor.getText().contains("\n    "),
+  ok(!gEditor.getText().includes("\n    "),
      "The source shouldn't be pretty printed yet.");
 }
 
 function clickPrettyPrintButton() {
   // Wait a tick before clicking to make sure the frontend's blackboxchange
   // handlers have finished.
   return new Promise(resolve => {
     gDebugger.document.getElementById("pretty-print").click();
     resolve();
   });
 }
 
 function testSourceIsStillUgly() {
   const { source } = gSources.selectedItem.attachment;
   return gDebugger.DebuggerController.SourceScripts.getText(source).then(([, text]) => {
-    ok(!text.contains("\n    "));
+    ok(!text.includes("\n    "));
   });
 }
 
 registerCleanupFunction(function() {
   gTab = null;
   gPanel = null;
   gDebugger = null;
   gEditor = null;
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-11.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-11.js
@@ -31,26 +31,26 @@ function test() {
       .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + DevToolsUtils.safeErrorString(aError));
       });
   });
 }
 
 function testSourceIsUgly() {
-  ok(!gEditor.getText().contains("\n  "),
+  ok(!gEditor.getText().includes("\n  "),
      "The source shouldn't be pretty printed yet.");
 }
 
 function clickPrettyPrintButton() {
   gDebugger.document.getElementById("pretty-print").click();
 }
 
 function testSourceIsPretty() {
-  ok(gEditor.getText().contains("\n  "),
+  ok(gEditor.getText().includes("\n  "),
      "The source should be pretty printed.")
 }
 
 registerCleanupFunction(function() {
   gTab = null;
   gPanel = null;
   gDebugger = null;
   gEditor = null;
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-13.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-13.js
@@ -35,45 +35,45 @@ function test() {
       .then(() => closeDebuggerAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + DevToolsUtils.safeErrorString(aError));
       });
   });
 }
 
 function testSourceIsUgly() {
-  ok(!gEditor.getText().contains("\n  "),
+  ok(!gEditor.getText().includes("\n  "),
      "The source shouldn't be pretty printed yet.");
 }
 
 function clickPrettyPrintButton() {
   gDebugger.document.getElementById("pretty-print").click();
 }
 
 function testProgressBarShown() {
   const deck = gDebugger.document.getElementById("editor-deck");
   is(deck.selectedIndex, 2, "The progress bar should be shown");
 }
 
 function testSourceIsPretty() {
-  ok(gEditor.getText().contains("\n  "),
+  ok(gEditor.getText().includes("\n  "),
      "The source should be pretty printed.")
 }
 
 function testEditorShown() {
   const deck = gDebugger.document.getElementById("editor-deck");
   is(deck.selectedIndex, 0, "The editor should be shown");
 }
 
 function testSourceIsStillPretty() {
   const deferred = promise.defer();
 
   const { source } = gSources.selectedItem.attachment;
   gDebugger.DebuggerController.SourceScripts.getText(source).then(([, text]) => {
-    ok(text.contains("\n  "),
+    ok(text.includes("\n  "),
        "Subsequent calls to getText return the pretty printed source.");
     deferred.resolve();
   });
 
   return deferred.promise;
 }
 
 registerCleanupFunction(function() {
--- a/browser/devtools/debugger/test/browser_dbg_scripts-switching-03.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-switching-03.js
@@ -31,17 +31,17 @@ function test() {
 
 function showBogusSource() {
   let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.SOURCE_ERROR_SHOWN);
   gView._setEditorSource({ url: "http://example.com/fake.js", actor: "fake.actor" });
   return finished;
 }
 
 function testDebuggerLoadingError() {
-  ok(gEditor.getText().contains(gL10N.getStr("errorLoadingText")),
+  ok(gEditor.getText().includes(gL10N.getStr("errorLoadingText")),
     "The valid error loading message is displayed.");
 }
 
 registerCleanupFunction(function() {
   gTab = null;
   gPanel = null;
   gDebugger = null;
   gView = null;
--- a/browser/devtools/debugger/test/browser_dbg_search-basic-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_search-basic-02.js
@@ -98,19 +98,19 @@ function combineWithTokenColonSearch() {
 
   return finished.then(() => promise.all([
     ensureSourceIs(gPanel, "-01.js"),
     ensureCaretAt(gPanel, 2, 11)
   ]));
 }
 
 function verifySourceAndCaret(aUrl, aLine, aColumn, aSelection) {
-  ok(gSources.selectedItem.attachment.label.contains(aUrl),
+  ok(gSources.selectedItem.attachment.label.includes(aUrl),
     "The selected item's label appears to be correct.");
-  ok(gSources.selectedItem.attachment.source.url.contains(aUrl),
+  ok(gSources.selectedItem.attachment.source.url.includes(aUrl),
     "The selected item's value appears to be correct.");
   ok(isCaretPos(gPanel, aLine, aColumn),
     "The current caret position appears to be correct.");
   ok(isEditorSel(gPanel, aSelection),
     "The current editor selection appears to be correct.");
 }
 
 registerCleanupFunction(function() {
--- a/browser/devtools/debugger/test/browser_dbg_search-basic-03.js
+++ b/browser/devtools/debugger/test/browser_dbg_search-basic-03.js
@@ -96,19 +96,19 @@ function escapeAndHide() {
 
 function escapeAndClear() {
   EventUtils.sendKey("ESCAPE", gDebugger);
   is(gSearchBox.getAttribute("value"), "",
     "The searchbox has properly emptied after pressing escape.");
 }
 
 function verifySourceAndCaret(aUrl, aLine, aColumn) {
-  ok(gSources.selectedItem.attachment.label.contains(aUrl),
+  ok(gSources.selectedItem.attachment.label.includes(aUrl),
     "The selected item's label appears to be correct.");
-  ok(gSources.selectedItem.attachment.source.url.contains(aUrl),
+  ok(gSources.selectedItem.attachment.source.url.includes(aUrl),
     "The selected item's value appears to be correct.");
   ok(isCaretPos(gPanel, aLine, aColumn),
     "The current caret position appears to be correct.");
 }
 
 registerCleanupFunction(function() {
   gTab = null;
   gPanel = null;
--- a/browser/devtools/debugger/test/browser_dbg_search-global-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_search-global-01.js
@@ -48,17 +48,17 @@ function firstSearch() {
     // Some operations are synchronously dispatched on the main thread,
     // to avoid blocking UI, thus giving the impression of faster searching.
     executeSoon(() => {
       info("Current source url:\n" + getSelectedSourceURL(gSources));
       info("Debugger editor text:\n" + gEditor.getText());
 
       ok(isCaretPos(gPanel, 6),
         "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).contains("-02.js"),
+      ok(getSelectedSourceURL(gSources).includes("-02.js"),
         "The current source shouldn't have changed after a global search.");
       is(gSources.visibleItems.length, 2,
         "Not all the sources are shown after the global search.");
 
       let sourceResults = gDebugger.document.querySelectorAll(".dbg-source-results");
       is(sourceResults.length, 2,
         "There should be matches found in two sources.");
 
@@ -162,17 +162,17 @@ function secondSearch() {
     // Some operations are synchronously dispatched on the main thread,
     // to avoid blocking UI, thus giving the impression of faster searching.
     executeSoon(() => {
       info("Current source url:\n" + getSelectedSourceURL(gSources));
       info("Debugger editor text:\n" + gEditor.getText());
 
       ok(isCaretPos(gPanel, 6),
         "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).contains("-02.js"),
+      ok(getSelectedSourceURL(gSources).includes("-02.js"),
         "The current source shouldn't have changed after a global search.");
       is(gSources.visibleItems.length, 2,
         "Not all the sources are shown after the global search.");
 
       let sourceResults = gDebugger.document.querySelectorAll(".dbg-source-results");
       is(sourceResults.length, 2,
         "There should be matches found in two sources.");
 
--- a/browser/devtools/debugger/test/browser_dbg_search-global-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_search-global-02.js
@@ -51,17 +51,17 @@ function firstSearch() {
     // Some operations are synchronously dispatched on the main thread,
     // to avoid blocking UI, thus giving the impression of faster searching.
     executeSoon(() => {
       info("Current source url:\n" + getSelectedSourceURL(gSources));
       info("Debugger editor text:\n" + gEditor.getText());
 
       ok(isCaretPos(gPanel, 6),
         "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).contains("-02.js"),
+      ok(getSelectedSourceURL(gSources).includes("-02.js"),
         "The current source shouldn't have changed after a global search.");
       is(gSources.visibleItems.length, 2,
         "Not all the sources are shown after the global search.");
 
       deferred.resolve();
     });
   });
 
@@ -72,17 +72,17 @@ function firstSearch() {
 
 function doFirstJump() {
   let deferred = promise.defer();
 
   waitForSourceAndCaret(gPanel, "-01.js", 4).then(() => {
     info("Current source url:\n" + getSelectedSourceURL(gSources));
     info("Debugger editor text:\n" + gEditor.getText());
 
-    ok(getSelectedSourceURL(gSources).contains("-01.js"),
+    ok(getSelectedSourceURL(gSources).includes("-01.js"),
       "The currently shown source is incorrect (1).");
     is(gSources.visibleItems.length, 2,
       "Not all the sources are shown after the global search (1).");
 
     // The editor's selected text takes a tick to update.
     executeSoon(() => {
       ok(isCaretPos(gPanel, 4, 9),
         "The editor didn't jump to the correct line (1).");
@@ -100,17 +100,17 @@ function doFirstJump() {
 
 function doSecondJump() {
   let deferred = promise.defer();
 
   waitForSourceAndCaret(gPanel, "-02.js", 4).then(() => {
     info("Current source url:\n" + getSelectedSourceURL(gSources));
     info("Debugger editor text:\n" + gEditor.getText());
 
-    ok(getSelectedSourceURL(gSources).contains("-02.js"),
+    ok(getSelectedSourceURL(gSources).includes("-02.js"),
       "The currently shown source is incorrect (2).");
     is(gSources.visibleItems.length, 2,
       "Not all the sources are shown after the global search (2).");
 
     // The editor's selected text takes a tick to update.
     executeSoon(() => {
       ok(isCaretPos(gPanel, 4, 9),
         "The editor didn't jump to the correct line (2).");
@@ -128,17 +128,17 @@ function doSecondJump() {
 
 function doWrapAroundJump() {
   let deferred = promise.defer();
 
   waitForSourceAndCaret(gPanel, "-01.js", 4).then(() => {
     info("Current source url:\n" + getSelectedSourceURL(gSources));
     info("Debugger editor text:\n" + gEditor.getText());
 
-    ok(getSelectedSourceURL(gSources).contains("-01.js"),
+    ok(getSelectedSourceURL(gSources).includes("-01.js"),
       "The currently shown source is incorrect (3).");
     is(gSources.visibleItems.length, 2,
       "Not all the sources are shown after the global search (3).");
 
     // The editor's selected text takes a tick to update.
     executeSoon(() => {
       ok(isCaretPos(gPanel, 4, 9),
         "The editor didn't jump to the correct line (3).");
@@ -157,17 +157,17 @@ function doWrapAroundJump() {
 
 function doBackwardsWrapAroundJump() {
   let deferred = promise.defer();
 
   waitForSourceAndCaret(gPanel, "-02.js", 7).then(() => {
     info("Current source url:\n" + getSelectedSourceURL(gSources));
     info("Debugger editor text:\n" + gEditor.getText());
 
-    ok(getSelectedSourceURL(gSources).contains("-02.js"),
+    ok(getSelectedSourceURL(gSources).includes("-02.js"),
       "The currently shown source is incorrect (4).");
     is(gSources.visibleItems.length, 2,
       "Not all the sources are shown after the global search (4).");
 
     // The editor's selected text takes a tick to update.
     executeSoon(() => {
       ok(isCaretPos(gPanel, 7, 11),
         "The editor didn't jump to the correct line (4).");
@@ -184,17 +184,17 @@ function doBackwardsWrapAroundJump() {
 }
 
 function testSearchTokenEmpty() {
   backspaceText(gSearchBox, 4);
 
   info("Current source url:\n" + getSelectedSourceURL(gSources));
   info("Debugger editor text:\n" + gEditor.getText());
 
-  ok(getSelectedSourceURL(gSources).contains("-02.js"),
+  ok(getSelectedSourceURL(gSources).includes("-02.js"),
     "The currently shown source is incorrect (4).");
   is(gSources.visibleItems.length, 2,
     "Not all the sources are shown after the global search (4).");
   ok(isCaretPos(gPanel, 7, 11),
     "The editor didn't remain at the correct line (4).");
   is(gEditor.getSelection(), "",
     "The editor shouldn't keep the previous text selected (4).");
 
--- a/browser/devtools/debugger/test/browser_dbg_search-global-03.js
+++ b/browser/devtools/debugger/test/browser_dbg_search-global-03.js
@@ -47,17 +47,17 @@ function firstSearch() {
     // Some operations are synchronously dispatched on the main thread,
     // to avoid blocking UI, thus giving the impression of faster searching.
     executeSoon(() => {
       info("Current source url:\n" + getSelectedSourceURL(gSources));
       info("Debugger editor text:\n" + gEditor.getText());
 
       ok(isCaretPos(gPanel, 6),
         "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).contains("-02.js"),
+      ok(getSelectedSourceURL(gSources).includes("-02.js"),
         "The current source shouldn't have changed after a global search.");
       is(gSources.visibleItems.length, 2,
         "Not all the sources are shown after the global search.");
 
       deferred.resolve();
     });
   });
 
--- a/browser/devtools/debugger/test/browser_dbg_search-global-04.js
+++ b/browser/devtools/debugger/test/browser_dbg_search-global-04.js
@@ -40,17 +40,17 @@ function firstSearch() {
     // Some operations are synchronously dispatched on the main thread,
     // to avoid blocking UI, thus giving the impression of faster searching.
     executeSoon(() => {
       info("Current source url:\n" + getSelectedSourceURL(gSources));
       info("Debugger editor text:\n" + gEditor.getText());
 
       ok(isCaretPos(gPanel, 6),
         "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).contains("-02.js"),
+      ok(getSelectedSourceURL(gSources).includes("-02.js"),
         "The current source shouldn't have changed after a global search.");
       is(gSources.visibleItems.length, 2,
         "Not all the sources are shown after the global search.");
 
       deferred.resolve();
     });
   });
 
@@ -63,17 +63,17 @@ function secondSearch() {
   let deferred = promise.defer();
 
   gDebugger.once(gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_NOT_FOUND, () => {
     info("Current source url:\n" + getSelectedSourceURL(gSources));
     info("Debugger editor text:\n" + gEditor.getText());
 
     ok(isCaretPos(gPanel, 6),
       "The editor shouldn't have jumped to a matching line yet.");
-    ok(getSelectedSourceURL(gSources).contains("-02.js"),
+    ok(getSelectedSourceURL(gSources).includes("-02.js"),
       "The current source shouldn't have changed after a global search.");
     is(gSources.visibleItems.length, 2,
       "Not all the sources are shown after the global search.");
 
     deferred.resolve();
   });
 
   typeText(gSearchBox, "/");
--- a/browser/devtools/debugger/test/browser_dbg_search-global-05.js
+++ b/browser/devtools/debugger/test/browser_dbg_search-global-05.js
@@ -43,17 +43,17 @@ function doSearch() {
     // Some operations are synchronously dispatched on the main thread,
     // to avoid blocking UI, thus giving the impression of faster searching.
     executeSoon(() => {
       info("Current source url:\n" + getSelectedSourceURL(gSources));
       info("Debugger editor text:\n" + gEditor.getText());
 
       ok(isCaretPos(gPanel, 6),
         "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).contains("-02.js"),
+      ok(getSelectedSourceURL(gSources).includes("-02.js"),
         "The current source shouldn't have changed after a global search.");
       is(gSources.visibleItems.length, 2,
         "Not all the sources are shown after the global search.");
 
       deferred.resolve();
     });
   });
 
@@ -96,17 +96,17 @@ function testClickLineToJump() {
   waitForSourceAndCaret(gPanel, "-01.js", 1, 1).then(() => {
     info("Current source url:\n" + getSelectedSourceURL(gSources));
     info("Debugger editor text:\n" + gEditor.getText());
 
     ok(isCaretPos(gPanel, 1, 1),
       "The editor didn't jump to the correct line (1).");
     is(gEditor.getSelection(), "",
       "The editor didn't select the correct text (1).");
-    ok(getSelectedSourceURL(gSources).contains("-01.js"),
+    ok(getSelectedSourceURL(gSources).includes("-01.js"),
       "The currently shown source is incorrect (1).");
     is(gSources.visibleItems.length, 2,
       "Not all the sources are shown after the global search (1).");
 
     deferred.resolve();
   });
 
   EventUtils.sendMouseEvent({ type: "click" }, firstLine);
@@ -125,17 +125,17 @@ function testClickMatchToJump() {
   waitForSourceAndCaret(gPanel, "-02.js", 1, 1).then(() => {
     info("Current source url:\n" + getSelectedSourceURL(gSources));
     info("Debugger editor text:\n" + gEditor.getText());
 
     ok(isCaretPos(gPanel, 1, 1),
       "The editor didn't jump to the correct line (2).");
     is(gEditor.getSelection(), "",
       "The editor didn't select the correct text (2).");
-    ok(getSelectedSourceURL(gSources).contains("-02.js"),
+    ok(getSelectedSourceURL(gSources).includes("-02.js"),
       "The currently shown source is incorrect (2).");
     is(gSources.visibleItems.length, 2,
       "Not all the sources are shown after the global search (2).");
 
     deferred.resolve();
   });
 
   EventUtils.sendMouseEvent({ type: "click" }, lastMatch);
--- a/browser/devtools/debugger/test/browser_dbg_search-global-06.js
+++ b/browser/devtools/debugger/test/browser_dbg_search-global-06.js
@@ -49,17 +49,17 @@ function doSearch() {
     // Some operations are synchronously dispatched on the main thread,
     // to avoid blocking UI, thus giving the impression of faster searching.
     executeSoon(() => {
       info("Current source url:\n" + getSelectedSourceURL(gSources));
       info("Debugger editor text:\n" + gEditor.getText());
 
       ok(isCaretPos(gPanel, 6),
         "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).contains("-02.js"),
+      ok(getSelectedSourceURL(gSources).includes("-02.js"),
         "The current source shouldn't have changed after a global search.");
       is(gSources.visibleItems.length, 2,
         "Not all the sources are shown after the global search.");
 
       deferred.resolve();
     });
   });
 
--- a/browser/devtools/debugger/test/browser_dbg_search-symbols.js
+++ b/browser/devtools/debugger/test/browser_dbg_search-symbols.js
@@ -68,17 +68,17 @@ function htmlSearch() {
           is(target.querySelector(".results-panel-item-label").getAttribute("value"),
             gDebugger.SourceUtils.trimUrlLength(label + "()"),
             "The corect label (" + label + ") is currently selected.");
         } else {
           ok(!target.querySelector(".results-panel-item-label"),
             "Shouldn't create empty label nodes.");
         }
         if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").contains(value),
+          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
             "The corect value (" + value + ") is attached.");
         } else {
           ok(!target.querySelector(".results-panel-item-label-below"),
             "Shouldn't create empty label nodes.");
         }
         if (description) {
           is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
             "The corect description (" + description + ") is currently shown.");
@@ -139,17 +139,17 @@ function firstJsSearch() {
           is(target.querySelector(".results-panel-item-label").getAttribute("value"),
             gDebugger.SourceUtils.trimUrlLength(label + "()"),
             "The corect label (" + label + ") is currently selected.");
         } else {
           ok(!target.querySelector(".results-panel-item-label"),
             "Shouldn't create empty label nodes.");
         }
         if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").contains(value),
+          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
             "The corect value (" + value + ") is attached.");
         } else {
           ok(!target.querySelector(".results-panel-item-label-below"),
             "Shouldn't create empty label nodes.");
         }
         if (description) {
           is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
             "The corect description (" + description + ") is currently shown.");
@@ -210,17 +210,17 @@ function secondJsSearch() {
           is(target.querySelector(".results-panel-item-label").getAttribute("value"),
             gDebugger.SourceUtils.trimUrlLength(label + "()"),
             "The corect label (" + label + ") is currently selected.");
         } else {
           ok(!target.querySelector(".results-panel-item-label"),
             "Shouldn't create empty label nodes.");
         }
         if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").contains(value),
+          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
             "The corect value (" + value + ") is attached.");
         } else {
           ok(!target.querySelector(".results-panel-item-label-below"),
             "Shouldn't create empty label nodes.");
         }
         if (description) {
           is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
             "The corect description (" + description + ") is currently shown.");
@@ -281,17 +281,17 @@ function thirdJsSearch() {
           is(target.querySelector(".results-panel-item-label").getAttribute("value"),
             gDebugger.SourceUtils.trimUrlLength(label + "()"),
             "The corect label (" + label + ") is currently selected.");
         } else {
           ok(!target.querySelector(".results-panel-item-label"),
             "Shouldn't create empty label nodes.");
         }
         if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").contains(value),
+          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
             "The corect value (" + value + ") is attached.");
         } else {
           ok(!target.querySelector(".results-panel-item-label-below"),
             "Shouldn't create empty label nodes.");
         }
         if (description) {
           is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
             "The corect description (" + description + ") is currently shown.");
@@ -349,17 +349,17 @@ function filterSearch() {
           is(target.querySelector(".results-panel-item-label").getAttribute("value"),
             gDebugger.SourceUtils.trimUrlLength(label + "()"),
             "The corect label (" + label + ") is currently selected.");
         } else {
           ok(!target.querySelector(".results-panel-item-label"),
             "Shouldn't create empty label nodes.");
         }
         if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").contains(value),
+          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
             "The corect value (" + value + ") is attached.");
         } else {
           ok(!target.querySelector(".results-panel-item-label-below"),
             "Shouldn't create empty label nodes.");
         }
         if (description) {
           is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
             "The corect description (" + description + ") is currently shown.");
--- a/browser/devtools/debugger/test/browser_dbg_sources-cache.js
+++ b/browser/devtools/debugger/test/browser_dbg_sources-cache.js
@@ -31,53 +31,53 @@ function test() {
       .then(() => closeDebuggerAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
       });
   });
 }
 
 function initialChecks() {
-  ok(gEditor.getText().contains("First source!"),
+  ok(gEditor.getText().includes("First source!"),
     "Editor text contents appears to be correct.");
   is(gSources.selectedItem.attachment.label, "code_function-search-01.js",
     "The currently selected label in the sources container is correct.");
-  ok(getSelectedSourceURL(gSources).contains("code_function-search-01.js"),
+  ok(getSelectedSourceURL(gSources).includes("code_function-search-01.js"),
     "The currently selected value in the sources container appears to be correct.");
 
   is(gSources.itemCount, TOTAL_SOURCES,
     "There should be " + TOTAL_SOURCES + " sources present in the sources list.");
   is(gSources.visibleItems.length, TOTAL_SOURCES,
     "There should be " + TOTAL_SOURCES + " sources visible in the sources list.");
   is(gSources.attachments.length, TOTAL_SOURCES,
     "There should be " + TOTAL_SOURCES + " attachments stored in the sources container model.")
   is(gSources.values.length, TOTAL_SOURCES,
     "There should be " + TOTAL_SOURCES + " values stored in the sources container model.")
 
   info("Source labels: " + gSources.attachments.toSource());
   info("Source values: " + gSources.values.toSource());
 
   is(gSources.attachments[0].label, "code_function-search-01.js",
     "The first source label is correct.");
-  ok(gSources.attachments[0].source.url.contains("code_function-search-01.js"),
+  ok(gSources.attachments[0].source.url.includes("code_function-search-01.js"),
     "The first source value appears to be correct.");
 
   is(gSources.attachments[1].label, "code_function-search-02.js",
     "The second source label is correct.");
-  ok(gSources.attachments[1].source.url.contains("code_function-search-02.js"),
+  ok(gSources.attachments[1].source.url.includes("code_function-search-02.js"),
     "The second source value appears to be correct.");
 
   is(gSources.attachments[2].label, "code_function-search-03.js",
     "The third source label is correct.");
-  ok(gSources.attachments[2].source.url.contains("code_function-search-03.js"),
+  ok(gSources.attachments[2].source.url.includes("code_function-search-03.js"),
     "The third source value appears to be correct.");
 
   is(gSources.attachments[3].label, "doc_function-search.html",
     "The third source label is correct.");
-  ok(gSources.attachments[3].source.url.contains("doc_function-search.html"),
+  ok(gSources.attachments[3].source.url.includes("doc_function-search.html"),
     "The third source value appears to be correct.");
 
   is(gDebugger.SourceUtils._labelsCache.size, TOTAL_SOURCES,
     "There should be " + TOTAL_SOURCES + " labels cached.");
   is(gDebugger.SourceUtils._groupsCache.size, TOTAL_SOURCES,
     "There should be " + TOTAL_SOURCES + " groups cached.");
 }
 
@@ -93,17 +93,17 @@ function performReloadAndTestState() {
 
 function testCacheIntegrity(aSources) {
   for (let [actor, contents] of aSources) {
     // Sources of a debugee don't always finish fetching consecutively. D'uh.
     let index = gSources.values.indexOf(actor);
 
     ok(index >= 0 && index <= TOTAL_SOURCES,
       "Found a source actor cached correctly (" + index + ").");
-    ok(contents.contains(
+    ok(contents.includes(
       ["First source!", "Second source!", "Third source!", "Peanut butter jelly time!"][index]),
       "Found a source's text contents cached correctly (" + index + ").");
 
     info("Cached source actor at " + index + ": " + actor);
     info("Cached source text at " + index + ": " + contents);
   }
 }
 
--- a/browser/devtools/debugger/test/browser_dbg_tabactor-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_tabactor-01.js
@@ -37,17 +37,17 @@ function test() {
   });
 }
 
 function testTabActor([aGrip, aResponse]) {
   let deferred = promise.defer();
 
   ok(aGrip.testTabActor1,
     "Found the test tab actor.");
-  ok(aGrip.testTabActor1.contains("test_one"),
+  ok(aGrip.testTabActor1.includes("test_one"),
     "testTabActor1's actorPrefix should be used.");
 
   gClient.request({ to: aGrip.testTabActor1, type: "ping" }, aResponse => {
     is(aResponse.pong, "pong",
       "Actor should respond to requests.");
 
     deferred.resolve();
   });
--- a/browser/devtools/debugger/test/browser_dbg_tabactor-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_tabactor-02.js
@@ -37,17 +37,17 @@ function test() {
   });
 }
 
 function testTabActor([aGrip, aResponse]) {
   let deferred = promise.defer();
 
   ok(aGrip.testTabActor1,
     "Found the test tab actor.");
-  ok(aGrip.testTabActor1.contains("test_one"),
+  ok(aGrip.testTabActor1.includes("test_one"),
     "testTabActor1's actorPrefix should be used.");
 
   gClient.request({ to: aGrip.testTabActor1, type: "ping" }, aResponse => {
     is(aResponse.pong, "pong",
       "Actor should respond to requests.");
 
     deferred.resolve(aResponse.actor);
   });
--- a/browser/devtools/debugger/test/browser_dbg_tracing-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_tracing-01.js
@@ -44,24 +44,24 @@ function testTraceLogs() {
                                    t => t.querySelector(".trace-name[value=onclick]"));
   is(onclickLogs.length, 2, "Should have two logs from 'onclick'");
   ok(onclickLogs[0].querySelector(".trace-call"),
      "The first 'onclick' log should be a call.");
   ok(onclickLogs[1].querySelector(".trace-return"),
      "The second 'onclick' log should be a return.");
   for (let t of onclickLogs) {
     ok(t.querySelector(".trace-item").getAttribute("tooltiptext")
-        .contains("doc_tracing-01.html"));
+        .includes("doc_tracing-01.html"));
   }
 
   const nonOnclickLogs = filterTraces(gPanel,
                                       t => !t.querySelector(".trace-name[value=onclick]"));
   for (let t of nonOnclickLogs) {
     ok(t.querySelector(".trace-item").getAttribute("tooltiptext")
-        .contains("code_tracing-01.js"));
+        .includes("code_tracing-01.js"));
   }
 
   const mainLogs = filterTraces(gPanel,
                                 t => t.querySelector(".trace-name[value=main]"));
   is(mainLogs.length, 2, "Should have an enter and an exit for 'main'");
   ok(mainLogs[0].querySelector(".trace-call"),
      "The first 'main' log should be a call.");
   ok(mainLogs[1].querySelector(".trace-return"),
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-01.js
@@ -10,29 +10,29 @@ const TAB_URL = EXAMPLE_URL + "doc_recur
 
 function test() {
   initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
     let variables = aPanel.panelWin.DebuggerView.Variables;
     let testScope = variables.addScope("test");
 
     ok(testScope,
       "Should have created a scope.");
-    ok(testScope.id.contains("test"),
+    ok(testScope.id.includes("test"),
       "The newly created scope should have the default id set.");
     is(testScope.name, "test",
       "The newly created scope should have the desired name set.");
 
     ok(!testScope.displayValue,
       "The newly created scope should not have a displayed value (1).");
     ok(!testScope.displayValueClassName,
       "The newly created scope should not have a displayed value (2).");
 
     ok(testScope.target,
       "The newly created scope should point to a target node.");
-    ok(testScope.target.id.contains("test"),
+    ok(testScope.target.id.includes("test"),
       "Should have the correct scope id on the element.");
 
     is(testScope.target.querySelector(".name").getAttribute("value"), "test",
       "Any new scope should have the designated name.");
     is(testScope.target.querySelector(".variables-view-element-details.enum").childNodes.length, 0,
       "Any new scope should have a container with no enumerable child nodes.");
     is(testScope.target.querySelector(".variables-view-element-details.nonenum").childNodes.length, 0,
       "Any new scope should have a container with no non-enumerable child nodes.");
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-02.js
@@ -22,29 +22,29 @@ function test() {
 
     ok(testScope,
       "Should have created a scope.");
     is(duplVar, null,
       "Shouldn't be able to duplicate variables in the same scope.");
 
     ok(testVar,
       "Should have created a variable.");
-    ok(testVar.id.contains("something"),
+    ok(testVar.id.includes("something"),
       "The newly created variable should have the default id set.");
     is(testVar.name, "something",
       "The newly created variable should have the desired name set.");
 
     ok(!testVar.displayValue,
       "The newly created variable should not have a displayed value yet (1).");
     ok(!testVar.displayValueClassName,
       "The newly created variable should not have a displayed value yet (2).");
 
     ok(testVar.target,
       "The newly created scope should point to a target node.");
-    ok(testVar.target.id.contains("something"),
+    ok(testVar.target.id.includes("something"),
       "Should have the correct variable id on the element.");
 
     is(testVar.target.querySelector(".name").getAttribute("value"), "something",
       "Any new variable should have the designated name.");
     is(testVar.target.querySelector(".variables-view-element-details.enum").childNodes.length, 0,
       "Any new variable should have a container with no enumerable child nodes.");
     is(testVar.target.querySelector(".variables-view-element-details.nonenum").childNodes.length, 0,
       "Any new variable should have a container with no non-enumerable child nodes.");
@@ -152,29 +152,29 @@ function test() {
         type: "object",
         class: "Object"
       }
     });
 
     let testChild = testVar.get("child");
     ok(testChild,
       "Should have created a child property.");
-    ok(testChild.id.contains("child"),
+    ok(testChild.id.includes("child"),
       "The newly created property should have the default id set.");
     is(testChild.name, "child",
       "The newly created property should have the desired name set.");
 
     is(testChild.displayValue, "Object",
       "The newly created property should not have a displayed value yet (1).");
     is(testChild.displayValueClassName, "token-other",
       "The newly created property should not have a displayed value yet (2).");
 
     ok(testChild.target,
       "The newly created scope should point to a target node.");
-    ok(testChild.target.id.contains("child"),
+    ok(testChild.target.id.includes("child"),
       "Should have the correct property id on the element.");
 
     is(testChild.target.querySelector(".name").getAttribute("value"), "child",
       "Any new property should have the designated name.");
     is(testChild.target.querySelector(".variables-view-element-details.enum").childNodes.length, 0,
       "Any new property should have a container with no enumerable child nodes.");
     is(testChild.target.querySelector(".variables-view-element-details.nonenum").childNodes.length, 0,
       "Any new property should have a container with no non-enumerable child nodes.");
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-frame-parameters-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-frame-parameters-01.js
@@ -33,19 +33,19 @@ function test() {
   });
 }
 
 function initialChecks() {
   let scopeNodes = gDebugger.document.querySelectorAll(".variables-view-scope");
   is(scopeNodes.length, 2,
     "There should be 2 scopes available.");
 
-  ok(scopeNodes[0].querySelector(".name").getAttribute("value").contains("[test]"),
+  ok(scopeNodes[0].querySelector(".name").getAttribute("value").includes("[test]"),
     "The local scope should be properly identified.");
-  ok(scopeNodes[1].querySelector(".name").getAttribute("value").contains("[Window]"),
+  ok(scopeNodes[1].querySelector(".name").getAttribute("value").includes("[Window]"),
     "The global scope should be properly identified.");
 
   is(gVariables.getScopeAtIndex(0).target, scopeNodes[0],
     "getScopeAtIndex(0) didn't return the expected scope.");
   is(gVariables.getScopeAtIndex(1).target, scopeNodes[1],
     "getScopeAtIndex(1) didn't return the expected scope.");
 
   is(gVariables.getItemForNode(scopeNodes[0]).target, scopeNodes[0],
@@ -84,64 +84,64 @@ function testExpandVariables() {
     "The cVar should not be expanded at this point.");
 
   waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_PROPERTIES, 3).then(() => {
     is(thisVar.get("window").target.querySelector(".name").getAttribute("value"), "window",
       "Should have the right property name for 'window'.");
     is(thisVar.get("window").target.querySelector(".value").getAttribute("value"),
       "Window \u2192 doc_frame-parameters.html",
       "Should have the right property value for 'window'.");
-    ok(thisVar.get("window").target.querySelector(".value").className.contains("token-other"),
+    ok(thisVar.get("window").target.querySelector(".value").className.includes("token-other"),
       "Should have the right token class for 'window'.");
 
     is(thisVar.get("document").target.querySelector(".name").getAttribute("value"), "document",
       "Should have the right property name for 'document'.");
     is(thisVar.get("document").target.querySelector(".value").getAttribute("value"),
       "HTMLDocument \u2192 doc_frame-parameters.html",
       "Should have the right property value for 'document'.");
-    ok(thisVar.get("document").target.querySelector(".value").className.contains("token-domnode"),
+    ok(thisVar.get("document").target.querySelector(".value").className.includes("token-domnode"),
       "Should have the right token class for 'document'.");
 
     let argsProps = argsVar.target.querySelectorAll(".variables-view-property");
     is(argsProps.length, 8,
       "The 'arguments' variable should contain 5 enumerable and 3 non-enumerable properties");
 
     is(argsProps[0].querySelector(".name").getAttribute("value"), "0",
       "Should have the right property name for '0'.");
     is(argsProps[0].querySelector(".value").getAttribute("value"), "Object",
       "Should have the right property value for '0'.");
-    ok(argsProps[0].querySelector(".value").className.contains("token-other"),
+    ok(argsProps[0].querySelector(".value").className.includes("token-other"),
       "Should have the right token class for '0'.");
 
     is(argsProps[1].querySelector(".name").getAttribute("value"), "1",
       "Should have the right property name for '1'.");
     is(argsProps[1].querySelector(".value").getAttribute("value"), "\"beta\"",
       "Should have the right property value for '1'.");
-    ok(argsProps[1].querySelector(".value").className.contains("token-string"),
+    ok(argsProps[1].querySelector(".value").className.includes("token-string"),
       "Should have the right token class for '1'.");
 
     is(argsProps[2].querySelector(".name").getAttribute("value"), "2",
       "Should have the right property name for '2'.");
     is(argsProps[2].querySelector(".value").getAttribute("value"), "3",
       "Should have the right property name for '2'.");
-    ok(argsProps[2].querySelector(".value").className.contains("token-number"),
+    ok(argsProps[2].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for '2'.");
 
     is(argsProps[3].querySelector(".name").getAttribute("value"), "3",
       "Should have the right property name for '3'.");
     is(argsProps[3].querySelector(".value").getAttribute("value"), "false",
       "Should have the right property value for '3'.");
-    ok(argsProps[3].querySelector(".value").className.contains("token-boolean"),
+    ok(argsProps[3].querySelector(".value").className.includes("token-boolean"),
       "Should have the right token class for '3'.");
 
     is(argsProps[4].querySelector(".name").getAttribute("value"), "4",
       "Should have the right property name for '4'.");
     is(argsProps[4].querySelector(".value").getAttribute("value"), "null",
       "Should have the right property name for '4'.");
-    ok(argsProps[4].querySelector(".value").className.contains("token-null"),
+    ok(argsProps[4].querySelector(".value").className.includes("token-null"),
       "Should have the right token class for '4'.");
 
     is(gVariables.getItemForNode(argsProps[0]).target,
        argsVar.target.querySelectorAll(".variables-view-property")[0],
       "getItemForNode([0]) didn't return the expected property.");
 
     is(gVariables.getItemForNode(argsProps[1]).target,
        argsVar.target.querySelectorAll(".variables-view-property")[1],
@@ -166,52 +166,52 @@ function testExpandVariables() {
     let cProps = cVar.target.querySelectorAll(".variables-view-property");
     is(cProps.length, 7,
       "The 'c' variable should contain 6 enumerable and 1 non-enumerable properties");
 
     is(cProps[0].querySelector(".name").getAttribute("value"), "a",
       "Should have the right property name for 'a'.");
     is(cProps[0].querySelector(".value").getAttribute("value"), "1",
       "Should have the right property value for 'a'.");
-    ok(cProps[0].querySelector(".value").className.contains("token-number"),
+    ok(cProps[0].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'a'.");
 
     is(cProps[1].querySelector(".name").getAttribute("value"), "b",
       "Should have the right property name for 'b'.");
     is(cProps[1].querySelector(".value").getAttribute("value"), "\"beta\"",
       "Should have the right property value for 'b'.");
-    ok(cProps[1].querySelector(".value").className.contains("token-string"),
+    ok(cProps[1].querySelector(".value").className.includes("token-string"),
       "Should have the right token class for 'b'.");
 
     is(cProps[2].querySelector(".name").getAttribute("value"), "c",
       "Should have the right property name for 'c'.");
     is(cProps[2].querySelector(".value").getAttribute("value"), "3",
       "Should have the right property value for 'c'.");
-    ok(cProps[2].querySelector(".value").className.contains("token-number"),
+    ok(cProps[2].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'c'.");
 
     is(cProps[3].querySelector(".name").getAttribute("value"), "d",
       "Should have the right property name for 'd'.");
     is(cProps[3].querySelector(".value").getAttribute("value"), "false",
       "Should have the right property value for 'd'.");
-    ok(cProps[3].querySelector(".value").className.contains("token-boolean"),
+    ok(cProps[3].querySelector(".value").className.includes("token-boolean"),
       "Should have the right token class for 'd'.");
 
     is(cProps[4].querySelector(".name").getAttribute("value"), "e",
       "Should have the right property name for 'e'.");
     is(cProps[4].querySelector(".value").getAttribute("value"), "null",
       "Should have the right property value for 'e'.");
-    ok(cProps[4].querySelector(".value").className.contains("token-null"),
+    ok(cProps[4].querySelector(".value").className.includes("token-null"),
       "Should have the right token class for 'e'.");
 
     is(cProps[5].querySelector(".name").getAttribute("value"), "f",
       "Should have the right property name for 'f'.");
     is(cProps[5].querySelector(".value").getAttribute("value"), "undefined",
       "Should have the right property value for 'f'.");
-    ok(cProps[5].querySelector(".value").className.contains("token-undefined"),
+    ok(cProps[5].querySelector(".value").className.includes("token-undefined"),
       "Should have the right token class for 'f'.");
 
     is(gVariables.getItemForNode(cProps[0]).target,
        cVar.target.querySelectorAll(".variables-view-property")[0],
       "getItemForNode([0]) didn't return the expected property.");
 
     is(gVariables.getItemForNode(cProps[1]).target,
        cVar.target.querySelectorAll(".variables-view-property")[1],
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-frame-parameters-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-frame-parameters-02.js
@@ -51,94 +51,94 @@ function testScopeVariables() {
   is(localNonEnums.length, 0,
     "The local scope should contain all the created non-enumerable elements.");
 
   is(localEnums[0].querySelector(".name").getAttribute("value"), "this",
     "Should have the right property name for 'this'.");
   is(localEnums[0].querySelector(".value").getAttribute("value"),
     "Window \u2192 doc_frame-parameters.html",
     "Should have the right property value for 'this'.");
-  ok(localEnums[0].querySelector(".value").className.contains("token-other"),
+  ok(localEnums[0].querySelector(".value").className.includes("token-other"),
     "Should have the right token class for 'this'.");
 
   is(localEnums[1].querySelector(".name").getAttribute("value"), "aArg",
     "Should have the right property name for 'aArg'.");
   is(localEnums[1].querySelector(".value").getAttribute("value"), "Object",
     "Should have the right property value for 'aArg'.");
-  ok(localEnums[1].querySelector(".value").className.contains("token-other"),
+  ok(localEnums[1].querySelector(".value").className.includes("token-other"),
     "Should have the right token class for 'aArg'.");
 
   is(localEnums[2].querySelector(".name").getAttribute("value"), "bArg",
     "Should have the right property name for 'bArg'.");
   is(localEnums[2].querySelector(".value").getAttribute("value"), "\"beta\"",
     "Should have the right property value for 'bArg'.");
-  ok(localEnums[2].querySelector(".value").className.contains("token-string"),
+  ok(localEnums[2].querySelector(".value").className.includes("token-string"),
     "Should have the right token class for 'bArg'.");
 
   is(localEnums[3].querySelector(".name").getAttribute("value"), "cArg",
     "Should have the right property name for 'cArg'.");
   is(localEnums[3].querySelector(".value").getAttribute("value"), "3",
     "Should have the right property value for 'cArg'.");
-  ok(localEnums[3].querySelector(".value").className.contains("token-number"),
+  ok(localEnums[3].querySelector(".value").className.includes("token-number"),
     "Should have the right token class for 'cArg'.");
 
   is(localEnums[4].querySelector(".name").getAttribute("value"), "dArg",
     "Should have the right property name for 'dArg'.");
   is(localEnums[4].querySelector(".value").getAttribute("value"), "false",
     "Should have the right property value for 'dArg'.");
-  ok(localEnums[4].querySelector(".value").className.contains("token-boolean"),
+  ok(localEnums[4].querySelector(".value").className.includes("token-boolean"),
     "Should have the right token class for 'dArg'.");
 
   is(localEnums[5].querySelector(".name").getAttribute("value"), "eArg",
     "Should have the right property name for 'eArg'.");
   is(localEnums[5].querySelector(".value").getAttribute("value"), "null",
     "Should have the right property value for 'eArg'.");
-  ok(localEnums[5].querySelector(".value").className.contains("token-null"),
+  ok(localEnums[5].querySelector(".value").className.includes("token-null"),
     "Should have the right token class for 'eArg'.");
 
   is(localEnums[6].querySelector(".name").getAttribute("value"), "fArg",
     "Should have the right property name for 'fArg'.");
   is(localEnums[6].querySelector(".value").getAttribute("value"), "undefined",
     "Should have the right property value for 'fArg'.");
-  ok(localEnums[6].querySelector(".value").className.contains("token-undefined"),
+  ok(localEnums[6].querySelector(".value").className.includes("token-undefined"),
     "Should have the right token class for 'fArg'.");
 
   is(localEnums[7].querySelector(".name").getAttribute("value"), "a",
    "Should have the right property name for 'a'.");
   is(localEnums[7].querySelector(".value").getAttribute("value"), "1",
    "Should have the right property value for 'a'.");
-  ok(localEnums[7].querySelector(".value").className.contains("token-number"),
+  ok(localEnums[7].querySelector(".value").className.includes("token-number"),
    "Should have the right token class for 'a'.");
 
   is(localEnums[8].querySelector(".name").getAttribute("value"), "arguments",
     "Should have the right property name for 'arguments'.");
   is(localEnums[8].querySelector(".value").getAttribute("value"), "Arguments",
     "Should have the right property value for 'arguments'.");
-  ok(localEnums[8].querySelector(".value").className.contains("token-other"),
+  ok(localEnums[8].querySelector(".value").className.includes("token-other"),
     "Should have the right token class for 'arguments'.");
 
   is(localEnums[9].querySelector(".name").getAttribute("value"), "b",
    "Should have the right property name for 'b'.");
   is(localEnums[9].querySelector(".value").getAttribute("value"), "Object",
    "Should have the right property value for 'b'.");
-  ok(localEnums[9].querySelector(".value").className.contains("token-other"),
+  ok(localEnums[9].querySelector(".value").className.includes("token-other"),
    "Should have the right token class for 'b'.");
 
   is(localEnums[10].querySelector(".name").getAttribute("value"), "c",
    "Should have the right property name for 'c'.");
   is(localEnums[10].querySelector(".value").getAttribute("value"), "Object",
    "Should have the right property value for 'c'.");
-  ok(localEnums[10].querySelector(".value").className.contains("token-other"),
+  ok(localEnums[10].querySelector(".value").className.includes("token-other"),
    "Should have the right token class for 'c'.");
 
   is(localEnums[11].querySelector(".name").getAttribute("value"), "myVar",
    "Should have the right property name for 'myVar'.");
   is(localEnums[11].querySelector(".value").getAttribute("value"), "Object",
    "Should have the right property value for 'myVar'.");
-  ok(localEnums[11].querySelector(".value").className.contains("token-other"),
+  ok(localEnums[11].querySelector(".value").className.includes("token-other"),
    "Should have the right token class for 'myVar'.");
 }
 
 function testArgumentsProperties() {
   let deferred = promise.defer();
 
   let argsVar = gVariables.getScopeAtIndex(0).get("arguments");
   is(argsVar.expanded, false,
@@ -152,67 +152,67 @@ function testArgumentsProperties() {
       "The 'arguments' variable should contain all the created enumerable elements.");
     is(argsNonEnums.length, 3,
       "The 'arguments' variable should contain all the created non-enumerable elements.");
 
     is(argsEnums[0].querySelector(".name").getAttribute("value"), "0",
       "Should have the right property name for '0'.");
     is(argsEnums[0].querySelector(".value").getAttribute("value"), "Object",
       "Should have the right property value for '0'.");
-    ok(argsEnums[0].querySelector(".value").className.contains("token-other"),
+    ok(argsEnums[0].querySelector(".value").className.includes("token-other"),
       "Should have the right token class for '0'.");
 
     is(argsEnums[1].querySelector(".name").getAttribute("value"), "1",
       "Should have the right property name for '1'.");
     is(argsEnums[1].querySelector(".value").getAttribute("value"), "\"beta\"",
       "Should have the right property value for '1'.");
-    ok(argsEnums[1].querySelector(".value").className.contains("token-string"),
+    ok(argsEnums[1].querySelector(".value").className.includes("token-string"),
       "Should have the right token class for '1'.");
 
     is(argsEnums[2].querySelector(".name").getAttribute("value"), "2",
       "Should have the right property name for '2'.");
     is(argsEnums[2].querySelector(".value").getAttribute("value"), "3",
       "Should have the right property name for '2'.");
-    ok(argsEnums[2].querySelector(".value").className.contains("token-number"),
+    ok(argsEnums[2].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for '2'.");
 
     is(argsEnums[3].querySelector(".name").getAttribute("value"), "3",
       "Should have the right property name for '3'.");
     is(argsEnums[3].querySelector(".value").getAttribute("value"), "false",
       "Should have the right property value for '3'.");
-    ok(argsEnums[3].querySelector(".value").className.contains("token-boolean"),
+    ok(argsEnums[3].querySelector(".value").className.includes("token-boolean"),
       "Should have the right token class for '3'.");
 
     is(argsEnums[4].querySelector(".name").getAttribute("value"), "4",
       "Should have the right property name for '4'.");
     is(argsEnums[4].querySelector(".value").getAttribute("value"), "null",
       "Should have the right property name for '4'.");
-    ok(argsEnums[4].querySelector(".value").className.contains("token-null"),
+    ok(argsEnums[4].querySelector(".value").className.includes("token-null"),
       "Should have the right token class for '4'.");
 
     is(argsNonEnums[0].querySelector(".name").getAttribute("value"), "callee",
      "Should have the right property name for 'callee'.");
     is(argsNonEnums[0].querySelector(".value").getAttribute("value"),
      "test(aArg,bArg,cArg,dArg,eArg,fArg)",
      "Should have the right property name for 'callee'.");
-    ok(argsNonEnums[0].querySelector(".value").className.contains("token-other"),
+    ok(argsNonEnums[0].querySelector(".value").className.includes("token-other"),
      "Should have the right token class for 'callee'.");
 
     is(argsNonEnums[1].querySelector(".name").getAttribute("value"), "length",
       "Should have the right property name for 'length'.");
     is(argsNonEnums[1].querySelector(".value").getAttribute("value"), "5",
       "Should have the right property value for 'length'.");
-    ok(argsNonEnums[1].querySelector(".value").className.contains("token-number"),
+    ok(argsNonEnums[1].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'length'.");
 
     is(argsNonEnums[2].querySelector(".name").getAttribute("value"), "__proto__",
      "Should have the right property name for '__proto__'.");
     is(argsNonEnums[2].querySelector(".value").getAttribute("value"), "Object",
      "Should have the right property value for '__proto__'.");
-    ok(argsNonEnums[2].querySelector(".value").className.contains("token-other"),
+    ok(argsNonEnums[2].querySelector(".value").className.includes("token-other"),
      "Should have the right token class for '__proto__'.");
 
     deferred.resolve();
   });
 
   argsVar.expand();
   return deferred.promise;
 }
@@ -232,24 +232,24 @@ function testSimpleObject() {
       "The 'b' variable should contain all the created enumerable elements.");
     is(bNonEnums.length, 1,
       "The 'b' variable should contain all the created non-enumerable elements.");
 
     is(bEnums[0].querySelector(".name").getAttribute("value"), "a",
       "Should have the right property name for 'a'.");
     is(bEnums[0].querySelector(".value").getAttribute("value"), "1",
       "Should have the right property value for 'a'.");
-    ok(bEnums[0].querySelector(".value").className.contains("token-number"),
+    ok(bEnums[0].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'a'.");
 
     is(bNonEnums[0].querySelector(".name").getAttribute("value"), "__proto__",
      "Should have the right property name for '__proto__'.");
     is(bNonEnums[0].querySelector(".value").getAttribute("value"), "Object",
      "Should have the right property value for '__proto__'.");
-    ok(bNonEnums[0].querySelector(".value").className.contains("token-other"),
+    ok(bNonEnums[0].querySelector(".value").className.includes("token-other"),
      "Should have the right token class for '__proto__'.");
 
     deferred.resolve();
   });
 
   bVar.expand();
   return deferred.promise;
 }
@@ -269,59 +269,59 @@ function testComplexObject() {
       "The 'c' variable should contain all the created enumerable elements.");
     is(cNonEnums.length, 1,
       "The 'c' variable should contain all the created non-enumerable elements.");
 
     is(cEnums[0].querySelector(".name").getAttribute("value"), "a",
       "Should have the right property name for 'a'.");
     is(cEnums[0].querySelector(".value").getAttribute("value"), "1",
       "Should have the right property value for 'a'.");
-    ok(cEnums[0].querySelector(".value").className.contains("token-number"),
+    ok(cEnums[0].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'a'.");
 
     is(cEnums[1].querySelector(".name").getAttribute("value"), "b",
       "Should have the right property name for 'b'.");
     is(cEnums[1].querySelector(".value").getAttribute("value"), "\"beta\"",
       "Should have the right property value for 'b'.");
-    ok(cEnums[1].querySelector(".value").className.contains("token-string"),
+    ok(cEnums[1].querySelector(".value").className.includes("token-string"),
       "Should have the right token class for 'b'.");
 
     is(cEnums[2].querySelector(".name").getAttribute("value"), "c",
       "Should have the right property name for 'c'.");
     is(cEnums[2].querySelector(".value").getAttribute("value"), "3",
       "Should have the right property value for 'c'.");
-    ok(cEnums[2].querySelector(".value").className.contains("token-number"),
+    ok(cEnums[2].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'c'.");
 
     is(cEnums[3].querySelector(".name").getAttribute("value"), "d",
       "Should have the right property name for 'd'.");
     is(cEnums[3].querySelector(".value").getAttribute("value"), "false",
       "Should have the right property value for 'd'.");
-    ok(cEnums[3].querySelector(".value").className.contains("token-boolean"),
+    ok(cEnums[3].querySelector(".value").className.includes("token-boolean"),
       "Should have the right token class for 'd'.");
 
     is(cEnums[4].querySelector(".name").getAttribute("value"), "e",
       "Should have the right property name for 'e'.");
     is(cEnums[4].querySelector(".value").getAttribute("value"), "null",
       "Should have the right property value for 'e'.");
-    ok(cEnums[4].querySelector(".value").className.contains("token-null"),
+    ok(cEnums[4].querySelector(".value").className.includes("token-null"),
       "Should have the right token class for 'e'.");
 
     is(cEnums[5].querySelector(".name").getAttribute("value"), "f",
       "Should have the right property name for 'f'.");
     is(cEnums[5].querySelector(".value").getAttribute("value"), "undefined",
       "Should have the right property value for 'f'.");
-    ok(cEnums[5].querySelector(".value").className.contains("token-undefined"),
+    ok(cEnums[5].querySelector(".value").className.includes("token-undefined"),
       "Should have the right token class for 'f'.");
 
     is(cNonEnums[0].querySelector(".name").getAttribute("value"), "__proto__",
      "Should have the right property name for '__proto__'.");
     is(cNonEnums[0].querySelector(".value").getAttribute("value"), "Object",
      "Should have the right property value for '__proto__'.");
-    ok(cNonEnums[0].querySelector(".value").className.contains("token-other"),
+    ok(cNonEnums[0].querySelector(".value").className.includes("token-other"),
      "Should have the right token class for '__proto__'.");
 
     deferred.resolve();
   });
 
   cVar.expand();
   return deferred.promise;
 }
@@ -341,59 +341,59 @@ function testArgumentObject() {
       "The 'aArg' variable should contain all the created enumerable elements.");
     is(argNonEnums.length, 1,
       "The 'aArg' variable should contain all the created non-enumerable elements.");
 
     is(argEnums[0].querySelector(".name").getAttribute("value"), "a",
       "Should have the right property name for 'a'.");
     is(argEnums[0].querySelector(".value").getAttribute("value"), "1",
       "Should have the right property value for 'a'.");
-    ok(argEnums[0].querySelector(".value").className.contains("token-number"),
+    ok(argEnums[0].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'a'.");
 
     is(argEnums[1].querySelector(".name").getAttribute("value"), "b",
       "Should have the right property name for 'b'.");
     is(argEnums[1].querySelector(".value").getAttribute("value"), "\"beta\"",
       "Should have the right property value for 'b'.");
-    ok(argEnums[1].querySelector(".value").className.contains("token-string"),
+    ok(argEnums[1].querySelector(".value").className.includes("token-string"),
       "Should have the right token class for 'b'.");
 
     is(argEnums[2].querySelector(".name").getAttribute("value"), "c",
       "Should have the right property name for 'c'.");
     is(argEnums[2].querySelector(".value").getAttribute("value"), "3",
       "Should have the right property value for 'c'.");
-    ok(argEnums[2].querySelector(".value").className.contains("token-number"),
+    ok(argEnums[2].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'c'.");
 
     is(argEnums[3].querySelector(".name").getAttribute("value"), "d",
       "Should have the right property name for 'd'.");
     is(argEnums[3].querySelector(".value").getAttribute("value"), "false",
       "Should have the right property value for 'd'.");
-    ok(argEnums[3].querySelector(".value").className.contains("token-boolean"),
+    ok(argEnums[3].querySelector(".value").className.includes("token-boolean"),
       "Should have the right token class for 'd'.");
 
     is(argEnums[4].querySelector(".name").getAttribute("value"), "e",
       "Should have the right property name for 'e'.");
     is(argEnums[4].querySelector(".value").getAttribute("value"), "null",
       "Should have the right property value for 'e'.");
-    ok(argEnums[4].querySelector(".value").className.contains("token-null"),
+    ok(argEnums[4].querySelector(".value").className.includes("token-null"),
       "Should have the right token class for 'e'.");
 
     is(argEnums[5].querySelector(".name").getAttribute("value"), "f",
       "Should have the right property name for 'f'.");
     is(argEnums[5].querySelector(".value").getAttribute("value"), "undefined",
       "Should have the right property value for 'f'.");
-    ok(argEnums[5].querySelector(".value").className.contains("token-undefined"),
+    ok(argEnums[5].querySelector(".value").className.includes("token-undefined"),
       "Should have the right token class for 'f'.");
 
     is(argNonEnums[0].querySelector(".name").getAttribute("value"), "__proto__",
      "Should have the right property name for '__proto__'.");
     is(argNonEnums[0].querySelector(".value").getAttribute("value"), "Object",
      "Should have the right property value for '__proto__'.");
-    ok(argNonEnums[0].querySelector(".value").className.contains("token-other"),
+    ok(argNonEnums[0].querySelector(".value").className.includes("token-other"),
      "Should have the right token class for '__proto__'.");
 
     deferred.resolve();
   });
 
   argVar.expand();
   return deferred.promise;
 }
@@ -413,59 +413,59 @@ function testInnerArgumentObject() {
       "The 'arguments[0]' property should contain all the created enumerable elements.");
     is(argNonEnums.length, 1,
       "The 'arguments[0]' property should contain all the created non-enumerable elements.");
 
     is(argEnums[0].querySelector(".name").getAttribute("value"), "a",
       "Should have the right property name for 'a'.");
     is(argEnums[0].querySelector(".value").getAttribute("value"), "1",
       "Should have the right property value for 'a'.");
-    ok(argEnums[0].querySelector(".value").className.contains("token-number"),
+    ok(argEnums[0].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'a'.");
 
     is(argEnums[1].querySelector(".name").getAttribute("value"), "b",
       "Should have the right property name for 'b'.");
     is(argEnums[1].querySelector(".value").getAttribute("value"), "\"beta\"",
       "Should have the right property value for 'b'.");
-    ok(argEnums[1].querySelector(".value").className.contains("token-string"),
+    ok(argEnums[1].querySelector(".value").className.includes("token-string"),
       "Should have the right token class for 'b'.");
 
     is(argEnums[2].querySelector(".name").getAttribute("value"), "c",
       "Should have the right property name for 'c'.");
     is(argEnums[2].querySelector(".value").getAttribute("value"), "3",
       "Should have the right property value for 'c'.");
-    ok(argEnums[2].querySelector(".value").className.contains("token-number"),
+    ok(argEnums[2].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for 'c'.");
 
     is(argEnums[3].querySelector(".name").getAttribute("value"), "d",
       "Should have the right property name for 'd'.");
     is(argEnums[3].querySelector(".value").getAttribute("value"), "false",
       "Should have the right property value for 'd'.");
-    ok(argEnums[3].querySelector(".value").className.contains("token-boolean"),
+    ok(argEnums[3].querySelector(".value").className.includes("token-boolean"),
       "Should have the right token class for 'd'.");
 
     is(argEnums[4].querySelector(".name").getAttribute("value"), "e",
       "Should have the right property name for 'e'.");
     is(argEnums[4].querySelector(".value").getAttribute("value"), "null",
       "Should have the right property value for 'e'.");
-    ok(argEnums[4].querySelector(".value").className.contains("token-null"),
+    ok(argEnums[4].querySelector(".value").className.includes("token-null"),
       "Should have the right token class for 'e'.");
 
     is(argEnums[5].querySelector(".name").getAttribute("value"), "f",
       "Should have the right property name for 'f'.");
     is(argEnums[5].querySelector(".value").getAttribute("value"), "undefined",
       "Should have the right property value for 'f'.");
-    ok(argEnums[5].querySelector(".value").className.contains("token-undefined"),
+    ok(argEnums[5].querySelector(".value").className.includes("token-undefined"),
       "Should have the right token class for 'f'.");
 
     is(argNonEnums[0].querySelector(".name").getAttribute("value"), "__proto__",
      "Should have the right property name for '__proto__'.");
     is(argNonEnums[0].querySelector(".value").getAttribute("value"), "Object",
      "Should have the right property value for '__proto__'.");
-    ok(argNonEnums[0].querySelector(".value").className.contains("token-other"),
+    ok(argNonEnums[0].querySelector(".value").className.includes("token-other"),
      "Should have the right token class for '__proto__'.");
 
     deferred.resolve();
   });
 
   argProp.expand();
   return deferred.promise;
 }
@@ -485,55 +485,55 @@ function testGetterSetterObject() {
       "The myVar should contain all the created enumerable elements.");
     is(myVarNonEnums.length, 1,
       "The myVar should contain all the created non-enumerable elements.");
 
     is(myVarEnums[0].querySelector(".name").getAttribute("value"), "_prop",
       "Should have the right property name for '_prop'.");
     is(myVarEnums[0].querySelector(".value").getAttribute("value"), "42",
       "Should have the right property value for '_prop'.");
-    ok(myVarEnums[0].querySelector(".value").className.contains("token-number"),
+    ok(myVarEnums[0].querySelector(".value").className.includes("token-number"),
       "Should have the right token class for '_prop'.");
 
     is(myVarEnums[1].querySelector(".name").getAttribute("value"), "prop",
       "Should have the right property name for 'prop'.");
     is(myVarEnums[1].querySelector(".value").getAttribute("value"), "",
       "Should have the right property value for 'prop'.");
-    ok(!myVarEnums[1].querySelector(".value").className.contains("token"),
+    ok(!myVarEnums[1].querySelector(".value").className.includes("token"),
       "Should have no token class for 'prop'.");
 
     is(myVarNonEnums[0].querySelector(".name").getAttribute("value"), "__proto__",
      "Should have the right property name for '__proto__'.");
     is(myVarNonEnums[0].querySelector(".value").getAttribute("value"), "Object",
      "Should have the right property value for '__proto__'.");
-    ok(myVarNonEnums[0].querySelector(".value").className.contains("token-other"),
+    ok(myVarNonEnums[0].querySelector(".value").className.includes("token-other"),
      "Should have the right token class for '__proto__'.");
 
     let propEnums = myVarEnums[1].querySelector(".variables-view-element-details.enum").childNodes;
     let propNonEnums = myVarEnums[1].querySelector(".variables-view-element-details.nonenum").childNodes;
 
     is(propEnums.length, 0,
       "The propEnums should contain all the created enumerable elements.");
     is(propNonEnums.length, 2,
       "The propEnums should contain all the created non-enumerable elements.");
 
     is(propNonEnums[0].querySelector(".name").getAttribute("value"), "get",
       "Should have the right property name for 'get'.");
     is(propNonEnums[0].querySelector(".value").getAttribute("value"),
       "test/myVar.prop()",
       "Should have the right property value for 'get'.");
-    ok(propNonEnums[0].querySelector(".value").className.contains("token-other"),
+    ok(propNonEnums[0].querySelector(".value").className.includes("token-other"),
       "Should have the right token class for 'get'.");
 
     is(propNonEnums[1].querySelector(".name").getAttribute("value"), "set",
       "Should have the right property name for 'set'.");
     is(propNonEnums[1].querySelector(".value").getAttribute("value"),
       "test/myVar.prop(val)",
       "Should have the right property value for 'set'.");
-    ok(propNonEnums[1].querySelector(".value").className.contains("token-other"),
+    ok(propNonEnums[1].querySelector(".value").className.includes("token-other"),
       "Should have the right token class for 'set'.");
 
     deferred.resolve();
   });
 
   myVar.expand();
   return deferred.promise;
 }
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-frame-with.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-frame-with.js
@@ -36,54 +36,54 @@ function test() {
     sendMouseClickToTab(gTab, content.document.querySelector("button"));
   });
 }
 
 function testFirstWithScope() {
   let firstWithScope = gVariables.getScopeAtIndex(0);
   is(firstWithScope.expanded, true,
     "The first 'with' scope should be expanded by default.");
-  ok(firstWithScope.target.querySelector(".name").getAttribute("value").contains("[Object]"),
+  ok(firstWithScope.target.querySelector(".name").getAttribute("value").includes("[Object]"),
     "The first 'with' scope should be properly identified.");
 
   let withEnums = firstWithScope._enum.childNodes;
   let withNonEnums = firstWithScope._nonenum.childNodes;
 
   is(withEnums.length, 3,
     "The first 'with' scope should contain all the created enumerable elements.");
   is(withNonEnums.length, 1,
     "The first 'with' scope should contain all the created non-enumerable elements.");
 
   is(withEnums[0].querySelector(".name").getAttribute("value"), "this",
     "Should have the right property name for 'this'.");
   is(withEnums[0].querySelector(".value").getAttribute("value"),
     "Window \u2192 doc_with-frame.html",
     "Should have the right property value for 'this'.");
-  ok(withEnums[0].querySelector(".value").className.contains("token-other"),
+  ok(withEnums[0].querySelector(".value").className.includes("token-other"),
     "Should have the right token class for 'this'.");
 
   is(withEnums[1].querySelector(".name").getAttribute("value"), "alpha",
     "Should have the right property name for 'alpha'.");
   is(withEnums[1].querySelector(".value").getAttribute("value"), "1",
     "Should have the right property value for 'alpha'.");
-  ok(withEnums[1].querySelector(".value").className.contains("token-number"),
+  ok(withEnums[1].querySelector(".value").className.includes("token-number"),
     "Should have the right token class for 'alpha'.");
 
   is(withEnums[2].querySelector(".name").getAttribute("value"), "beta",
     "Should have the right property name for 'beta'.");
   is(withEnums[2].querySelector(".value").getAttribute("value"), "2",
     "Should have the right property value for 'beta'.");
-  ok(withEnums[2].querySelector(".value").className.contains("token-number"),
+  ok(withEnums[2].querySelector(".value").className.includes("token-number"),
     "Should have the right token class for 'beta'.");
 
   is(withNonEnums[0].querySelector(".name").getAttribute("value"), "__proto__",
    "Should have the right property name for '__proto__'.");
   is(withNonEnums[0].querySelector(".value").getAttribute("value"), "Object",
    "Should have the right property value for '__proto__'.");
-  ok(withNonEnums[0].querySelector(".value").className.contains("token-other"),
+  ok(withNonEnums[0].querySelector(".value").className.includes("token-other"),
    "Should have the right token class for '__proto__'.");
 }
 
 function expandSecondWithScope() {
   let deferred = promise.defer();
 
   let secondWithScope = gVariables.getScopeAtIndex(1);
   is(secondWithScope.expanded, false,
@@ -97,53 +97,53 @@ function expandSecondWithScope() {
 
   return deferred.promise;
 }
 
 function testSecondWithScope() {
   let secondWithScope = gVariables.getScopeAtIndex(1);
   is(secondWithScope.expanded, true,
     "The second 'with' scope should now be expanded.");
-  ok(secondWithScope.target.querySelector(".name").getAttribute("value").contains("[Math]"),
+  ok(secondWithScope.target.querySelector(".name").getAttribute("value").includes("[Math]"),
     "The second 'with' scope should be properly identified.");
 
   let withEnums = secondWithScope._enum.childNodes;
   let withNonEnums = secondWithScope._nonenum.childNodes;
 
   is(withEnums.length, 0,
     "The second 'with' scope should contain all the created enumerable elements.");
   isnot(withNonEnums.length, 0,
     "The second 'with' scope should contain all the created non-enumerable elements.");
 
   is(secondWithScope.get("E").target.querySelector(".name").getAttribute("value"), "E",
     "Should have the right property name for 'E'.");
   is(secondWithScope.get("E").target.querySelector(".value").getAttribute("value"), "2.718281828459045",
     "Should have the right property value for 'E'.");
-  ok(secondWithScope.get("E").target.querySelector(".value").className.contains("token-number"),
+  ok(secondWithScope.get("E").target.querySelector(".value").className.includes("token-number"),
     "Should have the right token class for 'E'.");
 
   is(secondWithScope.get("PI").target.querySelector(".name").getAttribute("value"), "PI",
     "Should have the right property name for 'PI'.");
   is(secondWithScope.get("PI").target.querySelector(".value").getAttribute("value"), "3.141592653589793",
     "Should have the right property value for 'PI'.");
-  ok(secondWithScope.get("PI").target.querySelector(".value").className.contains("token-number"),
+  ok(secondWithScope.get("PI").target.querySelector(".value").className.includes("token-number"),
     "Should have the right token class for 'PI'.");
 
   is(secondWithScope.get("random").target.querySelector(".name").getAttribute("value"), "random",
     "Should have the right property name for 'random'.");
   is(secondWithScope.get("random").target.querySelector(".value").getAttribute("value"), "random()",
     "Should have the right property value for 'random'.");
-  ok(secondWithScope.get("random").target.querySelector(".value").className.contains("token-other"),
+  ok(secondWithScope.get("random").target.querySelector(".value").className.includes("token-other"),
     "Should have the right token class for 'random'.");
 
   is(secondWithScope.get("__proto__").target.querySelector(".name").getAttribute("value"), "__proto__",
     "Should have the right property name for '__proto__'.");
   is(secondWithScope.get("__proto__").target.querySelector(".value").getAttribute("value"), "Object",
     "Should have the right property value for '__proto__'.");
-  ok(secondWithScope.get("__proto__").target.querySelector(".value").className.contains("token-other"),
+  ok(secondWithScope.get("__proto__").target.querySelector(".value").className.includes("token-other"),
     "Should have the right token class for '__proto__'.");
 }
 
 function expandFunctionScope() {
   let funcScope = gVariables.getScopeAtIndex(2);
   is(funcScope.expanded, false,
     "The function scope shouldn't be expanded by default, but the " +
     "variables have been already fetched. This is how local scopes work.");
@@ -154,53 +154,53 @@ function expandFunctionScope() {
 
   return promise.resolve(null);
 }
 
 function testFunctionScope() {
   let funcScope = gVariables.getScopeAtIndex(2);
   is(funcScope.expanded, true,
     "The function scope should now be expanded.");
-  ok(funcScope.target.querySelector(".name").getAttribute("value").contains("[test]"),
+  ok(funcScope.target.querySelector(".name").getAttribute("value").includes("[test]"),
     "The function scope should be properly identified.");
 
   let funcEnums = funcScope._enum.childNodes;
   let funcNonEnums = funcScope._nonenum.childNodes;
 
   is(funcEnums.length, 6,
     "The function scope should contain all the created enumerable elements.");
   is(funcNonEnums.length, 0,
     "The function scope should contain all the created non-enumerable elements.");
 
   is(funcScope.get("aNumber").target.querySelector(".name").getAttribute("value"), "aNumber",
     "Should have the right property name for 'aNumber'.");
   is(funcScope.get("aNumber").target.querySelector(".value").getAttribute("value"), "10",
     "Should have the right property value for 'aNumber'.");
-  ok(funcScope.get("aNumber").target.querySelector(".value").className.contains("token-number"),
+  ok(funcScope.get("aNumber").target.querySelector(".value").className.includes("token-number"),
     "Should have the right token class for 'aNumber'.");
 
   is(funcScope.get("a").target.querySelector(".name").getAttribute("value"), "a",
     "Should have the right property name for 'a'.");
   is(funcScope.get("a").target.querySelector(".value").getAttribute("value"), "314.1592653589793",
     "Should have the right property value for 'a'.");
-  ok(funcScope.get("a").target.querySelector(".value").className.contains("token-number"),
+  ok(funcScope.get("a").target.querySelector(".value").className.includes("token-number"),
     "Should have the right token class for 'a'.");
 
   is(funcScope.get("r").target.querySelector(".name").getAttribute("value"), "r",
     "Should have the right property name for 'r'.");
   is(funcScope.get("r").target.querySelector(".value").getAttribute("value"), "10",
     "Should have the right property value for 'r'.");
-  ok(funcScope.get("r").target.querySelector(".value").className.contains("token-number"),
+  ok(funcScope.get("r").target.querySelector(".value").className.includes("token-number"),
     "Should have the right token class for 'r'.");
 
   is(funcScope.get("foo").target.querySelector(".name").getAttribute("value"), "foo",
     "Should have the right property name for 'foo'.");
   is(funcScope.get("foo").target.querySelector(".value").getAttribute("value"), "6.283185307179586",
     "Should have the right property value for 'foo'.");
-  ok(funcScope.get("foo").target.querySelector(".value").className.contains("token-number"),
+  ok(funcScope.get("foo").target.querySelector(".value").className.includes("token-number"),
     "Should have the right token class for 'foo'.");
 }
 
 registerCleanupFunction(function() {
   gTab = null;
   gPanel = null;
   gDebugger = null;
   gVariables = null;
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-large-array-buffer.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-large-array-buffer.js
@@ -41,31 +41,31 @@ function initialChecks() {
   ok(bufferVar, "There should be a 'buffer' variable present in the scope.");
   ok(arrayVar, "There should be a 'largeArray' variable present in the scope.");
   ok(objectVar, "There should be a 'largeObject' variable present in the scope.");
 
   is(bufferVar.target.querySelector(".name").getAttribute("value"), "buffer",
     "Should have the right property name for 'buffer'.");
   is(bufferVar.target.querySelector(".value").getAttribute("value"), "ArrayBuffer",
     "Should have the right property value for 'buffer'.");
-  ok(bufferVar.target.querySelector(".value").className.contains("token-other"),
+  ok(bufferVar.target.querySelector(".value").className.includes("token-other"),
     "Should have the right token class for 'buffer'.");
 
   is(arrayVar.target.querySelector(".name").getAttribute("value"), "largeArray",
     "Should have the right property name for 'largeArray'.");
   is(arrayVar.target.querySelector(".value").getAttribute("value"), "Int8Array[10000]",
     "Should have the right property value for 'largeArray'.");
-  ok(arrayVar.target.querySelector(".value").className.contains("token-other"),
+  ok(arrayVar.target.querySelector(".value").className.includes("token-other"),
     "Should have the right token class for 'largeArray'.");
 
   is(objectVar.target.querySelector(".name").getAttribute("value"), "largeObject",
     "Should have the right property name for 'largeObject'.");
   is(objectVar.target.querySelector(".value").getAttribute("value"), "Object[10000]",
     "Should have the right property value for 'largeObject'.");
-  ok(objectVar.target.querySelector(".value").className.contains("token-other"),
+  ok(objectVar.target.querySelector(".value").className.includes("token-other"),
     "Should have the right token class for 'largeObject'.");
 
   is(bufferVar.expanded, false,
     "The 'buffer' variable shouldn't be expanded.");
   is(arrayVar.expanded, false,
     "The 'largeArray' variable shouldn't be expanded.");
   is(objectVar.expanded, false,
     "The 'largeObject' variable shouldn't be expanded.");
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-01.js
@@ -20,17 +20,17 @@ function test() {
     function verifyContents(textContent, className) {
       is(tooltip.querySelectorAll(".variables-view-container").length, 0,
         "There should be no variables view containers added to the tooltip.");
       is(tooltip.querySelectorAll(".devtools-tooltip-simple-text").length, 1,
         "There should be a simple text node added to the tooltip instead.");
 
       is(tooltip.querySelector(".devtools-tooltip-simple-text").textContent, textContent,
         "The inspected property's value is correct.");
-      ok(tooltip.querySelector(".devtools-tooltip-simple-text").className.contains(className),
+      ok(tooltip.querySelector(".devtools-tooltip-simple-text").className.includes(className),
         "The inspected property's value is colorized correctly.");
     }
 
     callInTab(tab, "start");
     yield waitForSourceAndCaretAndScopes(panel, ".html", 24);
 
     // Inspect variables.
     yield openVarPopup(panel, { line: 15, ch: 12 });
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-02.js
@@ -18,17 +18,17 @@ function test() {
     function verifyContents(textContent, className) {
       is(tooltip.querySelectorAll(".variables-view-container").length, 0,
         "There should be no variables view containers added to the tooltip.");
       is(tooltip.querySelectorAll(".devtools-tooltip-simple-text").length, 1,
         "There should be a simple text node added to the tooltip instead.");
 
       is(tooltip.querySelector(".devtools-tooltip-simple-text").textContent, textContent,
         "The inspected property's value is correct.");
-      ok(tooltip.querySelector(".devtools-tooltip-simple-text").className.contains(className),
+      ok(tooltip.querySelector(".devtools-tooltip-simple-text").className.includes(className),
         "The inspected property's value is colorized correctly.");
     }
 
     callInTab(tab, "start");
     yield waitForSourceAndCaretAndScopes(panel, ".html", 24);
 
     // Inspect properties.
     yield openVarPopup(panel, { line: 19, ch: 10 });
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-07.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-07.js
@@ -18,17 +18,17 @@ function test() {
     function verifySimpleContents(textContent, className) {
       is(tooltip.querySelectorAll(".variables-view-container").length, 0,
         "There should be no variables view container added to the tooltip.");
       is(tooltip.querySelectorAll(".devtools-tooltip-simple-text").length, 1,
         "There should be one simple text node added to the tooltip.");
 
       is(tooltip.querySelector(".devtools-tooltip-simple-text").textContent, textContent,
         "The inspected property's value is correct.");
-      ok(tooltip.querySelector(".devtools-tooltip-simple-text").className.contains(className),
+      ok(tooltip.querySelector(".devtools-tooltip-simple-text").className.includes(className),
         "The inspected property's value is colorized correctly.");
     }
 
     function verifyComplexContents(propertyCount) {
       is(tooltip.querySelectorAll(".variables-view-container").length, 1,
         "There should be one variables view container added to the tooltip.");
       is(tooltip.querySelectorAll(".devtools-tooltip-simple-text").length, 0,
         "There should be no simple text node added to the tooltip.");
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-08.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-08.js
@@ -20,17 +20,17 @@ function test() {
     function verifyContents(textContent, className) {
       is(tooltip.querySelectorAll(".variables-view-container").length, 0,
         "There should be no variables view containers added to the tooltip.");
       is(tooltip.querySelectorAll(".devtools-tooltip-simple-text").length, 1,
         "There should be a simple text node added to the tooltip instead.");
 
       is(tooltip.querySelector(".devtools-tooltip-simple-text").textContent, textContent,
         "The inspected property's value is correct.");
-      ok(tooltip.querySelector(".devtools-tooltip-simple-text").className.contains(className),
+      ok(tooltip.querySelector(".devtools-tooltip-simple-text").className.includes(className),
         "The inspected property's value is colorized correctly.");
     }
 
     function checkView(selectedFrame, caretLine) {
       is(win.gThreadClient.state, "paused",
         "Should only be getting stack frames while paused.");
       is(frames.itemCount, 2,
         "Should have two frames.");
--- a/browser/devtools/debugger/test/browser_dbg_variables-view-webidl.js
+++ b/browser/devtools/debugger/test/browser_dbg_variables-view-webidl.js
@@ -56,161 +56,161 @@ function performTest() {
   let buttonVar = globalScope.get("button");
   let buttonAsProtoVar = globalScope.get("buttonAsProto");
   let documentVar = globalScope.get("document");
 
   is(buttonVar.target.querySelector(".name").getAttribute("value"), "button",
     "Should have the right property name for 'button'.");
   is(buttonVar.target.querySelector(".value").getAttribute("value"), "<button>",
     "Should have the right property value for 'button'.");
-  ok(buttonVar.target.querySelector(".value").className.contains("token-domnode"),
+  ok(buttonVar.target.querySelector(".value").className.includes("token-domnode"),
     "Should have the right token class for 'button'.");
 
   is(buttonAsProtoVar.target.querySelector(".name").getAttribute("value"), "buttonAsProto",
     "Should have the right property name for 'buttonAsProto'.");
   is(buttonAsProtoVar.target.querySelector(".value").getAttribute("value"), "Object",
     "Should have the right property value for 'buttonAsProto'.");
-  ok(buttonAsProtoVar.target.querySelector(".value").className.contains("token-other"),
+  ok(buttonAsProtoVar.target.querySelector(".value").className.includes("token-other"),
     "Should have the right token class for 'buttonAsProto'.");
 
   is(documentVar.target.querySelector(".name").getAttribute("value"), "document",
     "Should have the right property name for 'document'.");
   is(documentVar.target.querySelector(".value").getAttribute("value"),
     "HTMLDocument \u2192 doc_frame-parameters.html",
     "Should have the right property value for 'document'.");
-  ok(documentVar.target.querySelector(".value").className.contains("token-domnode"),
+  ok(documentVar.target.querySelector(".value").className.includes("token-domnode"),
     "Should have the right token class for 'document'.");
 
   is(buttonVar.expanded, false,
     "The buttonVar should not be expanded at this point.");
   is(buttonAsProtoVar.expanded, false,
     "The buttonAsProtoVar should not be expanded at this point.");
   is(documentVar.expanded, false,
     "The documentVar should not be expanded at this point.");
 
   waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_PROPERTIES, 3).then(() => {
     is(buttonVar.get("type").target.querySelector(".name").getAttribute("value"), "type",
       "Should have the right property name for 'type'.");
     is(buttonVar.get("type").target.querySelector(".value").getAttribute("value"), "\"submit\"",
       "Should have the right property value for 'type'.");
-    ok(buttonVar.get("type").target.querySelector(".value").className.contains("token-string"),
+    ok(buttonVar.get("type").target.querySelector(".value").className.includes("token-string"),
       "Should have the right token class for 'type'.");
 
     is(buttonVar.get("childNodes").target.querySelector(".name").getAttribute("value"), "childNodes",
       "Should have the right property name for 'childNodes'.");
     is(buttonVar.get("childNodes").target.querySelector(".value").getAttribute("value"), "NodeList[1]",
       "Should have the right property value for 'childNodes'.");
-    ok(buttonVar.get("childNodes").target.querySelector(".value").className.contains("token-other"),
+    ok(buttonVar.get("childNodes").target.querySelector(".value").className.includes("token-other"),
       "Should have the right token class for 'childNodes'.");
 
     is(buttonVar.get("onclick").target.querySelector(".name").getAttribute("value"), "onclick",
       "Should have the right property name for 'onclick'.");
     is(buttonVar.get("onclick").target.querySelector(".value").getAttribute("value"), "onclick(event)",
       "Should have the right property value for 'onclick'.");
-    ok(buttonVar.get("onclick").target.querySelector(".value").className.contains("token-other"),
+    ok(buttonVar.get("onclick").target.querySelector(".value").className.includes("token-other"),
       "Should have the right token class for 'onclick'.");
 
     is(documentVar.get("title").target.querySelector(".name").getAttribute("value"), "title",
       "Should have the right property name for 'title'.");
     is(documentVar.get("title").target.querySelector(".value").getAttribute("value"), "\"Debugger test page\"",
       "Should have the right property value for 'title'.");
-    ok(documentVar.get("title").target.querySelector(".value").className.contains("token-string"),
+    ok(documentVar.get("title").target.querySelector(".value").className.includes("token-string"),
       "Should have the right token class for 'title'.");
 
     is(documentVar.get("childNodes").target.querySelector(".name").getAttribute("value"), "childNodes",
       "Should have the right property name for 'childNodes'.");
     is(documentVar.get("childNodes").target.querySelector(".value").getAttribute("value"), "NodeList[3]",
       "Should have the right property value for 'childNodes'.");
-    ok(documentVar.get("childNodes").target.querySelector(".value").className.contains("token-other"),
+    ok(documentVar.get("childNodes").target.querySelector(".value").className.includes("token-other"),
       "Should have the right token class for 'childNodes'.");
 
     is(documentVar.get("onclick").target.querySelector(".name").getAttribute("value"), "onclick",
       "Should have the right property name for 'onclick'.");
     is(documentVar.get("onclick").target.querySelector(".value").getAttribute("value"), "null",
       "Should have the right property value for 'onclick'.");
-    ok(documentVar.get("onclick").target.querySelector(".value").className.contains("token-null"),
+    ok(documentVar.get("onclick").target.querySelector(".value").className.includes("token-null"),
       "Should have the right token class for 'onclick'.");
 
     let buttonProtoVar = buttonVar.get("__proto__");
     let buttonAsProtoProtoVar = buttonAsProtoVar.get("__proto__");
     let documentProtoVar = documentVar.get("__proto__");
 
     is(buttonProtoVar.target.querySelector(".name").getAttribute("value"), "__proto__",
       "Should have the right property name for '__proto__'.");
     is(buttonProtoVar.target.querySelector(".value").getAttribute("value"), "HTMLButtonElementPrototype",
       "Should have the right property value for '__proto__'.");
-    ok(buttonProtoVar.target.querySelector(".value").className.contains("token-other"),
+    ok(buttonProtoVar.target.querySelector(".value").className.includes("token-other"),
       "Should have the right token class for '__proto__'.");
 
     is(buttonAsProtoProtoVar.target.querySelector(".name").getAttribute("value"), "__proto__",
       "Should have the right property name for '__proto__'.");
     is(buttonAsProtoProtoVar.target.querySelector(".value").getAttribute("value"), "<button>",
       "Should have the right property value for '__proto__'.");
-    ok(buttonAsProtoProtoVar.target.querySelector(".value").className.contains("token-domnode"),
+    ok(buttonAsProtoProtoVar.target.querySelector(".value").className.includes("token-domnode"),
       "Should have the right token class for '__proto__'.");
 
     is(documentProtoVar.target.querySelector(".name").getAttribute("value"), "__proto__",
       "Should have the right property name for '__proto__'.");
     is(documentProtoVar.target.querySelector(".value").getAttribute("value"), "HTMLDocumentPrototype",
       "Should have the right property value for '__proto__'.");
-    ok(documentProtoVar.target.querySelector(".value").className.contains("token-other"),
+    ok(documentProtoVar.target.querySelector(".value").className.includes("token-other"),
       "Should have the right token class for '__proto__'.");
 
     is(buttonProtoVar.expanded, false,
       "The buttonProtoVar should not be expanded at this point.");
     is(buttonAsProtoProtoVar.expanded, false,
       "The buttonAsProtoProtoVar should not be expanded at this point.");
     is(documentProtoVar.expanded, false,
       "The documentProtoVar should not be expanded at this point.");
 
     waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_PROPERTIES, 3).then(() => {
       is(buttonAsProtoProtoVar.get("type").target.querySelector(".name").getAttribute("value"), "type",
         "Should have the right property name for 'type'.");
       is(buttonAsProtoProtoVar.get("type").target.querySelector(".value").getAttribute("value"), "\"submit\"",
         "Should have the right property value for 'type'.");
-      ok(buttonAsProtoProtoVar.get("type").target.querySelector(".value").className.contains("token-string"),
+      ok(buttonAsProtoProtoVar.get("type").target.querySelector(".value").className.includes("token-string"),
         "Should have the right token class for 'type'.");
 
       is(buttonAsProtoProtoVar.get("childNodes").target.querySelector(".name").getAttribute("value"), "childNodes",
         "Should have the right property name for 'childNodes'.");
       is(buttonAsProtoProtoVar.get("childNodes").target.querySelector(".value").getAttribute("value"), "NodeList[1]",
         "Should have the right property value for 'childNodes'.");
-      ok(buttonAsProtoProtoVar.get("childNodes").target.querySelector(".value").className.contains("token-other"),
+      ok(buttonAsProtoProtoVar.get("childNodes").target.querySelector(".value").className.includes("token-other"),
         "Should have the right token class for 'childNodes'.");
 
       is(buttonAsProtoProtoVar.get("onclick").target.querySelector(".name").getAttribute("value"), "onclick",
         "Should have the right property name for 'onclick'.");
       is(buttonAsProtoProtoVar.get("onclick").target.querySelector(".value").getAttribute("value"), "onclick(event)",
         "Should have the right property value for 'onclick'.");
-      ok(buttonAsProtoProtoVar.get("onclick").target.querySelector(".value").className.contains("token-other"),
+      ok(buttonAsProtoProtoVar.get("onclick").target.querySelector(".value").className.includes("token-other"),
         "Should have the right token class for 'onclick'.");
 
       let buttonProtoProtoVar = buttonProtoVar.get("__proto__");
       let buttonAsProtoProtoProtoVar = buttonAsProtoProtoVar.get("__proto__");
       let documentProtoProtoVar = documentProtoVar.get("__proto__");
 
       is(buttonProtoProtoVar.target.querySelector(".name").getAttribute("value"), "__proto__",
         "Should have the right property name for '__proto__'.");
       is(buttonProtoProtoVar.target.querySelector(".value").getAttribute("value"), "HTMLElementPrototype",
         "Should have the right property value for '__proto__'.");
-      ok(buttonProtoProtoVar.target.querySelector(".value").className.contains("token-other"),
+      ok(buttonProtoProtoVar.target.querySelector(".value").className.includes("token-other"),
         "Should have the right token class for '__proto__'.");
 
       is(buttonAsProtoProtoProtoVar.target.querySelector(".name").getAttribute("value"), "__proto__",
         "Should have the right property name for '__proto__'.");
       is(buttonAsProtoProtoProtoVar.target.querySelector(".value").getAttribute("value"), "HTMLButtonElementPrototype",
         "Should have the right property value for '__proto__'.");
-      ok(buttonAsProtoProtoProtoVar.target.querySelector(".value").className.contains("token-other"),
+      ok(buttonAsProtoProtoProtoVar.target.querySelector(".value").className.includes("token-other"),
         "Should have the right token class for '__proto__'.");
 
       is(documentProtoProtoVar.target.querySelector(".name").getAttribute("value"), "__proto__",
         "Should have the right property name for '__proto__'.");
       is(documentProtoProtoVar.target.querySelector(".value").getAttribute("value"), "DocumentPrototype",
         "Should have the right property value for '__proto__'.");
-      ok(documentProtoProtoVar.target.querySelector(".value").className.contains("token-other"),
+      ok(documentProtoProtoVar.target.querySelector(".value").className.includes("token-other"),
         "Should have the right token class for '__proto__'.")
 
       is(buttonAsProtoProtoProtoVar.expanded, false,
         "The buttonAsProtoProtoProtoVar should not be expanded at this point.");
       is(buttonAsProtoProtoProtoVar.expanded, false,
         "The buttonAsProtoProtoProtoVar should not be expanded at this point.");
       is(documentProtoProtoVar.expanded, false,
         "The documentProtoProtoVar should not be expanded at this point.");
--- a/browser/devtools/debugger/test/head.js
+++ b/browser/devtools/debugger/test/head.js
@@ -253,33 +253,33 @@ function waitForTime(aDelay) {
   return deferred.promise;
 }
 
 function waitForSourceShown(aPanel, aUrl) {
   return waitForDebuggerEvents(aPanel, aPanel.panelWin.EVENTS.SOURCE_SHOWN).then(aSource => {
     let sourceUrl = aSource.url || aSource.introductionUrl;
     info("Source shown: " + sourceUrl);
 
-    if (!sourceUrl.contains(aUrl)) {
+    if (!sourceUrl.includes(aUrl)) {
       return waitForSourceShown(aPanel, aUrl);
     } else {
       ok(true, "The correct source has been shown.");
     }
   });
 }
 
 function waitForEditorLocationSet(aPanel) {
   return waitForDebuggerEvents(aPanel, aPanel.panelWin.EVENTS.EDITOR_LOCATION_SET);
 }
 
 function ensureSourceIs(aPanel, aUrlOrSource, aWaitFlag = false) {
   let sources = aPanel.panelWin.DebuggerView.Sources;
 
   if (sources.selectedValue === aUrlOrSource ||
-      sources.selectedItem.attachment.source.url.contains(aUrlOrSource)) {
+      sources.selectedItem.attachment.source.url.includes(aUrlOrSource)) {
     ok(true, "Expected source is shown: " + aUrlOrSource);
     return promise.resolve(null);
   }
   if (aWaitFlag) {
     return waitForSourceShown(aPanel, aUrlOrSource);
   }
   ok(false, "Expected source was not already shown: " + aUrlOrSource);
   return promise.reject(null);
--- a/browser/devtools/debugger/utils.js
+++ b/browser/devtools/debugger/utils.js
@@ -44,17 +44,17 @@ const SourceUtils = {
    * Returns true if the specified url and/or content type are specific to
    * javascript files.
    *
    * @return boolean
    *         True if the source is likely javascript.
    */
   isJavaScript: function(aUrl, aContentType = "") {
     return (aUrl && /\.jsm?$/.test(this.trimUrlQuery(aUrl))) ||
-           aContentType.contains("javascript");
+           aContentType.includes("javascript");
   },
 
   /**
    * Determines if the source text is minified by using
    * the percentage indented of a subset of lines
    *
    * @return object
    *         A promise that resolves to true if source text is minified.
--- a/browser/devtools/debugger/views/event-listeners-view.js
+++ b/browser/devtools/debugger/views/event-listeners-view.js
@@ -79,17 +79,17 @@ EventListenersView.prototype = Heritage.
         targets.setAttribute("value", L10N.getFormatStr("eventNodes", selectors.length));
       }
       return;
     }
 
     // There's no easy way of grouping event types into higher-level groups,
     // so we need to do this by hand.
     let is = (...args) => args.indexOf(type) != -1;
-    let has = str => type.contains(str);
+    let has = str => type.includes(str);
     let starts = str => type.startsWith(str);
     let group;
 
     if (starts("animation")) {
       group = L10N.getStr("animationEvents");
     } else if (starts("audio")) {
       group = L10N.getStr("audioEvents");
     } else if (is("levelchange")) {
--- a/browser/devtools/debugger/views/global-search-view.js
+++ b/browser/devtools/debugger/views/global-search-view.js
@@ -145,31 +145,31 @@ GlobalSearchView.prototype = Heritage.ex
     for (let [actor, text] of aSources) {
       let item = this.DebuggerView.Sources.getItemByValue(actor);
       let url = item.attachment.source.url;
       if (!url) {
         continue;
       }
 
       // Verify that the search token is found anywhere in the source.
-      if (!text.toLowerCase().contains(lowerCaseToken)) {
+      if (!text.toLowerCase().includes(lowerCaseToken)) {
         continue;
       }
       // ...and if so, create a Map containing search details for each line.
       let sourceResults = new SourceResults(actor,
                                             globalResults,
                                             this.DebuggerView.Sources);
 
       // Search for the specified token in each line's text.
       text.split("\n").forEach((aString, aLine) => {
         // Search is not case sensitive, prepare the actual searched line.
         let lowerCaseLine = aString.toLowerCase();
 
         // Verify that the search token is found anywhere in this line.
-        if (!lowerCaseLine.contains(lowerCaseToken)) {
+        if (!lowerCaseLine.includes(lowerCaseToken)) {
           return;
         }
         // ...and if so, create a Map containing search details for each word.
         let lineResults = new LineResults(aLine, sourceResults);
 
         // Search for the specified token this line's text.
         lowerCaseLine.split(lowerCaseToken).reduce((aPrev, aCurr, aIndex, aArray) => {
           let prevLength = aPrev.length;
--- a/browser/devtools/debugger/views/tracer-view.js
+++ b/browser/devtools/debugger/views/tracer-view.js
@@ -292,17 +292,17 @@ TracerView.prototype = Heritage.extend(W
     }
   },
 
   /**
    * Listener for typing in the search box.
    */
   _onSearch: function() {
     const query = this._search.value.trim().toLowerCase();
-    const predicate = name => name.toLowerCase().contains(query);
+    const predicate = name => name.toLowerCase().includes(query);
     this.filterContents(item => predicate(item.attachment.trace.name));
   },
 
   /**
    * Select the traces tab in the sidebar.
    */
   selectTab: function() {
     const tabs = this._tracerTab.parentElement;
--- a/browser/devtools/framework/test/browser_toolbox_tool_remote_reopen.js
+++ b/browser/devtools/framework/test/browser_toolbox_tool_remote_reopen.js
@@ -109,22 +109,22 @@ function test() {
     for (let pool of client.__pools) {
       if (!pool.__poolMap) {
         continue;
       }
       for (let actor of pool.__poolMap.keys()) {
         // Bug 1056342: Profiler fails today because of framerate actor, but
         // this appears more complex to rework, so leave it for that bug to
         // resolve.
-        if (actor.contains("framerateActor")) {
+        if (actor.includes("framerateActor")) {
           todo(false, "Front for " + actor + " still held in pool!");
           continue;
         }
         // gcliActor is for the commandline which is separate to the toolbox
-        if (actor.contains("gcliActor")) {
+        if (actor.includes("gcliActor")) {
           continue;
         }
         ok(false, "Front for " + actor + " still held in pool!");
       }
     }
 
     gBrowser.removeCurrentTab();
     DebuggerServer.destroy();
--- a/browser/devtools/framework/test/browser_toolbox_window_shortcuts.js
+++ b/browser/devtools/framework/test/browser_toolbox_window_shortcuts.js
@@ -43,19 +43,19 @@ function testShortcuts(aToolbox, aIndex)
   toolbox = aToolbox;
   info("Toolbox fired a `ready` event");
 
   toolbox.once("select", selectCB);
 
   let key = gDevTools._tools.get(toolIDs[aIndex]).key;
   let toolModifiers = gDevTools._tools.get(toolIDs[aIndex]).modifiers;
   let modifiers = {
-    accelKey: toolModifiers.contains("accel"),
-    altKey: toolModifiers.contains("alt"),
-    shiftKey: toolModifiers.contains("shift"),
+    accelKey: toolModifiers.includes("accel"),
+    altKey: toolModifiers.includes("alt"),
+    shiftKey: toolModifiers.includes("shift"),
   };
   idIndex = aIndex;
   info("Testing shortcut for tool " + aIndex + ":" + toolIDs[aIndex] +
        " using key " + key);
   EventUtils.synthesizeKey(key, modifiers, toolbox.doc.defaultView.parent);
 }
 
 function selectCB(event, id) {
--- a/browser/devtools/markupview/markup-view.js
+++ b/browser/devtools/markupview/markup-view.js
@@ -2487,18 +2487,18 @@ ElementEditor.prototype = {
     };
     this.template("attribute", data);
     var {attr, inner, name, val} = data;
 
     // Double quotes need to be handled specially to prevent DOMParser failing.
     // name="v"a"l"u"e" when editing -> name='v"a"l"u"e"'
     // name="v'a"l'u"e" when editing -> name="v'a&quot;l'u&quot;e"
     let editValueDisplayed = aAttr.value || "";
-    let hasDoubleQuote = editValueDisplayed.contains('"');
-    let hasSingleQuote = editValueDisplayed.contains("'");
+    let hasDoubleQuote = editValueDisplayed.includes('"');
+    let hasSingleQuote = editValueDisplayed.includes("'");
     let initial = aAttr.name + '="' + editValueDisplayed + '"';
 
     // Can't just wrap value with ' since the value contains both " and '.
     if (hasDoubleQuote && hasSingleQuote) {
         editValueDisplayed = editValueDisplayed.replace(/\"/g, "&quot;");
         initial = aAttr.name + '="' + editValueDisplayed + '"';
     }
 
--- a/browser/devtools/netmonitor/netmonitor-view.js
+++ b/browser/devtools/netmonitor/netmonitor-view.js
@@ -983,61 +983,61 @@ RequestsMenuView.prototype = Heritage.ex
    * Predicates used when filtering items.
    *
    * @param object aItem
    *        The filtered item.
    * @return boolean
    *         True if the item should be visible, false otherwise.
    */
   isHtml: function({ attachment: { mimeType } })
-    mimeType && mimeType.contains("/html"),
+    mimeType && mimeType.includes("/html"),
 
   isCss: function({ attachment: { mimeType } })
-    mimeType && mimeType.contains("/css"),
+    mimeType && mimeType.includes("/css"),
 
   isJs: function({ attachment: { mimeType } })
     mimeType && (
-      mimeType.contains("/ecmascript") ||
-      mimeType.contains("/javascript") ||
-      mimeType.contains("/x-javascript")),
+      mimeType.includes("/ecmascript") ||
+      mimeType.includes("/javascript") ||
+      mimeType.includes("/x-javascript")),
 
   isXHR: function({ attachment: { isXHR } })
     isXHR,
 
   isFont: function({ attachment: { url, mimeType } }) // Fonts are a mess.
     (mimeType && (
-      mimeType.contains("font/") ||
-      mimeType.contains("/font"))) ||
-    url.contains(".eot") ||
-    url.contains(".ttf") ||
-    url.contains(".otf") ||
-    url.contains(".woff"),
+      mimeType.includes("font/") ||
+      mimeType.includes("/font"))) ||
+    url.includes(".eot") ||
+    url.includes(".ttf") ||
+    url.includes(".otf") ||
+    url.includes(".woff"),
 
   isImage: function({ attachment: { mimeType } })
-    mimeType && mimeType.contains("image/"),
+    mimeType && mimeType.includes("image/"),
 
   isMedia: function({ attachment: { mimeType } }) // Not including images.
     mimeType && (
-      mimeType.contains("audio/") ||
-      mimeType.contains("video/") ||
-      mimeType.contains("model/")),
+      mimeType.includes("audio/") ||
+      mimeType.includes("video/") ||
+      mimeType.includes("model/")),
 
   isFlash: function({ attachment: { url, mimeType } }) // Flash is a mess.
     (mimeType && (
-      mimeType.contains("/x-flv") ||
-      mimeType.contains("/x-shockwave-flash"))) ||
-    url.contains(".swf") ||
-    url.contains(".flv"),
+      mimeType.includes("/x-flv") ||
+      mimeType.includes("/x-shockwave-flash"))) ||
+    url.includes(".swf") ||
+    url.includes(".flv"),
 
   isOther: function(e)
     !this.isHtml(e) && !this.isCss(e) && !this.isJs(e) && !this.isXHR(e) &&
     !this.isFont(e) && !this.isImage(e) && !this.isMedia(e) && !this.isFlash(e),
 
   isFreetextMatch: function({ attachment: { url } }, text) //no text is a positive match
-    !text || url.contains(text),
+    !text || url.includes(text),
 
   /**
    * Predicates used when sorting items.
    *
    * @param object aFirst
    *        The first item used in the comparison.
    * @param object aSecond
    *        The second item used in the comparison.
@@ -1489,17 +1489,17 @@ RequestsMenuView.prototype = Heritage.ex
         node.setAttribute("value", text);
         node.setAttribute("tooltiptext", aValue);
         break;
       }
       case "responseContent": {
         let { mimeType } = aItem.attachment;
         let { text, encoding } = aValue.content;
 
-        if (mimeType.contains("image/")) {
+        if (mimeType.includes("image/")) {
           let responseBody = yield gNetwork.getString(text);
           let node = $(".requests-menu-icon", aItem.target);
           node.src = "data:" + mimeType + ";" + encoding + "," + responseBody;
           node.setAttribute("type", "thumbnail");
           node.removeAttribute("hidden");
 
           window.emit(EVENTS.RESPONSE_IMAGE_THUMBNAIL_DISPLAYED);
         }
@@ -1778,17 +1778,17 @@ RequestsMenuView.prototype = Heritage.ex
     if (!requestItem || !requestItem.attachment.responseContent) {
       return;
     }
 
     let hovered = requestItem.attachment;
     let { url } = hovered;
     let { mimeType, text, encoding } = hovered.responseContent.content;
 
-    if (mimeType && mimeType.contains("image/") && (
+    if (mimeType && mimeType.includes("image/") && (
       aTarget.classList.contains("requests-menu-icon") ||
       aTarget.classList.contains("requests-menu-file")))
     {
       return gNetwork.getString(text).then(aString => {
         let anchor = $(".requests-menu-icon", requestItem.target);
         let src = "data:" + mimeType + ";" + encoding + "," + aString;
         aTooltip.setImageContent(src, { maxDim: REQUESTS_TOOLTIP_IMAGE_MAX_DIM });
         return anchor;
@@ -1843,17 +1843,17 @@ RequestsMenuView.prototype = Heritage.ex
     copyResponse.hidden = !selectedItem ||
       !selectedItem.attachment.responseContent ||
       !selectedItem.attachment.responseContent.content.text ||
       selectedItem.attachment.responseContent.content.text.length === 0;
 
     let copyImageAsDataUriElement = $("#request-menu-context-copy-image-as-data-uri");
     copyImageAsDataUriElement.hidden = !selectedItem ||
       !selectedItem.attachment.responseContent ||
-      !selectedItem.attachment.responseContent.content.mimeType.contains("image/");
+      !selectedItem.attachment.responseContent.content.mimeType.includes("image/");
 
     let separator = $("#request-menu-context-separator");
     separator.hidden = !selectedItem;
 
     let newTabElement = $("#request-menu-context-newtab");
     newTabElement.hidden = !selectedItem;
   },
 
@@ -2598,17 +2598,17 @@ NetworkDetailsView.prototype = {
     let contentTypeHeader = allHeaders.find(e => e.name.toLowerCase() == "content-type");
     let contentTypeLongString = contentTypeHeader ? contentTypeHeader.value : "";
     let postDataLongString = aPostDataResponse.postData.text;
 
     let postData = yield gNetwork.getString(postDataLongString);
     let contentType = yield gNetwork.getString(contentTypeLongString);
 
     // Handle query strings (e.g. "?foo=bar&baz=42").
-    if (contentType.contains("x-www-form-urlencoded")) {
+    if (contentType.includes("x-www-form-urlencoded")) {
       for (let section of postData.split(/\r\n|\r|\n/)) {
         // Before displaying it, make sure this section of the POST data
         // isn't a line containing upload stream headers.
         if (payloadHeaders.every(header => !section.startsWith(header.name))) {
           this._addParams(this._paramsFormData, section);
         }
       }
     }
@@ -2728,17 +2728,17 @@ NetworkDetailsView.prototype = {
         infoHeader.hidden = false;
 
         let editor = yield NetMonitorView.editor("#response-content-textarea");
         editor.setMode(Editor.modes.js);
         editor.setText(responseBody);
       }
     }
     // Handle images.
-    else if (mimeType.contains("image/")) {
+    else if (mimeType.includes("image/")) {
       $("#response-content-image-box").setAttribute("align", "center");
       $("#response-content-image-box").setAttribute("pack", "center");
       $("#response-content-image-box").hidden = false;
       $("#response-content-image").src =
         "data:" + mimeType + ";" + encoding + "," + responseBody;
 
       // Immediately display additional information about the image:
       // file name, mime type and encoding.
@@ -2761,17 +2761,17 @@ NetworkDetailsView.prototype = {
       $("#response-content-textarea-box").hidden = false;
       let editor = yield NetMonitorView.editor("#response-content-textarea");
       editor.setMode(Editor.modes.text);
       editor.setText(responseBody);
 
       // Maybe set a more appropriate mode in the Source Editor if possible,
       // but avoid doing this for very large files.
       if (responseBody.length < SOURCE_SYNTAX_HIGHLIGHT_MAX_FILE_SIZE) {
-        let mapping = Object.keys(CONTENT_MIME_TYPE_MAPPINGS).find(key => mimeType.contains(key));
+        let mapping = Object.keys(CONTENT_MIME_TYPE_MAPPINGS).find(key => mimeType.includes(key));
         if (mapping) {
           editor.setMode(CONTENT_MIME_TYPE_MAPPINGS[mapping]);
         }
       }
     }
 
     window.emit(EVENTS.RESPONSE_BODY_DISPLAYED);
   }),
--- a/browser/devtools/netmonitor/test/browser_net_post-data-01.js
+++ b/browser/devtools/netmonitor/test/browser_net_post-data-01.js
@@ -54,20 +54,20 @@ function test() {
         let tab = document.querySelectorAll("#details-pane tab")[2];
         let tabpanel = document.querySelectorAll("#details-pane tabpanel")[2];
 
         is(tab.getAttribute("selected"), "true",
           "The params tab in the network details pane should be selected.");
 
         function checkVisibility(aBox) {
           is(tabpanel.querySelector("#request-params-box")
-            .hasAttribute("hidden"), !aBox.contains("params"),
+            .hasAttribute("hidden"), !aBox.includes("params"),
             "The request params box doesn't have the indended visibility.");
           is(tabpanel.querySelector("#request-post-data-textarea-box")
-            .hasAttribute("hidden"), !aBox.contains("textarea"),
+            .hasAttribute("hidden"), !aBox.includes("textarea"),
             "The request post data textarea box doesn't have the indended visibility.");
         }
 
         is(tabpanel.querySelectorAll(".variables-view-scope").length, 2,
           "There should be 2 param scopes displayed in this tabpanel.");
         is(tabpanel.querySelectorAll(".variables-view-empty-notice").length, 0,
           "The empty notice should not be displayed in this tabpanel.");
 
@@ -122,29 +122,29 @@ function test() {
           is(tabpanel.querySelectorAll(".variables-view-variable").length, 3,
             "There should be 3 param values displayed in this tabpanel.");
           is(queryScope.querySelectorAll(".variables-view-variable").length, 3,
             "There should be 3 param values displayed in the query scope.");
           is(postScope.querySelectorAll(".variables-view-variable").length, 0,
             "There should be 0 param values displayed in the post scope.");
 
           return NetMonitorView.editor("#request-post-data-textarea").then((aEditor) => {
-            ok(aEditor.getText().contains("Content-Disposition: form-data; name=\"text\""),
+            ok(aEditor.getText().includes("Content-Disposition: form-data; name=\"text\""),
               "The text shown in the source editor is incorrect (1.1).");
-            ok(aEditor.getText().contains("Content-Disposition: form-data; name=\"email\""),
+            ok(aEditor.getText().includes("Content-Disposition: form-data; name=\"email\""),
               "The text shown in the source editor is incorrect (2.1).");
-            ok(aEditor.getText().contains("Content-Disposition: form-data; name=\"range\""),
+            ok(aEditor.getText().includes("Content-Disposition: form-data; name=\"range\""),
               "The text shown in the source editor is incorrect (3.1).");
-            ok(aEditor.getText().contains("Content-Disposition: form-data; name=\"Custom field\""),
+            ok(aEditor.getText().includes("Content-Disposition: form-data; name=\"Custom field\""),
               "The text shown in the source editor is incorrect (4.1).");
-            ok(aEditor.getText().contains("Some text..."),
+            ok(aEditor.getText().includes("Some text..."),
               "The text shown in the source editor is incorrect (2.2).");
-            ok(aEditor.getText().contains("42"),
+            ok(aEditor.getText().includes("42"),
               "The text shown in the source editor is incorrect (3.2).");
-            ok(aEditor.getText().contains("Extra data"),
+            ok(aEditor.getText().includes("Extra data"),
               "The text shown in the source editor is incorrect (4.2).");
             is(aEditor.getMode(), Editor.modes.text,
               "The mode active in the source editor is incorrect.");
           });
         }
       }
     });
 
--- a/browser/devtools/netmonitor/test/browser_net_simple-request-details.js
+++ b/browser/devtools/netmonitor/test/browser_net_simple-request-details.js
@@ -74,17 +74,17 @@ function test() {
       let responseScope = tabpanel.querySelectorAll(".variables-view-scope")[0];
       let requestScope = tabpanel.querySelectorAll(".variables-view-scope")[1];
 
       is(responseScope.querySelector(".name").getAttribute("value"),
         L10N.getStr("responseHeaders") + " (" +
         L10N.getFormatStr("networkMenu.sizeKB", L10N.numberWithDecimals(330/1024, 3)) + ")",
         "The response headers scope doesn't have the correct title.");
 
-      ok(requestScope.querySelector(".name").getAttribute("value").contains(
+      ok(requestScope.querySelector(".name").getAttribute("value").includes(
         L10N.getStr("requestHeaders") + " (0"),
         "The request headers scope doesn't have the correct title.");
       // Can't test for full request headers title because the size may
       // vary across platforms ("User-Agent" header differs). We're pretty
       // sure it's smaller than 1 MB though, so it starts with a 0.
 
       is(responseScope.querySelectorAll(".variables-view-variable .name")[0].getAttribute("value"),
         "Cache-Control", "The first response header name was incorrect.");
--- a/browser/devtools/netmonitor/test/sjs_content-type-test-server.sjs
+++ b/browser/devtools/netmonitor/test/sjs_content-type-test-server.sjs
@@ -29,18 +29,18 @@ function doubleGzipCompressString(string
   };
   gzipCompressString(string, observer2);
 }
 
 function handleRequest(request, response) {
   response.processAsync();
 
   let params = request.queryString.split("&");
-  let format = (params.filter((s) => s.contains("fmt="))[0] || "").split("=")[1];
-  let status = (params.filter((s) => s.contains("sts="))[0] || "").split("=")[1] || 200;
+  let format = (params.filter((s) => s.includes("fmt="))[0] || "").split("=")[1];
+  let status = (params.filter((s) => s.includes("sts="))[0] || "").split("=")[1] || 200;
 
   let cachedCount = 0;
   let cacheExpire = 60; // seconds
 
   function setCacheHeaders() {
     if (status != 304) {
       response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
       response.setHeader("Pragma", "no-cache");
@@ -73,17 +73,17 @@ function handleRequest(request, response
         response.setStatusLine(request.httpVersion, status, "OK");
         response.setHeader("Content-Type", "text/xml; charset=utf-8", false);
         setCacheHeaders();
         response.write("<label value='greeting'>Hello XML!</label>");
         response.finish();
         break;
       }
       case "html": {
-        let content = params.filter((s) => s.contains("res="))[0].split("=")[1];
+        let content = params.filter((s) => s.includes("res="))[0].split("=")[1];
         response.setStatusLine(request.httpVersion, status, "OK");
         response.setHeader("Content-Type", "text/html; charset=utf-8", false);
         setCacheHeaders();
         response.write(content || "<p>Hello HTML!</p>");
         response.finish();
         break;
       }
       case "html-long": {
@@ -115,26 +115,26 @@ function handleRequest(request, response
         response.setStatusLine(request.httpVersion, status, "OK");
         response.setHeader("Content-Type", "application/json; charset=utf-8", false);
         setCacheHeaders();
         response.write("{ \"greeting\": \"Hello JSON!\" }");
         response.finish();
         break;
       }
       case "jsonp": {
-        let fun = params.filter((s) => s.contains("jsonp="))[0].split("=")[1];
+        let fun = params.filter((s) => s.includes("jsonp="))[0].split("=")[1];
         response.setStatusLine(request.httpVersion, status, "OK");
         response.setHeader("Content-Type", "text/json; charset=utf-8", false);
         setCacheHeaders();
         response.write(fun + "({ \"greeting\": \"Hello JSONP!\" })");
         response.finish();
         break;
       }
       case "jsonp2": {
-        let fun = params.filter((s) => s.contains("jsonp="))[0].split("=")[1];
+        let fun = params.filter((s) => s.includes("jsonp="))[0].split("=")[1];
         response.setStatusLine(request.httpVersion, status, "OK");
         response.setHeader("Content-Type", "text/json; charset=utf-8", false);
         setCacheHeaders();
         response.write(" " + fun + " ( { \"greeting\": \"Hello weird JSONP!\" } ) ; ");
         response.finish();
         break;
       }
       case "json-long": {
--- a/browser/devtools/netmonitor/test/sjs_sorting-test-server.sjs
+++ b/browser/devtools/netmonitor/test/sjs_sorting-test-server.sjs
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const { classes: Cc, interfaces: Ci } = Components;
 
 function handleRequest(request, response) {
   response.processAsync();
 
   let params = request.queryString.split("&");
-  let index = params.filter((s) => s.contains("index="))[0].split("=")[1];
+  let index = params.filter((s) => s.includes("index="))[0].split("=")[1];
 
   let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
   timer.initWithCallback(() => {
     // to avoid garbage collection
     timer = null;
     response.setStatusLine(request.httpVersion, index == 1 ? 101 : index * 100, "Meh");
 
     response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
--- a/browser/devtools/netmonitor/test/sjs_status-codes-test-server.sjs
+++ b/browser/devtools/netmonitor/test/sjs_status-codes-test-server.sjs
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const { classes: Cc, interfaces: Ci } = Components;
 
 function handleRequest(request, response) {
   response.processAsync();
 
   let params = request.queryString.split("&");
-  let status = params.filter(s => s.contains("sts="))[0].split("=")[1];
+  let status = params.filter(s => s.includes("sts="))[0].split("=")[1];
   let cached = params.filter(s => s === 'cached').length !== 0;
 
   let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
   timer.initWithCallback(() => {
     // to avoid garbage collection
     timer = null;
     switch (status) {
       case "100":
--- a/browser/devtools/performance/test/browser_profiler_tree-view-02.js
+++ b/browser/devtools/performance/test/browser_profiler_tree-view-02.js
@@ -60,17 +60,17 @@ function test() {
   is($$perc(1).getAttribute("value"), "100%",
     "The .A node's percentage cell displays the correct value.");
   is($$sampl(1).getAttribute("value"), "4",
     "The .A node's samples cell displays the correct value.");
   is($$fun(".call-tree-name")[1].getAttribute("value"), "A",
     "The .A node's function cell displays the correct name.");
   is($$fun(".call-tree-url")[1].getAttribute("value"), "baz",
     "The .A node's function cell displays the correct url.");
-  ok($$fun(".call-tree-url")[1].getAttribute("tooltiptext").contains("http://foo/bar/baz"),
+  ok($$fun(".call-tree-url")[1].getAttribute("tooltiptext").includes("http://foo/bar/baz"),
     "The .A node's function cell displays the correct url tooltiptext.");
   is($$fun(".call-tree-line")[1].getAttribute("value"), ":12",
     "The .A node's function cell displays the correct line.");
   is($$fun(".call-tree-host")[1].getAttribute("value"), "foo",
     "The .A node's function cell displays the correct host.");
   is($$fun(".call-tree-category")[1].getAttribute("value"), "Gecko",
     "The .A node's function cell displays the correct category.");
 
@@ -89,17 +89,17 @@ function test() {
   is($$perc(2).getAttribute("value"), "75%",
     "The .A.B node's percentage cell displays the correct value.");
   is($$sampl(2).getAttribute("value"), "3",
     "The .A.B node's samples cell displays the correct value.");
   is($$fun(".call-tree-name")[2].getAttribute("value"), "B",
     "The .A.B node's function cell displays the correct name.");
   is($$fun(".call-tree-url")[2].getAttribute("value"), "baz",
     "The .A.B node's function cell displays the correct url.");
-  ok($$fun(".call-tree-url")[2].getAttribute("tooltiptext").contains("http://foo/bar/baz"),
+  ok($$fun(".call-tree-url")[2].getAttribute("tooltiptext").includes("http://foo/bar/baz"),
     "The .A.B node's function cell displays the correct url tooltiptext.");
   is($$fun(".call-tree-line")[2].getAttribute("value"), ":34",
     "The .A.B node's function cell displays the correct line.");
   is($$fun(".call-tree-host")[2].getAttribute("value"), "foo",
     "The .A.B node's function cell displays the correct host.");
   is($$fun(".call-tree-category")[2].getAttribute("value"), "Styles",
     "The .A.B node's function cell displays the correct category.");
 
@@ -108,17 +108,17 @@ function test() {
   is($$perc(3).getAttribute("value"), "25%",
     "The .A.E node's percentage cell displays the correct value.");
   is($$sampl(3).getAttribute("value"), "1",
     "The .A.E node's samples cell displays the correct value.");
   is($$fun(".call-tree-name")[3].getAttribute("value"), "E",
     "The .A.E node's function cell displays the correct name.");
   is($$fun(".call-tree-url")[3].getAttribute("value"), "baz",
     "The .A.E node's function cell displays the correct url.");
-  ok($$fun(".call-tree-url")[3].getAttribute("tooltiptext").contains("http://foo/bar/baz"),
+  ok($$fun(".call-tree-url")[3].getAttribute("tooltiptext").includes("http://foo/bar/baz"),
     "The .A.E node's function cell displays the correct url tooltiptext.");
   is($$fun(".call-tree-line")[3].getAttribute("value"), ":90",
     "The .A.E node's function cell displays the correct line.");
   is($$fun(".call-tree-host")[3].getAttribute("value"), "foo",
     "The .A.E node's function cell displays the correct host.");
   is($$fun(".call-tree-category")[3].getAttribute("value"), "GC",
     "The .A.E node's function cell displays the correct category.");
 
--- a/browser/devtools/projecteditor/lib/editors.js
+++ b/browser/devtools/projecteditor/lib/editors.js
@@ -129,18 +129,18 @@ var TextEditor = Class({
     let extraKeys = {};
 
     // Copy all of the registered keys into extraKeys object, to notify CodeMirror
     // that it should be ignoring these keys
     [...this.projectEditorKeyset.querySelectorAll("key")].forEach((key) => {
       let keyUpper = key.getAttribute("key").toUpperCase();
       let toolModifiers = key.getAttribute("modifiers");
       let modifiers = {
-        alt: toolModifiers.contains("alt"),
-        shift: toolModifiers.contains("shift")
+        alt: toolModifiers.includes("alt"),
+        shift: toolModifiers.includes("shift")
       };
 
       // On the key press, we will dispatch the event within projecteditor.
       extraKeys[Editor.accel(keyUpper, modifiers)] = () => {
         let doc = this.projectEditorCommandset.ownerDocument;
         let event = doc.createEvent('Event');
         event.initEvent('command', true, true);
         let command = this.projectEditorCommandset.querySelector("#" + key.getAttribute("command"));
--- a/browser/devtools/scratchpad/test/browser_scratchpad_eval_func.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_eval_func.js
@@ -73,14 +73,14 @@ function runTests(sw)
       sp.editor.setCursor({ line: 0, ch: 9 });
       return sp.evalTopLevelFunction();
     })
     .then(([text, error, result]) => {
       is(text, "function {}",
          "Should get the full text back since there was a parse error.");
       ok(!error, "Should not have got an error");
       ok(!result, "Should not have got a result");
-      ok(sp.getText().contains("SyntaxError"),
+      ok(sp.getText().includes("SyntaxError"),
          "We should have written the syntax error to the scratchpad.");
     })
 
     .then(finish, reportErrorAndQuit);
 }
--- a/browser/devtools/scratchpad/test/browser_scratchpad_pprint-02.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_pprint-02.js
@@ -22,17 +22,17 @@ function runTests(sw)
   gTabsize = Services.prefs.getIntPref("devtools.editor.tabsize");
   Services.prefs.setIntPref("devtools.editor.tabsize", 6);
   const space = " ".repeat(6);
 
   const sp = sw.Scratchpad;
   sp.setText("function main() { console.log(5); }");
   sp.prettyPrint().then(() => {
     const prettyText = sp.getText();
-    ok(prettyText.contains(space));
+    ok(prettyText.includes(space));
     finish();
   }).then(null, error => {
     ok(false, error);
   });
 }
 
 registerCleanupFunction(function () {
   Services.prefs.setIntPref("devtools.editor.tabsize", gTabsize);
--- a/browser/devtools/scratchpad/test/browser_scratchpad_pprint.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_pprint.js
@@ -16,14 +16,14 @@ function test()
 }
 
 function runTests(sw)
 {
   const sp = sw.Scratchpad;
   sp.setText("function main() { console.log(5); }");
   sp.prettyPrint().then(() => {
     const prettyText = sp.getText();
-    ok(prettyText.contains("\n"));
+    ok(prettyText.includes("\n"));
     finish();
   }).then(null, error => {
     ok(false, error);
   });
 }
--- a/browser/devtools/shadereditor/test/browser_se_editors-error-gutter.js
+++ b/browser/devtools/shadereditor/test/browser_se_editors-error-gutter.js
@@ -90,19 +90,19 @@ function ifWebGLSupported() {
     is(parsed.length >= 1, bool,
       "There's " + (bool ? ">= 1" : "< 1") + " parsed vertex shader error(s).");
 
     if (bool) {
       is(parsed[0].line, line,
         "The correct line was parsed.");
       is(parsed[0].messages.length, 2,
         "There are 2 parsed messages.");
-      ok(parsed[0].messages[0].contains("'constructor' : too many arguments"),
+      ok(parsed[0].messages[0].includes("'constructor' : too many arguments"),
         "The correct first message was parsed.");
-      ok(parsed[0].messages[1].contains("'assign' : cannot convert from"),
+      ok(parsed[0].messages[1].includes("'assign' : cannot convert from"),
         "The correct second message was parsed.");
     }
   }
 
   function checkHasVertSecondError(bool, error) {
     ok(error, "Vertex shader compiled with errors.");
     isnot(error.link, "", "The linkage status should not be empty.");
 
@@ -118,17 +118,17 @@ function ifWebGLSupported() {
     is(parsed.length >= 2, bool,
       "There's " + (bool ? ">= 2" : "< 2") + " parsed vertex shader error(s).");
 
     if (bool) {
       is(parsed[1].line, line,
         "The correct line was parsed.");
       is(parsed[1].messages.length, 1,
         "There is 1 parsed message.");
-      ok(parsed[1].messages[0].contains("'assign' : cannot convert from"),
+      ok(parsed[1].messages[0].includes("'assign' : cannot convert from"),
         "The correct message was parsed.");
     }
   }
 
   function checkHasFragError(bool, error) {
     ok(error, "Fragment shader compiled with errors.");
     isnot(error.link, "", "The linkage status should not be empty.");
 
@@ -144,13 +144,13 @@ function ifWebGLSupported() {
     is(parsed.length >= 1, bool,
       "There's " + (bool ? ">= 2" : "< 1") + " parsed fragment shader error(s).");
 
     if (bool) {
       is(parsed[0].line, line,
         "The correct line was parsed.");
       is(parsed[0].messages.length, 1,
         "There is 1 parsed message.");
-      ok(parsed[0].messages[0].contains("'constructor' : too many arguments"),
+      ok(parsed[0].messages[0].includes("'constructor' : too many arguments"),
         "The correct message was parsed.");
     }
   }
 }
--- a/browser/devtools/shadereditor/test/browser_se_editors-error-tooltip.js
+++ b/browser/devtools/shadereditor/test/browser_se_editors-error-tooltip.js
@@ -30,27 +30,27 @@ function ifWebGLSupported() {
   ShadersEditorsView._onMarkerMouseOver(7, marker, parsed);
 
   let tooltip = marker._markerErrorsTooltip;
   ok(tooltip, "A tooltip was created successfully.");
 
   let content = tooltip.content;
   ok(tooltip.content,
     "Some tooltip's content was set.");
-  ok(tooltip.content.className.contains("devtools-tooltip-simple-text-container"),
+  ok(tooltip.content.className.includes("devtools-tooltip-simple-text-container"),
     "The tooltip's content container was created correctly.");
 
   let messages = content.childNodes;
   is(messages.length, 2,
     "There are two messages displayed in the tooltip.");
-  ok(messages[0].className.contains("devtools-tooltip-simple-text"),
+  ok(messages[0].className.includes("devtools-tooltip-simple-text"),
     "The first message was created correctly.");
-  ok(messages[1].className.contains("devtools-tooltip-simple-text"),
+  ok(messages[1].className.includes("devtools-tooltip-simple-text"),
     "The second message was created correctly.");
 
-  ok(messages[0].textContent.contains("'constructor' : too many arguments"),
+  ok(messages[0].textContent.includes("'constructor' : too many arguments"),
     "The first message contains the correct text.");
-  ok(messages[1].textContent.contains("'assign' : cannot convert"),
+  ok(messages[1].textContent.includes("'assign' : cannot convert"),
     "The second message contains the correct text.");
 
   yield teardown(panel);
   finish();
 }
--- a/browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js
+++ b/browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js
@@ -28,35 +28,35 @@ function ifWebGLSupported() {
 
   // The implementation has the choice to defer all compile-time errors to link time.
   let infoLog = (error.compile != "") ? error.compile : error.link;
 
   isnot(infoLog, "",
     "The one of the compile or link info logs should not be empty.");
   is(infoLog.split("ERROR").length - 1, 2,
     "The info log status contains two errors.");
-  ok(infoLog.contains("ERROR: 0:8: 'constructor'"),
+  ok(infoLog.includes("ERROR: 0:8: 'constructor'"),
     "A constructor error is contained in the info log.");
-  ok(infoLog.contains("ERROR: 0:8: 'assign'"),
+  ok(infoLog.includes("ERROR: 0:8: 'assign'"),
     "An assignment error is contained in the info log.");
 
 
   fsEditor.replaceText("vec4", { line: 2, ch: 14 }, { line: 2, ch: 18 });
   [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED);
 
   ok(error,
     "The new fragment shader source was compiled with errors.");
 
   infoLog = (error.compile != "") ? error.compile : error.link;
 
   isnot(infoLog, "",
     "The one of the compile or link info logs should not be empty.");
   is(infoLog.split("ERROR").length - 1, 1,
     "The info log contains one error.");
-  ok(infoLog.contains("ERROR: 0:6: 'constructor'"),
+  ok(infoLog.includes("ERROR: 0:6: 'constructor'"),
     "A constructor error is contained in the info log.");
 
 
   yield ensurePixelIs(gFront, { x: 0, y: 0 }, { r: 255, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(gFront, { x: 511, y: 511 }, { r: 0, g: 255, b: 0, a: 255 }, true);
 
   vsEditor.replaceText("vec4", { line: 7, ch: 22 }, { line: 7, ch: 26 });
   [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED);
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-05.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-05.js
@@ -10,18 +10,18 @@ function ifWebGLSupported() {
   let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
   front.setup({ reload: true });
 
   let programActor = yield once(front, "program-linked");
   let vertexShader = yield programActor.getVertexShader();
   let fragmentShader = yield programActor.getFragmentShader();
 
   let vertSource = yield vertexShader.getText();
-  ok(vertSource.contains("gl_Position"),
+  ok(vertSource.includes("gl_Position"),
     "The correct vertex shader source was retrieved.");
 
   let fragSource = yield fragmentShader.getText();
-  ok(fragSource.contains("gl_FragColor"),
+  ok(fragSource.includes("gl_FragColor"),
     "The correct fragment shader source was retrieved.");
 
   yield removeTab(target.tab);
   finish();
 }
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-06.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-06.js
@@ -49,16 +49,16 @@ function ifWebGLSupported() {
       let newFragmentShader = yield programActor.getFragmentShader();
       is(vertexShader, newVertexShader,
         "The same vertex shader actor was retrieved.");
       is(fragmentShader, newFragmentShader,
         "The same fragment shader actor was retrieved.");
 
       let vertSource = yield newVertexShader.getText();
       let fragSource = yield newFragmentShader.getText();
-      ok(vertSource.contains("I'm special!") &&
-         fragSource.contains("I'm also special!"), aMessage);
+      ok(vertSource.includes("I'm special!") &&
+         fragSource.includes("I'm also special!"), aMessage);
     });
   }
 
   yield removeTab(target.tab);
   finish();
 }
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js
@@ -14,48 +14,48 @@ function ifWebGLSupported() {
   let fragmentShader = yield programActor.getFragmentShader();
 
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 255, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 128, y: 128 }, { r: 191, g: 64, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 255, b: 0, a: 255 }, true);
 
   let vertSource = yield vertexShader.getText();
   let fragSource = yield fragmentShader.getText();
-  ok(!vertSource.contains("2.0"),
+  ok(!vertSource.includes("2.0"),
     "The vertex shader source is correct before changing it.");
-  ok(!fragSource.contains("0.5"),
+  ok(!fragSource.includes("0.5"),
     "The fragment shader source is correct before changing it.");
 
   let newVertSource = vertSource.replace("1.0", "2.0");
   let status = yield vertexShader.compile(newVertSource);
   ok(!status,
     "The new vertex shader source was compiled without errors.");
 
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 0, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 128, y: 128 }, { r: 255, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 0, b: 0, a: 255 }, true);
 
   vertSource = yield vertexShader.getText();
   fragSource = yield fragmentShader.getText();
-  ok(vertSource.contains("2.0"),
+  ok(vertSource.includes("2.0"),
     "The vertex shader source is correct after changing it.");
-  ok(!fragSource.contains("0.5"),
+  ok(!fragSource.includes("0.5"),
     "The fragment shader source is correct after changing the vertex shader.");
 
   let newFragSource = fragSource.replace("1.0", "0.5");
   status = yield fragmentShader.compile(newFragSource);
   ok(!status,
     "The new fragment shader source was compiled without errors.");
 
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 0, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 128, y: 128 }, { r: 255, g: 0, b: 0, a: 127 }, true);
   yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 0, b: 0, a: 255 }, true);
 
   vertSource = yield vertexShader.getText();
   fragSource = yield fragmentShader.getText();
-  ok(vertSource.contains("2.0"),
+  ok(vertSource.includes("2.0"),
     "The vertex shader source is correct after changing the fragment shader.");
-  ok(fragSource.contains("0.5"),
+  ok(fragSource.includes("0.5"),
     "The fragment shader source is correct after changing it.");
 
   yield removeTab(target.tab);
   finish();
 }
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-08.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-08.js
@@ -22,16 +22,16 @@ function ifWebGLSupported() {
 
   yield front.waitForFrame();
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 0, g: 0, b: 255, a: 255 }, true);
   yield ensurePixelIs(front, { x: 128, y: 128 }, { r: 0, g: 0, b: 255, a: 255 }, true);
   yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 0, b: 255, a: 255 }, true);
 
   let vertSource = yield vertexShader.getText();
   let fragSource = yield fragmentShader.getText();
-  ok(vertSource.contains("vFragmentColor = vec3(0, 0, 1);"),
+  ok(vertSource.includes("vFragmentColor = vec3(0, 0, 1);"),
     "The vertex shader source is correct after changing it.");
-  ok(fragSource.contains("gl_FragColor = vec4(vFragmentColor, 1.0);"),
+  ok(fragSource.includes("gl_FragColor = vec4(vFragmentColor, 1.0);"),
     "The fragment shader source is correct after changing the vertex shader.");
 
   yield removeTab(target.tab);
   finish();
 }
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-09.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-09.js
@@ -26,28 +26,28 @@ function ifWebGLSupported() {
 
     // The implementation has the choice to defer all compile-time errors to link time.
     let infoLog = (error.compile != "") ? error.compile : error.link;
 
     isnot(infoLog, "",
       "The one of the compile or link info logs should not be empty.");
     is(infoLog.split("ERROR").length - 1, 2,
       "The info log contains two errors.");
-    ok(infoLog.contains("ERROR: 0:8: 'constructor'"),
+    ok(infoLog.includes("ERROR: 0:8: 'constructor'"),
       "A constructor error is contained in the info log.");
-    ok(infoLog.contains("ERROR: 0:8: 'assign'"),
+    ok(infoLog.includes("ERROR: 0:8: 'assign'"),
       "An assignment error is contained in the info log.");
   }
 
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 255, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 255, b: 0, a: 255 }, true);
   ok(true, "The shader was reverted to the old source.");
 
   let vertSource = yield vertexShader.getText();
-  ok(vertSource.contains("vec4(aVertexPosition, 1.0);"),
+  ok(vertSource.includes("vec4(aVertexPosition, 1.0);"),
     "The previous correct vertex shader source was preserved.");
 
   let oldFragSource = yield fragmentShader.getText();
   let newFragSource = oldFragSource.replace("vec3", "vec4");
 
   try {
     yield fragmentShader.compile(newFragSource);
     ok(false, "Fragment shader was compiled with a defective source!");
@@ -57,26 +57,26 @@ function ifWebGLSupported() {
 
     // The implementation has the choice to defer all compile-time errors to link time.
     let infoLog = (error.compile != "") ? error.compile : error.link;
 
     isnot(infoLog, "",
       "The one of the compile or link info logs should not be empty.");
     is(infoLog.split("ERROR").length - 1, 1,
       "The info log contains one error.");
-    ok(infoLog.contains("ERROR: 0:6: 'constructor'"),
+    ok(infoLog.includes("ERROR: 0:6: 'constructor'"),
       "A constructor error is contained in the info log.");
   }
 
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 255, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 255, b: 0, a: 255 }, true);
   ok(true, "The shader was reverted to the old source.");
 
   let fragSource = yield fragmentShader.getText();
-  ok(fragSource.contains("vec3 vFragmentColor;"),
+  ok(fragSource.includes("vec3 vFragmentColor;"),
     "The previous correct fragment shader source was preserved.");
 
   yield programActor.highlight([0, 1, 0, 1]);
   yield ensurePixelIs(front, { x: 0, y: 0 }, { r: 0, g: 0, b: 0, a: 255 }, true);
   yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 255, b: 0, a: 255 }, true);
   ok(true, "Highlighting worked after setting a defective fragment source.");
 
   yield programActor.unhighlight();
--- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-12.js
+++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-12.js
@@ -12,16 +12,16 @@ function ifWebGLSupported() {
 
   let programActor = yield once(front, "program-linked");
   let vertexShader = yield programActor.getVertexShader();
   let fragmentShader = yield programActor.getFragmentShader();
 
   let vertSource = yield vertexShader.getText();
   let fragSource = yield fragmentShader.getText();
 
-  ok(vertSource.contains("I'm a vertex shader!"),
+  ok(vertSource.includes("I'm a vertex shader!"),
     "The correct vertex shader text was retrieved.");
-  ok(fragSource.contains("I'm a fragment shader!"),
+  ok(fragSource.includes("I'm a fragment shader!"),
     "The correct fragment shader text was retrieved.");
 
   yield removeTab(target.tab);
   finish();
 }
--- a/browser/devtools/shared/Curl.jsm
+++ b/browser/devtools/shared/Curl.jsm
@@ -152,24 +152,24 @@ this.CurlUtils = {
    */
   isUrlEncodedRequest: function(aData) {
     let postDataText = aData.postDataText;
     if (!postDataText) {
       return false;
     }
 
     postDataText = postDataText.toLowerCase();
-    if (postDataText.contains("content-type: application/x-www-form-urlencoded")) {
+    if (postDataText.includes("content-type: application/x-www-form-urlencoded")) {
       return true;
     }
 
     let contentType = this.findHeader(aData.headers, "content-type");
 
     return (contentType &&
-      contentType.toLowerCase().contains("application/x-www-form-urlencoded"));
+      contentType.toLowerCase().includes("application/x-www-form-urlencoded"));
   },
 
   /**
    * Check if the request is a multipart request.
    *
    * @param object aData
    *        The data source.
    * @return boolean
@@ -177,24 +177,24 @@ this.CurlUtils = {
    */
   isMultipartRequest: function(aData) {
     let postDataText = aData.postDataText;
     if (!postDataText) {
       return false;
     }
 
     postDataText = postDataText.toLowerCase();
-    if (postDataText.contains("content-type: multipart/form-data")) {
+    if (postDataText.includes("content-type: multipart/form-data")) {
       return true;
     }
 
     let contentType = this.findHeader(aData.headers, "content-type");
 
     return (contentType &&
-      contentType.toLowerCase().contains("multipart/form-data;"));
+      contentType.toLowerCase().includes("multipart/form-data;"));
   },
 
   /**
    * Write out paramters from post data text.
    *
    * @param object aPostDataText
    *        Post data text.
    * @return string
@@ -273,18 +273,18 @@ this.CurlUtils = {
     let parts = aMultipartText.split(boundary);
     for (let part of parts) {
       // Each part is expected to have a content disposition line.
       let contentDispositionLine = part.trimLeft().split("\r\n")[0];
       if (!contentDispositionLine) {
         continue;
       }
       contentDispositionLine = contentDispositionLine.toLowerCase();
-      if (contentDispositionLine.contains("content-disposition: form-data")) {
-        if (contentDispositionLine.contains("filename=")) {
+      if (contentDispositionLine.includes("content-disposition: form-data")) {
+        if (contentDispositionLine.includes("filename=")) {
           // The header lines and the binary blob is separated by 2 CRLF's.
           // Add only the headers to the result.
           let headers = part.split("\r\n\r\n")[0];
           result += boundary + "\r\n" + headers + "\r\n\r\n";
         }
         else {
           result += boundary + "\r\n" + part;
         }
--- a/browser/devtools/shared/Parser.jsm
+++ b/browser/devtools/shared/Parser.jsm
@@ -327,17 +327,17 @@ SyntaxTree.prototype = {
 
     SyntaxTreeVisitor.walk(this.AST, {
       /**
        * Callback invoked for each function declaration node.
        * @param Node aNode
        */
       onFunctionDeclaration: function(aNode) {
         let functionName = aNode.id.name;
-        if (functionName.toLowerCase().contains(lowerCaseToken)) {
+        if (functionName.toLowerCase().includes(lowerCaseToken)) {
           store.push({
             functionName: functionName,
             functionLocation: ParserHelpers.getNodeLocation(aNode)
           });
         }
       },
 
       /**
@@ -355,18 +355,18 @@ SyntaxTree.prototype = {
         let inferredChain = inferredInfo.chain;
         let inferredLocation = inferredInfo.loc;
 
         // Current node may be part of a larger assignment expression stack.
         if (aNode._parent.type == "AssignmentExpression") {
           this.onFunctionExpression(aNode._parent);
         }
 
-        if ((functionName && functionName.toLowerCase().contains(lowerCaseToken)) ||
-            (inferredName && inferredName.toLowerCase().contains(lowerCaseToken))) {
+        if ((functionName && functionName.toLowerCase().includes(lowerCaseToken)) ||
+            (inferredName && inferredName.toLowerCase().includes(lowerCaseToken))) {
           store.push({
             functionName: functionName,
             functionLocation: functionLocation,
             inferredName: inferredName,
             inferredChain: inferredChain,
             inferredLocation: inferredLocation
           });
         }
@@ -383,17 +383,17 @@ SyntaxTree.prototype = {
         let inferredChain = inferredInfo.chain;
         let inferredLocation = inferredInfo.loc;
 
         // Current node may be part of a larger assignment expression stack.
         if (aNode._parent.type == "AssignmentExpression") {
           this.onFunctionExpression(aNode._parent);
         }
 
-        if (inferredName && inferredName.toLowerCase().contains(lowerCaseToken)) {
+        if (inferredName && inferredName.toLowerCase().includes(lowerCaseToken)) {
           store.push({
             inferredName: inferredName,
             inferredChain: inferredChain,
             inferredLocation: inferredLocation
           });
         }
       }
     });
--- a/browser/devtools/shared/autocomplete-popup.js
+++ b/browser/devtools/shared/autocomplete-popup.js
@@ -255,17 +255,17 @@ AutocompletePopup.prototype = {
 
   /**
    * Selects the first item of the richlistbox. Note that first item here is the
    * item closes to the input element, which means that 0th index if position is
    * below, and last index if position is above.
    */
   selectFirstItem: function AP_selectFirstItem()
   {
-    if (this.position.contains("before")) {
+    if (this.position.includes("before")) {
       this.selectedIndex = this.itemCount - 1;
     }
     else {
       this.selectedIndex = 0;
     }
     this._list.ensureIndexIsVisible(this._list.selectedIndex);
   },
 
--- a/browser/devtools/shared/test/browser_telemetry_button_paintflashing.js
+++ b/browser/devtools/shared/test/browser_telemetry_button_paintflashing.js
@@ -53,17 +53,17 @@ function delayedClicks(node, clicks) {
   });
 }
 
 function checkResults(histIdFocus, Telemetry) {
   let result = Telemetry.prototype.telemetryInfo;
 
   for (let [histId, value] of Iterator(result)) {
     if (histId.startsWith("DEVTOOLS_INSPECTOR_") ||
-        !histId.contains(histIdFocus)) {
+        !histId.includes(histIdFocus)) {
       // Inspector stats are tested in
       // browser_telemetry_toolboxtabs_{toolname}.js so we skip them here
       // because we only open the inspector once for this test.
       continue;
     }
 
     if (histId.endsWith("OPENED_PER_USER_FLAG")) {
       ok(value.length === 1 && value[0] === true,
--- a/browser/devtools/shared/test/browser_telemetry_button_responsive.js
+++ b/browser/devtools/shared/test/browser_telemetry_button_responsive.js
@@ -53,17 +53,17 @@ function delayedClicks(node, clicks) {
   });
 }
 
 function checkResults(histIdFocus, Telemetry) {
   let result = Telemetry.prototype.telemetryInfo;
 
   for (let [histId, value] of Iterator(result)) {
     if (histId.startsWith("DEVTOOLS_INSPECTOR_") ||
-        !histId.contains(histIdFocus)) {
+        !histId.includes(histIdFocus)) {
       // Inspector stats are tested in
       // browser_telemetry_toolboxtabs_{toolname}.js so we skip them here
       // because we only open the inspector once for this test.
       continue;
     }
 
     if (histId.endsWith("OPENED_PER_USER_FLAG")) {
       ok(value.length === 1 && value[0] === true,
--- a/browser/devtools/shared/test/browser_telemetry_button_scratchpad.js
+++ b/browser/devtools/shared/test/browser_telemetry_button_scratchpad.js
@@ -91,17 +91,17 @@ function delayedClicks(node, clicks) {
   });
 }
 
 function checkResults(histIdFocus, Telemetry) {
   let result = Telemetry.prototype.telemetryInfo;
 
   for (let [histId, value] of Iterator(result)) {
     if (histId.startsWith("DEVTOOLS_INSPECTOR_") ||
-        !histId.contains(histIdFocus)) {
+        !histId.includes(histIdFocus)) {
       // Inspector stats are tested in
       // browser_telemetry_toolboxtabs_{toolname}.js so we skip them here
       // because we only open the inspector once for this test.
       continue;
     }
 
     if (histId.endsWith("OPENED_PER_USER_FLAG")) {
       ok(value.length === 1 && value[0] === true,
--- a/browser/devtools/shared/test/browser_telemetry_button_tilt.js
+++ b/browser/devtools/shared/test/browser_telemetry_button_tilt.js
@@ -53,17 +53,17 @@ function delayedClicks(node, clicks) {
   });
 }
 
 function checkResults(histIdFocus, Telemetry) {
   let result = Telemetry.prototype.telemetryInfo;
 
   for (let [histId, value] of Iterator(result)) {
     if (histId.startsWith("DEVTOOLS_INSPECTOR_") ||
-        !histId.contains(histIdFocus)) {
+        !histId.includes(histIdFocus)) {
       // Inspector stats are tested in
       // browser_telemetry_toolboxtabs_{toolname}.js so we skip them here
       // because we only open the inspector once for this test.
       continue;
     }
 
     if (histId.endsWith("OPENED_PER_USER_FLAG")) {
       ok(value.length === 1 && value[0] === true,
--- a/browser/devtools/shared/widgets/SideMenuWidget.jsm
+++ b/browser/devtools/shared/widgets/SideMenuWidget.jsm
@@ -505,17 +505,17 @@ SideMenuGroup.prototype = {
    */
   findExpectedIndexForSelf: function(sortPredicate) {
     let identifier = this.identifier;
     let groupsArray = this._orderedGroupElementsArray;
 
     for (let group of groupsArray) {
       let name = group.getAttribute("name");
       if (sortPredicate(name, identifier) > 0 && // Insertion sort at its best :)
-          !name.contains(identifier)) { // Least significant group should be last.
+          !name.includes(identifier)) { // Least significant group should be last.
         return groupsArray.indexOf(group);
       }
     }
     return -1;
   },
 
   window: null,
   document: null,
--- a/browser/devtools/shared/widgets/VariablesView.jsm
+++ b/browser/devtools/shared/widgets/VariablesView.jsm
@@ -1145,17 +1145,17 @@ VariablesView.getterOrSetterEvalMacro = 
 
     default:
       // Wrap statements inside a function declaration if not already wrapped.
       if (!aCurrentString.startsWith("function")) {
         let header = "function(" + (type == "set" ? "value" : "") + ")";
         let body = "";
         // If there's a return statement explicitly written, always use the
         // standard function definition syntax
-        if (aCurrentString.contains("return ")) {
+        if (aCurrentString.includes("return ")) {
           body = "{" + aCurrentString + "}";
         }
         // If block syntax is used, use the whole string as the function body.
         else if (aCurrentString.startsWith("{")) {
           body = aCurrentString;
         }
         // Prefer an expression closure.
         else {
@@ -1920,18 +1920,18 @@ Scope.prototype = {
    */
   _performSearch: function(aLowerCaseQuery) {
     for (let [, variable] of this._store) {
       let currentObject = variable;
       let lowerCaseName = variable._nameString.toLowerCase();
       let lowerCaseValue = variable._valueString.toLowerCase();
 
       // Non-matched variables or properties require a corresponding attribute.
-      if (!lowerCaseName.contains(aLowerCaseQuery) &&
-          !lowerCaseValue.contains(aLowerCaseQuery)) {
+      if (!lowerCaseName.includes(aLowerCaseQuery) &&
+          !lowerCaseValue.includes(aLowerCaseQuery)) {
         variable._matched = false;
       }
       // Variable or property is matched.
       else {
         variable._matched = true;
 
         // If the variable was ever expanded, there's a possibility it may
         // contain some matched properties, so make sure they're visible
--- a/browser/devtools/sourceeditor/editor.js
+++ b/browser/devtools/sourceeditor/editor.js
@@ -1151,17 +1151,17 @@ function getCSSKeywords() {
   }
 
   let domUtils = Cc["@mozilla.org/inspector/dom-utils;1"]
                    .getService(Ci.inIDOMUtils);
   let cssProperties = domUtils.getCSSPropertyNames(domUtils.INCLUDE_ALIASES);
   let cssColors = {};
   let cssValues = {};
   cssProperties.forEach(property => {
-    if (property.contains("color")) {
+    if (property.includes("color")) {
       domUtils.getCSSValuesForProperty(property).forEach(value => {
         cssColors[value] = true;
       });
     }
     else {
       domUtils.getCSSValuesForProperty(property).forEach(value => {
         cssValues[value] = true;
       });
--- a/browser/devtools/storage/ui.js
+++ b/browser/devtools/storage/ui.js
@@ -443,18 +443,18 @@ StorageUI.prototype = {
       let kv = separators[i];
       for (let j = 0; j < separators.length; j++) {
         if (i == j) {
           continue;
         }
         let p = separators[j];
         let regex = new RegExp("^([^" + kv + p + "]*" + kv + "+[^" + kv + p +
                                "]*" + p + "*)+$", "g");
-        if (value.match(regex) && value.contains(kv) &&
-            (value.contains(p) || value.split(kv).length == 2)) {
+        if (value.match(regex) && value.includes(kv) &&
+            (value.includes(p) || value.split(kv).length == 2)) {
           return makeObject(kv, p);
         }
       }
     }
     // Testing for array
     for (let i = 0; i < separators.length; i++) {
       let p = separators[i];
       let regex = new RegExp("^[^" + p + "]+(" + p + "+[^" + p + "]*)+$", "g");
--- a/browser/devtools/styleinspector/css-parsing-utils.js
+++ b/browser/devtools/styleinspector/css-parsing-utils.js
@@ -7,18 +7,18 @@
 "use strict";
 
 const cssTokenizer  = require("devtools/sourceeditor/css-tokenizer");
 
 /**
  * Returns the string enclosed in quotes
  */
 function quoteString(string) {
-  let hasDoubleQuotes = string.contains('"');
-  let hasSingleQuotes = string.contains("'");
+  let hasDoubleQuotes = string.includes('"');
+  let hasSingleQuotes = string.includes("'");
 
   let quote = '"';
   if (hasDoubleQuotes && !hasSingleQuotes) {
     quote = "'";
   }
 
   // Quote special characters as specified by the CSS grammar.
   // See http://www.w3.org/TR/CSS2/syndata.html#tokenization
--- a/browser/devtools/webconsole/test/browser_bug_865871_variables_view_close_on_esc_key.js
+++ b/browser/devtools/webconsole/test/browser_bug_865871_variables_view_close_on_esc_key.js
@@ -23,17 +23,17 @@ function test()
 
     let msg = yield execute("fooObj");
     ok(msg, "output message found");
 
     let anchor = msg.querySelector("a");
     let body = msg.querySelector(".message-body");
     ok(anchor, "object anchor");
     ok(body, "message body");
-    ok(body.textContent.contains('testProp: "testValue"'), "message text check");
+    ok(body.textContent.includes('testProp: "testValue"'), "message text check");
 
     msg.scrollIntoView();
     executeSoon(() => {
       EventUtils.synthesizeMouse(anchor, 2, 2, {}, hud.iframeWindow);
     });
 
     let vviewVar = yield jsterm.once("variablesview-fetched");
     let vview = vviewVar._variablesView;
@@ -57,17 +57,17 @@ function test()
 
     msg = yield execute("window.location");
     ok(msg, "output message found");
 
     body = msg.querySelector(".message-body");
     ok(body, "message body");
     anchor = msg.querySelector("a");
     ok(anchor, "object anchor");
-    ok(body.textContent.contains("Location \u2192 http://example.com/browser/"),
+    ok(body.textContent.includes("Location \u2192 http://example.com/browser/"),
        "message text check");
 
     msg.scrollIntoView();
     executeSoon(() => {
       EventUtils.synthesizeMouse(anchor, 2, 2, {}, hud.iframeWindow)
     });
     vviewVar = yield jsterm.once("variablesview-fetched");
 
--- a/browser/devtools/webconsole/test/browser_bug_869003_inspect_cross_domain_object.js
+++ b/browser/devtools/webconsole/test/browser_bug_869003_inspect_cross_domain_object.js
@@ -35,17 +35,17 @@ let test = asyncTest(function* () {
   let msg = [...result.matched][0];
   ok(msg, "message element");
 
   let body = msg.querySelector(".message-body");
   ok(body, "message body");
 
   let clickable = result.clickableElements[0];
   ok(clickable, "clickable object found");
-  ok(body.textContent.contains('{ hello: "world!",'), "message text check");
+  ok(body.textContent.includes('{ hello: "world!",'), "message text check");
 
   executeSoon(() => {
     EventUtils.synthesizeMouse(clickable, 2, 2, {}, hud.iframeWindow)
   });
 
   let aVar = yield hud.jsterm.once("variablesview-fetched");
   ok(aVar, "variables view fetched");
   ok(aVar._variablesView, "variables view object");
--- a/browser/devtools/webconsole/test/browser_console_log_inspectable_object.js
+++ b/browser/devtools/webconsole/test/browser_console_log_inspectable_object.js
@@ -28,17 +28,17 @@ let test = asyncTest(function*() {
   let msg = [...result.matched][0];
   ok(msg, "message element");
 
   let body = msg.querySelector(".message-body");
   ok(body, "message body");
 
   let clickable = result.clickableElements[0];
   ok(clickable, "the console.log() object anchor was found");
-  ok(body.textContent.contains('{ abba: "omgBug676722" }'),
+  ok(body.textContent.includes('{ abba: "omgBug676722" }'),
      "clickable node content is correct");
 
   executeSoon(() => {
     EventUtils.synthesizeMouse(clickable, 2, 2, {}, hud.iframeWindow);
   });
 
   let varView = yield hud.jsterm.once("variablesview-fetched");
   ok(varView, "object inspector opened on click");
--- a/browser/devtools/webconsole/test/browser_console_variables_view.js
+++ b/browser/devtools/webconsole/test/browser_console_variables_view.js
@@ -16,17 +16,17 @@ let test = asyncTest(function* () {
 
   hud = yield openConsole();
 
   gWebConsole = hud;
   gJSTerm = hud.jsterm;
   let msg = yield gJSTerm.execute("fooObj");
 
   ok(msg, "output message found");
-  ok(msg.textContent.contains('{ testProp: "testValue" }'), "message text check");
+  ok(msg.textContent.includes('{ testProp: "testValue" }'), "message text check");
 
   let anchor = msg.querySelector("a");
   ok(anchor, "object link found");
 
   let fetched = gJSTerm.once("variablesview-fetched");
 
   // executeSoon
   EventUtils.synthesizeMouse(anchor, 2, 2, {}, gWebConsole.iframeWindow);
--- a/browser/devtools/webconsole/test/browser_console_variables_view_while_debugging.js
+++ b/browser/devtools/webconsole/test/browser_console_variables_view_while_debugging.js
@@ -55,17 +55,17 @@ function onFramesAdded()
     )
   );
 }
 
 
 function onExecuteFooObj(msg)
 {
   ok(msg, "output message found");
-  ok(msg.textContent.contains('{ testProp2: "testValue2" }'), "message text check");
+  ok(msg.textContent.includes('{ testProp2: "testValue2" }'), "message text check");
 
   let anchor = msg.querySelector("a");
   ok(anchor, "object link found");
 
   gJSTerm.once("variablesview-fetched", onFooObjFetch);
 
   executeSoon(() => EventUtils.synthesizeMouse(anchor, 2, 2, {},
                                                gWebConsole.iframeWindow));
--- a/browser/devtools/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js
+++ b/browser/devtools/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js
@@ -52,17 +52,17 @@ function onFramesAdded()
   info("onFramesAdded");
 
   openConsole().then(() => gJSTerm.execute("fooObj").then(onExecuteFooObj));
 }
 
 function onExecuteFooObj(msg)
 {
   ok(msg, "output message found");
-  ok(msg.textContent.contains('{ testProp2: "testValue2" }'),
+  ok(msg.textContent.includes('{ testProp2: "testValue2" }'),
      "message text check");
 
   let anchor = msg.querySelector("a");
   ok(anchor, "object link found");
 
   gJSTerm.once("variablesview-fetched", onFooObjFetch);
 
   EventUtils.synthesizeMouse(anchor, 2, 2, {}, gWebConsole.iframeWindow);
--- a/browser/devtools/webconsole/test/browser_webconsole_column_numbers.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_column_numbers.js
@@ -30,13 +30,13 @@ function consoleOpened(aHud) {
 
 function testLocationColumn() {
   let messages = hud.outputNode.children;
   let expected = ['10:7', '10:39', '11:9', '12:11', '13:9', '14:7'];
 
   for(let i = 0, len = messages.length; i < len; i++) {
     let msg = messages[i].textContent;
 
-    is(msg.contains(expected[i]), true, 'Found expected line:column of ' + expected[i]);
+    is(msg.includes(expected[i]), true, 'Found expected line:column of ' + expected[i]);
   }
 
   finishTest();
 }
--- a/browser/modules/Chat.jsm
+++ b/browser/modules/Chat.jsm
@@ -19,18 +19,18 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 function isWindowChromeless(win) {
   // XXX - stolen from browser-social.js, but there's no obvious place to
   // put this so it can be shared.
 
   // Is this a popup window that doesn't want chrome shown?
   let docElem = win.document.documentElement;
   // extrachrome is not restored during session restore, so we need
   // to check for the toolbar as well.
-  let chromeless = docElem.getAttribute("chromehidden").contains("extrachrome") ||
-                   docElem.getAttribute('chromehidden').contains("toolbar");
+  let chromeless = docElem.getAttribute("chromehidden").includes("extrachrome") ||
+                   docElem.getAttribute('chromehidden').includes("toolbar");
   return chromeless;
 }
 
 function isWindowGoodForChats(win) {
   return !win.closed &&
          !!win.document.getElementById("pinnedchats") &&
          !isWindowChromeless(win) &&
          !PrivateBrowsingUtils.isWindowPrivate(win);
--- a/dom/base/test/csp/test_CSP_frameancestors.html
+++ b/dom/base/test/csp/test_CSP_frameancestors.html
@@ -68,17 +68,17 @@ examiner.prototype  = {
     try {
       asciiSpec = SpecialPowers.getPrivilegedProps(
                     SpecialPowers.do_QueryInterface(subject, "nsIURI"),
                     "asciiSpec");
 
       // skip checks on the test harness -- can't do this skipping for
       // cross-origin blocking since the observer doesn't get the URI.  This
       // can cause this test to over-succeed (but only in specific cases).
-      if (asciiSpec.contains("test_CSP_frameancestors.html")) {
+      if (asciiSpec.includes("test_CSP_frameancestors.html")) {
         return;
       }
     } catch (ex) {
       // was not an nsIURI, so it was probably a cross-origin report.
     }
 
 
     if (topic === "csp-on-violate-policy") {
--- a/dom/base/test/csp/test_connect-src.html
+++ b/dom/base/test/csp/test_connect-src.html
@@ -73,30 +73,30 @@ function examiner() {
   SpecialPowers.addObserver(this, "csp-on-violate-policy", false);
   SpecialPowers.addObserver(this, "specialpowers-http-notify-request", false);
 }
 examiner.prototype  = {
   observe: function(subject, topic, data) {
    if (topic === "specialpowers-http-notify-request") {
       // making sure we do not bubble a result for something other
       // then the request in question.
-      if (!data.contains("file_csp_testserver.sjs?foo")) {
+      if (!data.includes("file_csp_testserver.sjs?foo")) {
         return;
       }
       checkResult("allowed");
     }
 
     if (topic === "csp-on-violate-policy") {
       // making sure we do not bubble a result for something other
       // then the request in question.
       var asciiSpec = SpecialPowers.getPrivilegedProps(
                         SpecialPowers.do_QueryInterface(subject, "nsIURI"),
                         "asciiSpec");
 
-      if (!asciiSpec.contains("file_csp_testserver.sjs?foo")) {
+      if (!asciiSpec.includes("file_csp_testserver.sjs?foo")) {
         return;
       }
       checkResult("blocked");
     }
   },
   remove: function() {
     SpecialPowers.removeObserver(this, "csp-on-violate-policy");
     SpecialPowers.removeObserver(this, "specialpowers-http-notify-request");
--- a/dom/base/test/csp/test_form-action.html
+++ b/dom/base/test/csp/test_form-action.html
@@ -50,29 +50,29 @@ function examiner() {
   SpecialPowers.addObserver(this, "csp-on-violate-policy", false);
   SpecialPowers.addObserver(this, "specialpowers-http-notify-request", false);
 }
 examiner.prototype  = {
   observe: function(subject, topic, data) {
    if (topic === "specialpowers-http-notify-request") {
       // making sure we do not bubble a result for something other
       // then the request in question.
-      if (!data.contains("submit-form")) {
+      if (!data.includes("submit-form")) {
         return;
       }
       checkResult("allowed");
     }
 
     if (topic === "csp-on-violate-policy") {
       // making sure we do not bubble a result for something other
       // then the request in question.
       var asciiSpec = SpecialPowers.getPrivilegedProps(
                         SpecialPowers.do_QueryInterface(subject, "nsIURI"),
                         "asciiSpec");
-      if (!asciiSpec.contains("submit-form")) {
+      if (!asciiSpec.includes("submit-form")) {
         return;
       }
       checkResult("blocked");
     }
   },
   remove: function() {
     SpecialPowers.removeObserver(this, "csp-on-violate-policy");
     SpecialPowers.removeObserver(this, "specialpowers-http-notify-request");
--- a/dom/base/test/csp/test_leading_wildcard.html
+++ b/dom/base/test/csp/test_leading_wildcard.html
@@ -45,37 +45,37 @@ function examiner() {
   SpecialPowers.addObserver(this, "csp-on-violate-policy", false);
   SpecialPowers.addObserver(this, "specialpowers-http-notify-request", false);
 }
 examiner.prototype  = {
   observe: function(subject, topic, data) {
 
    // allowed requests
    if (topic === "specialpowers-http-notify-request") {
-      if (data.contains("leading_wildcard_allowed.js")) {
+      if (data.includes("leading_wildcard_allowed.js")) {
         ok (true, "CSP should allow file_leading_wildcard_allowed.js!");
         finishTest();
       }
-      if (data.contains("leading_wildcard_blocked.js")) {
+      if (data.includes("leading_wildcard_blocked.js")) {
         ok(false, "CSP should not allow file_leading_wildcard_blocked.js!");
         finishTest();
       }
     }
 
     // blocked requests
     if (topic === "csp-on-violate-policy") {
       var asciiSpec = SpecialPowers.getPrivilegedProps(
                         SpecialPowers.do_QueryInterface(subject, "nsIURI"),
                         "asciiSpec");
 
-      if (asciiSpec.contains("leading_wildcard_allowed.js")) {
+      if (asciiSpec.includes("leading_wildcard_allowed.js")) {
         ok (false, "CSP should not block file_leading_wildcard_allowed.js!");
         finishTest();
       }
-      if (asciiSpec.contains("leading_wildcard_blocked.js")) {
+      if (asciiSpec.includes("leading_wildcard_blocked.js")) {
         ok (true, "CSP should block file_leading_wildcard_blocked.js!");
         finishTest();
       }
     }
   },
   remove: function() {
     SpecialPowers.removeObserver(this, "csp-on-violate-policy");
     SpecialPowers.removeObserver(this, "specialpowers-http-notify-request");
--- a/dom/base/test/test_getFeature_with_perm.html
+++ b/dom/base/test/test_getFeature_with_perm.html
@@ -13,17 +13,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=983502">Mozilla Bug 983502</a>
 <script type="application/javascript">
 
 function testSupported() {
   var mem;
   navigator.getFeature("hardware.memory").then(function(mem) {
 
     var isLinux = (navigator.platform.indexOf('Linux') != -1);
-    var isAndroid = !!navigator.userAgent.contains("Android");
+    var isAndroid = !!navigator.userAgent.includes("Android");
     var isB2G = !isAndroid && /Mobile|Tablet/.test(navigator.userAgent);
 
     if (isLinux) {
       info("It is Linux version:");
     }
     if (isAndroid) {
       info("It is Android version");
     }
@@ -98,17 +98,17 @@ info("About to run " + tests.length + " 
 
 SpecialPowers.pushPermissions([
   {type: "feature-detection", allow: 1, context: document}
 ], function() {
   ok('getFeature' in navigator, "navigator.getFeature should exist");
   ok('hasFeature' in navigator, "navigator.hasFeature should exist");
   // B2G specific manifest features.
   // Touching navigator before pushPermissions makes it fail.
-  if (!navigator.userAgent.contains("Android") &&
+  if (!navigator.userAgent.includes("Android") &&
         /Mobile|Tablet/.test(navigator.userAgent)) {
     info("Adding B2G specific tests");
     tests.push(createManifestTest("manifest.chrome.navigation"));
     tests.push(createManifestTest("manifest.precompile"));
   }
   runNextTest();
   ok(true, "Test DONE");
 });
--- a/dom/base/test/test_hasFeature.html
+++ b/dom/base/test/test_hasFeature.html
@@ -18,17 +18,17 @@ function testAPIs() {
     try {
       return SpecialPowers.getBoolPref(name);
     } catch (e) {
       return false;
     }
   }
 
   var b2gOnly = (function() {
-    var isAndroid = !!navigator.userAgent.contains("Android");
+    var isAndroid = !!navigator.userAgent.includes("Android");
     var isMulet = pref("b2g.is_mulet");
     var isB2g = isMulet || (!isAndroid && /Mobile|Tablet/.test(navigator.userAgent));
     return isB2g ? true : undefined;
   })();
 
   var APIEndPoints = [
     { name: "MozMobileNetworkInfo", enabled: pref("dom.mobileconnection.enabled") },
     // { name: "Navigator.mozBluetooth", enabled: b2gOnly }, // conditional on MOZ_B2G_BT, tricky to test
--- a/dom/bindings/test/test_sequence_detection.html
+++ b/dom/bindings/test/test_sequence_detection.html
@@ -18,26 +18,26 @@ https://bugzilla.mozilla.org/show_bug.cg
 
     var nonIterableObject = {[Symbol.iterator]: 5};
 
     try {
       testInterfaceJS.testSequenceOverload(nonIterableObject);
       ok(false, "Should have thrown in the overload case");  // see long comment above!
     } catch (e) {
       ise(e.name, "TypeError", "Should get a TypeError for the overload case");
-      ok(e.message.contains("not iterable"),
+      ok(e.message.includes("not iterable"),
          "Should have a message about being non-iterable in the overload case");
     }
 
     try {
       testInterfaceJS.testSequenceUnion(nonIterableObject);
       ok(false, "Should have thrown in the union case");
     } catch (e) {
       ise(e.name, "TypeError", "Should get a TypeError for the union case");
-      ok(e.message.contains("not iterable"),
+      ok(e.message.includes("not iterable"),
          "Should have a message about being non-iterable in the union case");
     }
 
     SimpleTest.finish();
   });
 
   </script>
 </head>
--- a/dom/canvas/test/test_drawWindow.html
+++ b/dom/canvas/test/test_drawWindow.html
@@ -33,17 +33,17 @@
     // page, which we expect to have transparency.
     runDrawWindowTests(document.getElementById("source").contentWindow,
                        0, true);
 
     // Run the tests on the same source document, but in a window opened
     // by window.open.  We do not expect this to have transparency...
     // except on B2G.  (This is *probably* a bug in B2G.)
     var isB2G = /Mobile|Tablet/.test(navigator.userAgent) &&
-                !navigator.userAgent.contains("Android");
+                !navigator.userAgent.includes("Android");
     runDrawWindowTests(sourceWindow, 0, isB2G);
 
     sourceWindow.close();
 
     SimpleTest.finish();
   }
 
   </script>
--- a/dom/canvas/test/webgl-mochitest/driver-info.js
+++ b/dom/canvas/test/webgl-mochitest/driver-info.js
@@ -123,23 +123,23 @@ DriverInfo = (function() {
   }
 
   try {
     var glVendor, glRenderer;
     [glVendor, glRenderer] = detectDriverInfo();
     info('GL vendor: ' + glVendor);
     info('GL renderer: ' + glRenderer);
 
-    if (glRenderer.contains('llvmpipe')) {
+    if (glRenderer.includes('llvmpipe')) {
       kDriver = DRIVER.MESA;
-    } else if (glRenderer.contains('Android Emulator')) {
+    } else if (glRenderer.includes('Android Emulator')) {
       kDriver = DRIVER.ANDROID_X86_EMULATOR;
-    } else if (glRenderer.contains('ANGLE')) {
+    } else if (glRenderer.includes('ANGLE')) {
       kDriver = DRIVER.ANGLE;
-    } else if (glVendor.contains('NVIDIA')) {
+    } else if (glVendor.includes('NVIDIA')) {
       kDriver = DRIVER.NVIDIA;
     }
   } catch (e) {
     // detectDriverInfo is fallible where WebGL fails.
   }
 
   if (kOS) {
     info('OS detected as: ' + kOS);
--- a/dom/manifest/ManifestProcessor.jsm
+++ b/dom/manifest/ManifestProcessor.jsm
@@ -356,17 +356,17 @@ IconsProcessor.process = function(aManif
     }
     return sizes;
     // Implementation of HTML's link@size attribute checker.
     function isValidSizeValue(aSize) {
       const size = aSize.toLowerCase();
       if (IconsProcessor.anyRegEx.test(aSize)) {
         return true;
       }
-      if (!size.contains('x') || size.indexOf('x') !== size.lastIndexOf('x')) {
+      if (!size.includes('x') || size.indexOf('x') !== size.lastIndexOf('x')) {
         return false;
       }
       // Split left of x for width, after x for height.
       const widthAndHeight = size.split('x');
       const w = widthAndHeight.shift();
       const h = widthAndHeight.join('x');
       const validStarts = !w.startsWith('0') && !h.startsWith('0');
       const validDecimals = IconsProcessor.onlyDecimals.test(w + h);
--- a/dom/media/tests/mochitest/identity/test_setIdentityProvider.html
+++ b/dom/media/tests/mochitest/identity/test_setIdentityProvider.html
@@ -31,30 +31,30 @@ function theTest() {
     function PC_LOCAL_PEER_IDENTITY_IS_SET_CORRECTLY(test) {
       return checkIdentity(test.pcLocal, "local", "test2.example.com", "someone");
     },
     function PC_REMOTE_PEER_IDENTITY_IS_SET_CORRECTLY(test) {
       return checkIdentity(test.pcRemote, "remote", "test1.example.com", "someone");
     },
 
     function OFFER_AND_ANSWER_INCLUDES_IDENTITY(test) {
-      ok(test.originalOffer.sdp.contains("a=identity"), "a=identity is in the offer SDP");
-      ok(test.originalAnswer.sdp.contains("a=identity"), "a=identity is in the answer SDP");
+      ok(test.originalOffer.sdp.includes("a=identity"), "a=identity is in the offer SDP");
+      ok(test.originalAnswer.sdp.includes("a=identity"), "a=identity is in the answer SDP");
     },
 
     function PC_LOCAL_DESCRIPTIONS_CONTAIN_IDENTITY(test) {
-      ok(test.pcLocal.localDescription.sdp.contains("a=identity"),
+      ok(test.pcLocal.localDescription.sdp.includes("a=identity"),
          "a=identity is in the local copy of the offer");
-      ok(test.pcLocal.remoteDescription.sdp.contains("a=identity"),
+      ok(test.pcLocal.remoteDescription.sdp.includes("a=identity"),
          "a=identity is in the local copy of the answer");
     },
     function PC_REMOTE_DESCRIPTIONS_CONTAIN_IDENTITY(test) {
-      ok(test.pcRemote.localDescription.sdp.contains("a=identity"),
+      ok(test.pcRemote.localDescription.sdp.includes("a=identity"),
                          "a=identity is in the remote copy of the offer");
-      ok(test.pcRemote.remoteDescription.sdp.contains("a=identity"),
+      ok(test.pcRemote.remoteDescription.sdp.includes("a=identity"),
                          "a=identity is in the remote copy of the answer");
     }
   ]);
   test.run();
 }
 runNetworkTest(theTest);
 
 </script>
--- a/dom/media/tests/mochitest/identity/test_setIdentityProviderWithErrors.html
+++ b/dom/media/tests/mochitest/identity/test_setIdentityProviderWithErrors.html
@@ -22,19 +22,19 @@ runNetworkTest(function () {
 
   // Save the peerIdentity promises now, since when they reject they are
   // replaced and we expect them to be rejected this time
   var peerIdentityLocal = test.pcLocal._pc.peerIdentity;
   var peerIdentityRemote = test.pcRemote._pc.peerIdentity;
 
   test.chain.append([
     function ONLY_REMOTE_SDP_INCLUDES_IDENTITY_ASSERTION(t) {
-      ok(!t.originalOffer.sdp.contains('a=identity'),
+      ok(!t.originalOffer.sdp.includes('a=identity'),
          'a=identity not contained in the offer SDP');
-      ok(t.originalAnswer.sdp.contains('a=identity'),
+      ok(t.originalAnswer.sdp.includes('a=identity'),
          'a=identity is contained in the answer SDP');
     },
     function PEER_IDENTITY_IS_EMPTY(t) {
       // we are only waiting for the local side to complete
       // an error on the remote side is immediately fatal though
       return Promise.race([
         peerIdentityLocal.then(
           () => ok(false, t.pcLocal + ' incorrectly received valid peer identity'),
--- a/dom/media/tests/mochitest/nonTrickleIce.js
+++ b/dom/media/tests/mochitest/nonTrickleIce.js
@@ -20,18 +20,18 @@ function makeOffererNonTrickle(chain) {
       });
     }
   ]);
   chain.insertAfter('PC_REMOTE_SANE_REMOTE_SDP', [
     function PC_REMOTE_REQUIRE_REMOTE_SDP_CANDIDATES(test) {
       info("test.pcLocal.localDescription.sdp: " + JSON.stringify(test.pcLocal.localDescription.sdp));
       info("test._local_offer.sdp" + JSON.stringify(test._local_offer.sdp));
       ok(!test.localRequiresTrickleIce, "Local does NOT require trickle");
-      ok(test._local_offer.sdp.contains("a=candidate"), "offer has ICE candidates")
-      ok(test._local_offer.sdp.contains("a=end-of-candidates"), "offer has end-of-candidates");
+      ok(test._local_offer.sdp.includes("a=candidate"), "offer has ICE candidates")
+      ok(test._local_offer.sdp.includes("a=end-of-candidates"), "offer has end-of-candidates");
     }
   ]);
 }
 
 function makeAnswererNonTrickle(chain) {
   chain.replace('PC_REMOTE_SETUP_ICE_HANDLER', [
     function PC_REMOTE_SETUP_NOTRICKLE_ICE_HANDLER(test) {
       // We need to install this callback before calling setLocalDescription
@@ -48,13 +48,13 @@ function makeAnswererNonTrickle(chain) {
       });
     }
   ]);
   chain.insertAfter('PC_LOCAL_SANE_REMOTE_SDP', [
     function PC_LOCAL_REQUIRE_REMOTE_SDP_CANDIDATES(test) {
       info("test.pcRemote.localDescription.sdp: " + JSON.stringify(test.pcRemote.localDescription.sdp));
       info("test._remote_answer.sdp" + JSON.stringify(test._remote_answer.sdp));
       ok(!test.remoteRequiresTrickleIce, "Remote does NOT require trickle");
-      ok(test._remote_answer.sdp.contains("a=candidate"), "answer has ICE candidates")
-      ok(test._remote_answer.sdp.contains("a=end-of-candidates"), "answer has end-of-candidates");
+      ok(test._remote_answer.sdp.includes("a=candidate"), "answer has ICE candidates")
+      ok(test._remote_answer.sdp.includes("a=end-of-candidates"), "answer has end-of-candidates");
     }
   ]);
 }
--- a/dom/media/tests/mochitest/pc.js
+++ b/dom/media/tests/mochitest/pc.js
@@ -490,21 +490,21 @@ PeerConnectionTest.prototype.run = funct
 
 /**
  * Routes ice candidates from one PCW to the other PCW
  */
 PeerConnectionTest.prototype.iceCandidateHandler = function(caller, candidate) {
   info("Received: " + JSON.stringify(candidate) + " from " + caller);
 
   var target = null;
-  if (caller.contains("pcLocal")) {
+  if (caller.includes("pcLocal")) {
     if (this.pcRemote) {
       target = this.pcRemote;
     }
-  } else if (caller.contains("pcRemote")) {
+  } else if (caller.includes("pcRemote")) {
     if (this.pcLocal) {
       target = this.pcLocal;
     }
   } else {
     ok(false, "received event from unknown caller: " + caller);
     return;
   }
 
@@ -1463,22 +1463,22 @@ PeerConnectionWrapper.prototype = {
 
   verifySdp: function(desc, expectedType, offerConstraintsList, offerOptions, isLocal) {
     info("Examining this SessionDescription: " + JSON.stringify(desc));
     info("offerConstraintsList: " + JSON.stringify(offerConstraintsList));
     info("offerOptions: " + JSON.stringify(offerOptions));
     ok(desc, "SessionDescription is not null");
     is(desc.type, expectedType, "SessionDescription type is " + expectedType);
     ok(desc.sdp.length > 10, "SessionDescription body length is plausible");
-    ok(desc.sdp.contains("a=ice-ufrag"), "ICE username is present in SDP");
-    ok(desc.sdp.contains("a=ice-pwd"), "ICE password is present in SDP");
-    ok(desc.sdp.contains("a=fingerprint"), "ICE fingerprint is present in SDP");
+    ok(desc.sdp.includes("a=ice-ufrag"), "ICE username is present in SDP");
+    ok(desc.sdp.includes("a=ice-pwd"), "ICE password is present in SDP");
+    ok(desc.sdp.includes("a=fingerprint"), "ICE fingerprint is present in SDP");
     //TODO: update this for loopback support bug 1027350
-    ok(!desc.sdp.contains(LOOPBACK_ADDR), "loopback interface is absent from SDP");
-    var requiresTrickleIce = !desc.sdp.contains("a=candidate");
+    ok(!desc.sdp.includes(LOOPBACK_ADDR), "loopback interface is absent from SDP");
+    var requiresTrickleIce = !desc.sdp.includes("a=candidate");
     if (requiresTrickleIce) {
       info("at least one ICE candidate is present in SDP");
     } else {
       info("No ICE candidate in SDP -> requiring trickle ICE");
     }
     if (isLocal) {
       this.localRequiresTrickleIce = requiresTrickleIce;
     } else {
@@ -1488,40 +1488,40 @@ PeerConnectionWrapper.prototype = {
     //TODO: how can we check for absence/presence of m=application?
 
     var audioTracks =
         this.countTracksInConstraint('audio', offerConstraintsList) ||
       this.audioInOfferOptions(offerOptions);
 
     info("expected audio tracks: " + audioTracks);
     if (audioTracks == 0) {
-      ok(!desc.sdp.contains("m=audio"), "audio m-line is absent from SDP");
+      ok(!desc.sdp.includes("m=audio"), "audio m-line is absent from SDP");
     } else {
-      ok(desc.sdp.contains("m=audio"), "audio m-line is present in SDP");
-      ok(desc.sdp.contains("a=rtpmap:109 opus/48000/2"), "OPUS codec is present in SDP");
+      ok(desc.sdp.includes("m=audio"), "audio m-line is present in SDP");
+      ok(desc.sdp.includes("a=rtpmap:109 opus/48000/2"), "OPUS codec is present in SDP");
       //TODO: ideally the rtcp-mux should be for the m=audio, and not just
       //      anywhere in the SDP (JS SDP parser bug 1045429)
-      ok(desc.sdp.contains("a=rtcp-mux"), "RTCP Mux is offered in SDP");
+      ok(desc.sdp.includes("a=rtcp-mux"), "RTCP Mux is offered in SDP");
     }
 
     var videoTracks =
         this.countTracksInConstraint('video', offerConstraintsList) ||
       this.videoInOfferOptions(offerOptions);
 
     info("expected video tracks: " + videoTracks);
     if (videoTracks == 0) {
-      ok(!desc.sdp.contains("m=video"), "video m-line is absent from SDP");
+      ok(!desc.sdp.includes("m=video"), "video m-line is absent from SDP");
     } else {
-      ok(desc.sdp.contains("m=video"), "video m-line is present in SDP");
+      ok(desc.sdp.includes("m=video"), "video m-line is present in SDP");
       if (this.h264) {
-        ok(desc.sdp.contains("a=rtpmap:126 H264/90000"), "H.264 codec is present in SDP");
+        ok(desc.sdp.includes("a=rtpmap:126 H264/90000"), "H.264 codec is present in SDP");
       } else {
-        ok(desc.sdp.contains("a=rtpmap:120 VP8/90000"), "VP8 codec is present in SDP");
+        ok(desc.sdp.includes("a=rtpmap:120 VP8/90000"), "VP8 codec is present in SDP");
       }
-      ok(desc.sdp.contains("a=rtcp-mux"), "RTCP Mux is offered in SDP");
+      ok(desc.sdp.includes("a=rtcp-mux"), "RTCP Mux is offered in SDP");
     }
 
   },
 
   /**
    * Check that media flow is present on all media elements involved in this
    * test by waiting for confirmation that media flow is present.
    */
@@ -1766,17 +1766,17 @@ PeerConnectionWrapper.prototype = {
       offerConstraintsList, offerOptions, answer) {
     var numIceConnections = 0;
     Object.keys(stats).forEach(key => {
       if ((stats[key].type === "candidatepair") && stats[key].selected) {
         numIceConnections += 1;
       }
     });
     info("ICE connections according to stats: " + numIceConnections);
-    if (answer.sdp.contains('a=group:BUNDLE')) {
+    if (answer.sdp.includes('a=group:BUNDLE')) {
       is(numIceConnections, 1, "stats reports exactly 1 ICE connection");
     } else {
       // This code assumes that no media sections have been rejected due to
       // codec mismatch or other unrecoverable negotiation failures.
       var numAudioTracks =
           this.countTracksInConstraint('audio', offerConstraintsList) ||
         this.audioInOfferOptions(offerOptions);
 
--- a/dom/media/tests/mochitest/test_dataChannel_noOffer.html
+++ b/dom/media/tests/mochitest/test_dataChannel_noOffer.html
@@ -13,17 +13,17 @@
 
   runNetworkTest(function () {
     var pc = new mozRTCPeerConnection();
 
     // necessary to circumvent bug 864109
     var options = { offerToReceiveAudio: true };
 
     pc.createOffer(options).then(offer => {
-      ok(!offer.sdp.contains("m=application"),
+      ok(!offer.sdp.includes("m=application"),
         "m=application is not contained in the SDP");
 
       networkTestFinished();
     })
     .catch(generateErrorCallback());
   });
 
 </script>
--- a/dom/media/tests/mochitest/test_peerConnection_bug1042791.html
+++ b/dom/media/tests/mochitest/test_peerConnection_bug1042791.html
@@ -16,19 +16,19 @@
     options = options || { };
     options.h264 = true;
     test = new PeerConnectionTest(options);
     test.setMediaConstraints([{video: true}], [{video: true}]);
     test.chain.removeAfter("PC_LOCAL_CREATE_OFFER");
 
     test.chain.append([
       function PC_LOCAL_VERIFY_H264_OFFER(test) {
-        ok(!test.pcLocal._latest_offer.sdp.toLowerCase().contains("profile-level-id=0x42e0"),
+        ok(!test.pcLocal._latest_offer.sdp.toLowerCase().includes("profile-level-id=0x42e0"),
            "H264 offer does not contain profile-level-id=0x42e0");
-        ok(test.pcLocal._latest_offer.sdp.toLowerCase().contains("profile-level-id=42e0"),
+        ok(test.pcLocal._latest_offer.sdp.toLowerCase().includes("profile-level-id=42e0"),
            "H264 offer contains profile-level-id=42e0");
       }
     ]);
 
     test.run();
   });
 </script>
 </pre>
--- a/dom/tests/browser/browser_bug1008941_dismissGeolocationHanger.js
+++ b/dom/tests/browser/browser_bug1008941_dismissGeolocationHanger.js
@@ -20,17 +20,17 @@ add_task(function testDismissHanger() {
   info("Panel is shown");
 
   // click outside the Geolocation hanger to dismiss it
   window.document.getElementById("nav-bar").click();
   info("Clicked outside the Geolocation panel to dismiss it");
 
   let result = gBrowser.getBrowserForTab(gBrowser.selectedTab)
                        .contentDocument.body.innerHTML;
-  ok(result.contains("location..."), "Location is not shared");
+  ok(result.includes("location..."), "Location is not shared");
 });
 
 add_task(function asyncCleanup() {
   // close the tab
   gBrowser.removeTab(gBrowser.selectedTab);
   info("Cleanup: Closed the tab");
 });
 
--- a/dom/tests/mochitest/general/test_donottrack.html
+++ b/dom/tests/mochitest/general/test_donottrack.html
@@ -26,17 +26,17 @@ function nextTest() {
     return;
   }
 
   tests[currentTestIdx]();
 }
 
 tests.push(function testDefaultValues() {
   // The default pref values depend on the OS it seems.
-  var isAndroid = !!navigator.userAgent.contains("Android");
+  var isAndroid = !!navigator.userAgent.includes("Android");
   var isB2G = !isAndroid && /Mobile|Tablet/.test(navigator.userAgent);
 
   is(SpecialPowers.getBoolPref(dntPref), false,
      'DNT should be disabled by default');
   is(navigator.doNotTrack, 'unspecified',
      'navigator.doNotTrack should initially be "unspecified".');
 
   nextTest();
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -1383,20 +1383,20 @@ var interfaceNamesInGlobalScope =
 // IMPORTANT: Do not change this list without review from a DOM peer!
   ];
 // IMPORTANT: Do not change the list above without review from a DOM peer!
 
 function createInterfaceMap(isXBLScope) {
   var prefs = SpecialPowers.Services.prefs;
   var version = SpecialPowers.Cc["@mozilla.org/xre/app-info;1"].getService(SpecialPowers.Ci.nsIXULAppInfo).version;
   var isNightly = version.endsWith("a1");
-  var isRelease = !version.contains("a");
+  var isRelease = !version.includes("a");
   var isDesktop = !/Mobile|Tablet/.test(navigator.userAgent);
-  var isB2G = !isDesktop && !navigator.userAgent.contains("Android");
-  var isAndroid = navigator.userAgent.contains("Android");
+  var isB2G = !isDesktop && !navigator.userAgent.includes("Android");
+  var isAndroid = navigator.userAgent.includes("Android");
   var hasPermission = function (aPermissions) {
     var result = false;
     for (var p of aPermissions) {
       result = result || SpecialPowers.hasPermission(p, window.document);
     }
     return result;
   };
 
--- a/dom/workers/test/test_worker_interfaces.js
+++ b/dom/workers/test/test_worker_interfaces.js
@@ -173,19 +173,19 @@ var interfaceNamesInGlobalScope =
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "WorkerNavigator",
 // IMPORTANT: Do not change this list without review from a DOM peer!
   ];
 // IMPORTANT: Do not change the list above without review from a DOM peer!
 
 function createInterfaceMap(prefMap, permissionMap, version, userAgent, isB2G) {
   var isNightly = version.endsWith("a1");
-  var isRelease = !version.contains("a");
+  var isRelease = !version.includes("a");
   var isDesktop = !/Mobile|Tablet/.test(userAgent);
-  var isAndroid = !!navigator.userAgent.contains("Android");
+  var isAndroid = !!navigator.userAgent.includes("Android");
 
   var interfaceMap = {};
 
   function addInterfaces(interfaces)
   {
     for (var entry of interfaces) {
       if (typeof(entry) === "string") {
         interfaceMap[entry] = true;
--- a/dom/xul/test/test_import_xul_to_content.xul
+++ b/dom/xul/test/test_import_xul_to_content.xul
@@ -29,17 +29,17 @@
     var sawWarning = false;
     var msgs = Services.console.getMessageArray();
     for (var i = 0; i < msgs.length; i++) {
       var msg = msgs[i];
       if (!msg || !(msg instanceof Components.interfaces.nsIScriptError)) {
         continue;
       }
 
-      if (msg.category.contains("DOM") && msg.errorMessage.contains("Importing XUL")) {
+      if (msg.category.includes("DOM") && msg.errorMessage.includes("Importing XUL")) {
         sawWarning = true;
       }
     }
 
     ok(sawWarning == expected, "correct warning condition when " + when);
   }
 
   var browser = document.getElementById("browserelt");
--- a/js/src/jit-test/tests/ion/bug945294.js
+++ b/js/src/jit-test/tests/ion/bug945294.js
@@ -12,11 +12,11 @@ arr[1] = new C;
 function f() {
     for (var i = 0; i < arr.length; i++)
         arr[i].dump();
 }
 
 try {
     f();
 } catch (exc) {
-    assertEq(exc.message.contains("is not a function"), true);
+    assertEq(exc.message.includes("is not a function"), true);
 }
 f();
--- a/js/xpconnect/tests/chrome/test_xrayToJS.xul
+++ b/js/xpconnect/tests/chrome/test_xrayToJS.xul
@@ -141,17 +141,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   // Maintain a static list of the properties that are available on each standard
   // prototype, so that we make sure to audit any new ones to make sure they're
   // Xray-safe.
   //
   // DO NOT CHANGE WTIHOUT REVIEW FROM AN XPCONNECT PEER.
   var version = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo).version;
   var isNightlyBuild = version.endsWith("a1");
-  var isReleaseBuild = !version.contains("a");
+  var isReleaseBuild = !version.includes("a");
   var gPrototypeProperties = {};
   gPrototypeProperties['Date'] =
     ["getTime", "getTimezoneOffset", "getYear", "getFullYear", "getUTCFullYear",
     "getMonth", "getUTCMonth", "getDate", "getUTCDate", "getDay", "getUTCDay",
     "getHours", "getUTCHours", "getMinutes", "getUTCMinutes", "getSeconds",
     "getUTCSeconds", "getMilliseconds", "getUTCMilliseconds", "setTime",
     "setYear", "setFullYear", "setUTCFullYear", "setMonth", "setUTCMonth",
     "setDate", "setUTCDate", "setHours", "setUTCHours", "setMinutes",
--- a/layout/reftests/invalidation/nudge-to-integer-invalidation.html
+++ b/layout/reftests/invalidation/nudge-to-integer-invalidation.html
@@ -9,17 +9,17 @@
     <g transform="translate(0, -220.999756)">
       <rect x="100" y="400" height="50" width="50" fill="grey" class="reftest-no-paint"/>
     </g>
 </svg>
 
 <script>
 
 var scrollPositions = [0, 50];
-if (location.search.contains("reverse")) {
+if (location.search.includes("reverse")) {
   scrollPositions.reverse();
 }
 document.documentElement.scrollTop = scrollPositions[0];
 
 function doTest() {
   document.documentElement.scrollTop = scrollPositions[1];
   document.documentElement.removeAttribute("class");
 }
--- a/layout/reftests/invalidation/transform-floating-point-invalidation.html
+++ b/layout/reftests/invalidation/transform-floating-point-invalidation.html
@@ -9,17 +9,17 @@
   <rect x="100" y="600" width="120" height="120" fill="#EEE"
         transform="matrix(0,0.969665,-2.0321494,0,1828.58132,65.718239)"
         class="reftest-no-paint"/>
 </svg>
 
 <script>
 
 var scrollPositions = [81, 82];
-if (location.search.contains("reverse")) {
+if (location.search.includes("reverse")) {
   scrollPositions.reverse();
 }
 document.documentElement.scrollTop = scrollPositions[0];
 
 function doTest() {
   document.documentElement.scrollTop = scrollPositions[1];
   document.documentElement.removeAttribute("class");
 }
--- a/memory/replace/dmd/test/test_dmd.js
+++ b/memory/replace/dmd/test/test_dmd.js
@@ -16,17 +16,17 @@ let gEnv = Cc["@mozilla.org/process/envi
 let gPythonName = gEnv.get("PYTHON");
 
 // If we're testing locally, the executable file is in "CurProcD". Otherwise,
 // it is in another location that we have to find.
 function getExecutable(aFilename) {
   let file = FileUtils.getFile("CurProcD", [aFilename]);
   if (!file.exists()) {
     file = FileUtils.getFile("CurWorkD", []);
-    while (file.path.contains("xpcshell")) {
+    while (file.path.includes("xpcshell")) {
       file = file.parent;
     }
     file.append("bin");
     file.append(aFilename);
   }
   return file;
 }
 
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -5854,17 +5854,17 @@ var FormAssistant = {
       let item = options.item(i);
 
       let label = item.value;
       if (item.label)
         label = item.label;
       else if (item.text)
         label = item.text;
 
-      if (filter && !(label.toLowerCase().contains(lowerFieldValue)) )
+      if (filter && !(label.toLowerCase().includes(lowerFieldValue)) )
         continue;
       suggestions.push({ label: label, value: item.value });
     }
 
     return suggestions;
   },
 
   // Retrieves autocomplete suggestions for an element from the form autocomplete service
--- a/modules/libpref/test/unit/test_warnings.js
+++ b/modules/libpref/test/unit/test_warnings.js
@@ -19,17 +19,17 @@ function makeBuffer(length) {
  */
 function checkWarning(pref, buffer) {
   let deferred = Promise.defer();
   let complete = false;
   let listener = {
     observe: function(event) {
       let message = event.message;
       if (!(message.startsWith("Warning: attempting to write")
-            && message.contains(pref))) {
+            && message.includes(pref))) {
         return;
       }
       if (complete) {
         return;
       }
       complete = true;
       do_print("Warning while setting " + pref);
       cs.unregisterListener(listener);
--- a/services/common/modules-testing/bagheeraserver.js
+++ b/services/common/modules-testing/bagheeraserver.js
@@ -200,17 +200,17 @@ BagheeraServer.prototype = {
     }
 
     if (!rest) {
       this._log.info("No ID defined.");
       throw HTTP_404;
     }
 
     let id = rest;
-    if (id.contains("/")) {
+    if (id.includes("/")) {
       this._log.info("URI has too many components.");
       throw HTTP_404;
     }
 
     if (request.method == "POST") {
       return this._handleNamespaceSubmitPost(namespace, id, request, response);
     }
 
--- a/services/healthreport/healthreporter.jsm
+++ b/services/healthreport/healthreporter.jsm
@@ -773,17 +773,17 @@ AbstractHealthReporter.prototype = Objec
       // Try is because .spec can throw on invalid URI.
       try {
         recordMessage = recordMessage.replace(regexify(uri.spec), "<" + thing + "URI>");
       } catch (ex) { }
 
       recordMessage = recordMessage.replace(regexify(path), "<" + thing + "Path>");
     }
 
-    if (appData.path.contains(profile.path)) {
+    if (appData.path.includes(profile.path)) {
       replace(appDataURI, appData.path, 'AppData');
       replace(profileURI, profile.path, 'Profile');
     } else {
       replace(profileURI, profile.path, 'Profile');
       replace(appDataURI, appData.path, 'AppData');
     }
 
     this._log.warn(logMessage);
--- a/services/healthreport/providers.jsm
+++ b/services/healthreport/providers.jsm
@@ -1309,17 +1309,17 @@ UpdateHotfixMeasurement1.prototype = Obj
     "notificationsShown": Metrics.Storage.FIELD_LAST_NUMERIC,
   },
 
   fields: { },
 
   // Our fields have dynamic names from the hotfix version that supplied them.
   // We need to override the default behavior to deal with unknown fields.
   shouldIncludeField: function (name) {
-    return name.contains(".");
+    return name.includes(".");
   },
 
   fieldType: function (name) {
     for (let known in this.hotfixFieldTypes) {
       if (name.endsWith(known)) {
         return this.hotfixFieldTypes[known];
       }
     }
@@ -1558,17 +1558,17 @@ SearchCountMeasurementBase.prototype = O
    * various Firefox locales.
    *
    * We use the "provider.type" syntax as a rudimentary check for validity.
    *
    * We trust that measurement versioning is sufficient to exclude old provider
    * data.
    */
   shouldIncludeField: function (name) {
-    return name.contains(".");
+    return name.includes(".");
   },
 
   /**
    * The measurement type mechanism doesn't introspect the DB. Override it
    * so that we can assume all unknown fields are counters.
    */
   fieldType: function (name) {
     if (name in this.fields) {
--- a/services/healthreport/tests/xpcshell/test_healthreporter.js
+++ b/services/healthreport/tests/xpcshell/test_healthreporter.js
@@ -912,27 +912,27 @@ add_task(function test_failure_if_not_in
   let reporter = yield getReporter("failure_if_not_initialized");
   yield reporter._shutdown();
 
   let error = false;
   try {
     yield reporter.requestDataUpload();
   } catch (ex) {
     error = true;
-    do_check_true(ex.message.contains("Not initialized."));
+    do_check_true(ex.message.includes("Not initialized."));
   } finally {
     do_check_true(error);
     error = false;
   }
 
   try {
     yield reporter.collectMeasurements();
   } catch (ex) {
     error = true;
-    do_check_true(ex.message.contains("Not initialized."));
+    do_check_true(ex.message.includes("Not initialized."));
   } finally {
     do_check_true(error);
     error = false;
   }
 
   // getJSONPayload always works (to facilitate error upload).
   yield reporter.getJSONPayload();
 });
@@ -979,17 +979,17 @@ add_task(function test_upload_on_init_fa
   yield deferred.promise;
 
   do_check_true(server.hasDocument(reporter.serverNamespace, reporter.lastSubmitID));
   let doc = server.getDocument(reporter.serverNamespace, reporter.lastSubmitID);
   do_check_true("notInitialized" in doc);
   do_check_eq(doc.notInitialized, 1);
   do_check_true("errors" in doc);
   do_check_eq(doc.errors.length, 1);
-  do_check_true(doc.errors[0].contains(MESSAGE));
+  do_check_true(doc.errors[0].includes(MESSAGE));
 
   yield reporter._shutdown();
   yield shutdownServer(server);
 });
 
 // Simulate a SQLite write error during upload.
 add_task(function* test_upload_with_provider_record_failure() {
   let [reporter, server] = yield getReporterAndServer("upload_with_provider_record_failure");
--- a/services/metrics/tests/xpcshell/test_metrics_provider_manager.js
+++ b/services/metrics/tests/xpcshell/test_metrics_provider_manager.js
@@ -107,17 +107,17 @@ add_task(function test_collect_constant_
   manager.onProviderError = function (error) { errors.push(error); };
 
   let provider = new DummyProvider();
   provider.throwDuringCollectConstantData = "Fake error during collect";
   yield manager.registerProvider(provider);
 
   yield manager.collectConstantData();
   do_check_eq(errors.length, 1);
-  do_check_true(errors[0].contains(provider.throwDuringCollectConstantData));
+  do_check_true(errors[0].includes(provider.throwDuringCollectConstantData));
 
   yield storage.close();
 });
 
 add_task(function test_collect_constant_populate_throws() {
   let storage = yield Metrics.Storage("collect_constant_populate_throws");
   let manager = new Metrics.ProviderManager(storage);
   let errors = [];
@@ -125,17 +125,17 @@ add_task(function test_collect_constant_
 
   let provider = new DummyProvider();
   provider.throwDuringConstantPopulate = "Fake error during constant populate";
   yield manager.registerProvider(provider);
 
   yield manager.collectConstantData();
 
   do_check_eq(errors.length, 1);
-  do_check_true(errors[0].contains(provider.throwDuringConstantPopulate));
+  do_check_true(errors[0].includes(provider.throwDuringConstantPopulate));
   do_check_false(manager._providers.get(provider.name).constantsCollected);
 
   yield storage.close();
 });
 
 add_task(function test_collect_constant_onetime() {
   let storage = yield Metrics.Storage("collect_constant_onetime");
   let manager = new Metrics.ProviderManager(storage);
@@ -291,17 +291,17 @@ add_task(function test_category_manager_
     deferred.resolve(msg);
   };
 
   yield manager.registerProvidersFromCategoryManager("registration-errors");
   do_check_eq(manager.providers.length, 0);
   do_check_eq(errorCount, 1);
 
   let msg = yield deferred.promise;
-  do_check_true(msg.contains("Provider error: DummyThrowOnInitProvider: "
+  do_check_true(msg.includes("Provider error: DummyThrowOnInitProvider: "
                              + "Error registering provider from category manager: "
                              + "Error: Dummy Error"));
 
   yield storage.close();
 });
 
 add_task(function test_pull_only_registration_error() {
   let storage = yield Metrics.Storage(REGISTRATION_ERRORS_DB);
@@ -317,17 +317,17 @@ add_task(function test_pull_only_registr
 
   yield manager.registerProviderFromType(DummyPullOnlyThrowsOnInitProvider);
   do_check_eq(errorCount, 0);
 
   yield manager.ensurePullOnlyProvidersRegistered();
   do_check_eq(errorCount, 1);
 
   let msg = yield deferred.promise;
-  do_check_true(msg.contains("Provider error: DummyPullOnlyThrowsOnInitProvider: " +
+  do_check_true(msg.includes("Provider error: DummyPullOnlyThrowsOnInitProvider: " +
                              "Error registering pull-only provider: Error: Dummy Error"));
 
   yield storage.close();
 });
 
 add_task(function test_error_during_shutdown() {
   let storage = yield Metrics.Storage(REGISTRATION_ERRORS_DB);
   let manager = new Metrics.ProviderManager(storage);
@@ -345,13 +345,13 @@ add_task(function test_error_during_shut
   do_check_eq(errorCount, 0);
   do_check_eq(manager.providers.length, 1);
 
   yield manager.ensurePullOnlyProvidersRegistered();
   do_check_eq(errorCount, 0);
   yield manager.ensurePullOnlyProvidersUnregistered();
   do_check_eq(errorCount, 1);
   let msg = yield deferred.promise;
-  do_check_true(msg.contains("Provider error: DummyThrowOnShutdownProvider: " +
+  do_check_true(msg.includes("Provider error: DummyThrowOnShutdownProvider: " +
                              "Error when shutting down provider: Error: Dummy shutdown error"));
 
   yield storage.close();
 });
--- a/services/metrics/tests/xpcshell/test_metrics_storage.js
+++ b/services/metrics/tests/xpcshell/test_metrics_storage.js
@@ -338,17 +338,17 @@ add_task(function test_enqueue_operation
   let mID = yield backend.registerMeasurement("foo", "bar", 1);
   let fID = yield backend.registerField(mID, "baz", backend.FIELD_DAILY_COUNTER);
   let now = new Date();
 
   let deferred = Promise.defer();
   backend.enqueueOperation(function bad() {
     throw new Error("I failed.");
   }).then(do_throw, function onError(error) {
-    do_check_true(error.message.contains("I failed."));
+    do_check_true(error.message.includes("I failed."));
     deferred.resolve();
   });
 
   let promise = backend.enqueueOperation(function () {
     return backend.incrementDailyCounterFromFieldID(fID, now);
   });
 
   yield deferred.promise;
--- a/services/sync/Weave.js
+++ b/services/sync/Weave.js
@@ -102,17 +102,17 @@ WeaveService.prototype = {
    *
    * @return bool
    */
   get fxAccountsEnabled() {
     try {
       // Old sync guarantees '@' will never appear in the username while FxA
       // uses the FxA email address - so '@' is the flag we use.
       let username = Services.prefs.getCharPref(SYNC_PREFS_BRANCH + "username");
-      return !username || username.contains('@');
+      return !username || username.includes('@');
     } catch (_) {
       return true; // No username == only allow FxA to be configured.
     }
   },
 
   /**
    * Whether Sync appears to be enabled.
    *
--- a/services/sync/modules/service.js
+++ b/services/sync/modules/service.js
@@ -108,17 +108,17 @@ Sync11Service.prototype = {
    *
    * This is the base URI of the service as applicable to all users up to
    * and including the server version path component, complete with trailing
    * forward slash.
    */
   get userAPIURI() {
     // Append to the serverURL if it's a relative fragment.
     let url = Svc.Prefs.get("userURL");
-    if (!url.contains(":")) {
+    if (!url.includes(":")) {
       url = this.serverURL + url;
     }
 
     return url + USER_API_VERSION + "/";
   },
 
   get pwResetURL() {
     return this.serverURL + "weave-password-reset";
--- a/services/sync/tests/unit/test_browserid_identity.js
+++ b/services/sync/tests/unit/test_browserid_identity.js
@@ -120,17 +120,17 @@ add_test(function test_getRESTRequestAut
     _("BrowserIDManager supplies a REST Request Authenticator callback which sets a Hawk header on a request object.");
     let request = new SyncStorageRequest(
       "https://example.net/somewhere/over/the/rainbow");
     let authenticator = browseridManager.getRESTRequestAuthenticator();
     do_check_true(!!authenticator);
     let output = authenticator(request, 'GET');
     do_check_eq(request.uri, output.uri);
     do_check_true(output._headers.authorization.startsWith('Hawk'));
-    do_check_true(output._headers.authorization.contains('nonce'));
+    do_check_true(output._headers.authorization.includes('nonce'));
     do_check_true(browseridManager.hasValidToken());
     run_next_test();
   }
 );
 
 add_test(function test_resourceAuthenticatorSkew() {
   _("BrowserIDManager Resource Authenticator compensates for clock skew in Hawk header.");
 
--- a/testing/modules/Assert.jsm
+++ b/testing/modules/Assert.jsm
@@ -104,17 +104,17 @@ Assert.AssertionError = function(options
   this.actual = options.actual;
   this.expected = options.expected;
   this.operator = options.operator;
   this.message = getMessage(this, options.message);
   // The part of the stack that comes from this module is not interesting.
   let stack = Components.stack;
   do {
     stack = stack.asyncCaller || stack.caller;
-  } while(stack.filename && stack.filename.contains("Assert.jsm"))
+  } while(stack.filename && stack.filename.includes("Assert.jsm"))
   this.stack = stack;
 };
 
 // assert.AssertionError instanceof Error
 Assert.AssertionError.prototype = Object.create(Error.prototype, {
   constructor: {
     value: Assert.AssertionError,
     enumerable: false,
--- a/testing/xpcshell/head.js
+++ b/testing/xpcshell/head.js
@@ -782,17 +782,17 @@ function do_check_neq(left, right, stack
 function todo_check_neq(left, right, stack) {
   if (!stack)
       stack = Components.stack.caller;
 
   _do_check_neq(left, right, stack, true);
 }
 
 function do_report_result(passed, text, stack, todo) {
-  while (stack.filename.contains("head.js") && stack.caller) {
+  while (stack.filename.includes("head.js") && stack.caller) {
     stack = stack.caller;
   }
 
   let name = _gRunningTest ? _gRunningTest.name : stack.name;
   let message;
   if (name) {
      message = "[" + name + " : " + stack.lineNumber + "] " + text;
   } else {
--- a/toolkit/components/aboutmemory/tests/test_memoryReporters.xul
+++ b/toolkit/components/aboutmemory/tests/test_memoryReporters.xul
@@ -101,35 +101,35 @@
     } else if (aPath.search(/^explicit\/xpti-working-set$/) >= 0) {
       present.xptiWorkingSet = true;
     } else if (aPath.search(/^explicit\/atom-tables\/main$/) >= 0) {
       present.atomTablesMain = true;
     } else if (/\[System Principal\].*this-is-a-sandbox-name/.test(aPath)) {
       // A system compartment with a location (such as a sandbox) should
       // show that location.
       present.sandboxLocation = true;
-    } else if (aPath.contains(bigStringPrefix)) {
+    } else if (aPath.includes(bigStringPrefix)) {
       present.bigString = true;
-    } else if (aPath.contains("!)(*&")) {
+    } else if (aPath.includes("!)(*&")) {
       present.smallString1 = true;
-    } else if (aPath.contains("@)(*&")) {
+    } else if (aPath.includes("@)(*&")) {
       present.smallString2 = true;
     }
 
     // Shouldn't get any anonymized paths.
-    if (aPath.contains('<anonymized')) {
+    if (aPath.includes('<anonymized')) {
         present.anonymizedWhenUnnecessary = aPath;
     }
   }
 
   function handleReportAnonymized(aProcess, aPath, aKind, aUnits, aAmount,
                                   aDescription)
   {
     // Shouldn't get http: or https: in any paths.
-    if (aPath.contains('http:')) {
+    if (aPath.includes('http:')) {
         present.httpWhenAnonymized = aPath;
     }
 
     // file: URLs should have their path anonymized.
     if (aPath.search('file:..[^<]') !== -1) {
         present.unanonymizedFilePathWhenAnonymized = aPath;
     }
   }
--- a/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown.js
+++ b/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown.js
@@ -177,18 +177,18 @@ add_task(function* test_state() {
   let promiseDone = barrier.wait();
 
   // Now that we have called `wait()`, the state contains interesting things
   let state = barrier.state[0];
   do_print("State: " + JSON.stringify(barrier.state, null, "\t"));
   Assert.equal(state.filename, filename);
   Assert.equal(state.lineNumber, lineNumber + 1);
   Assert.equal(state.name, BLOCKER_NAME);
-  Assert.ok(state.stack.some(x => x.contains("test_state")), "The stack contains the caller function's name");
-  Assert.ok(state.stack.some(x => x.contains(filename)), "The stack contains the calling file's name");
+  Assert.ok(state.stack.some(x => x.includes("test_state")), "The stack contains the caller function's name");
+  Assert.ok(state.stack.some(x => x.includes(filename)), "The stack contains the calling file's name");
 
   deferred.resolve();
   yield promiseDone;
 });
 
 add_task(function*() {
   Services.prefs.clearUserPref("toolkit.asyncshutdown.testing");
 });
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_largefiles.js
+++ b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_largefiles.js
@@ -78,28 +78,28 @@ function test_setPosition_failures() {
     try {
       let pos = 0;
 
       // 1. Use an invalid position value
       try {
         yield file.setPosition(0.5, OS.File.POS_START);
         do_throw("Shouldn't have succeeded");
       } catch (ex) {
-        do_check_true(ex.toString().contains("can't pass"));
+        do_check_true(ex.toString().includes("can't pass"));
       }
       // Since setPosition should have bailed, it shouldn't have moved the
       // file pointer at all.
       do_check_eq((yield file.getPosition()), 0);
 
       // 2. Use an invalid position value
       try {
         yield file.setPosition(0xffffffff + 0.5, OS.File.POS_START);
         do_throw("Shouldn't have succeeded");
       } catch (ex) {
-        do_check_true(ex.toString().contains("can't pass"));
+        do_check_true(ex.toString().includes("can't pass"));
       }
       // Since setPosition should have bailed, it shouldn't have moved the
       // file pointer at all.
       do_check_eq((yield file.getPosition()), 0);
 
       // 3. Use a position that cannot be represented as a double
       try {
         // Not all numbers after 9007199254740992 can be represented as a
--- a/toolkit/components/places/PlacesUtils.jsm
+++ b/toolkit/components/places/PlacesUtils.jsm
@@ -1609,17 +1609,17 @@ this.PlacesUtils = {
    */
   getImageURLForResolution:
   function PU_getImageURLForResolution(aWindow, aURL, aWidth = 16, aHeight = 16) {
     if (!aURL.endsWith('.ico') && !aURL.endsWith('.ICO')) {
       return aURL;
     }
     let width  = Math.round(aWidth * aWindow.devicePixelRatio);
     let height = Math.round(aHeight * aWindow.devicePixelRatio);
-    return aURL + (aURL.contains("#") ? "&" : "#") +
+    return aURL + (aURL.includes("#") ? "&" : "#") +
            "-moz-resolution=" + width + "," + height;
   },
 
   /**
    * Get the unique id for an item (a bookmark, a folder or a separator) given
    * its item id.
    *
    * @param aItemId
--- a/toolkit/components/places/UnifiedComplete.js
+++ b/toolkit/components/places/UnifiedComplete.js
@@ -1154,17 +1154,17 @@ Search.prototype = {
     let match = {};
     let trimmedHost = row.getResultByIndex(QUERYINDEX_URL);
     let untrimmedHost = row.getResultByIndex(QUERYINDEX_TITLE);
     let frecency = row.getResultByIndex(QUERYINDEX_FRECENCY);
 
     // If the untrimmed value doesn't preserve the user's input just
     // ignore it and complete to the found host.
     if (untrimmedHost &&
-        !untrimmedHost.toLowerCase().contains(this._trimmedOriginalSearchString.toLowerCase())) {
+        !untrimmedHost.toLowerCase().includes(this._trimmedOriginalSearchString.toLowerCase())) {
       untrimmedHost = null;
     }
 
     match.value = this._strippedPrefix + trimmedHost;
     // Remove the trailing slash.
     match.comment = stripHttpAndTrim(trimmedHost);
     match.finalCompleteValue = untrimmedHost;
 
@@ -1201,17 +1201,17 @@ Search.prototype = {
       }
       url = url.slice(0, separatorIndex);
     }
 
     // If the untrimmed value doesn't preserve the user's input just
     // ignore it and complete to the found url.
     let untrimmedURL = prefix + url;
     if (untrimmedURL &&
-        !untrimmedURL.toLowerCase().contains(this._trimmedOriginalSearchString.toLowerCase())) {
+        !untrimmedURL.toLowerCase().includes(this._trimmedOriginalSearchString.toLowerCase())) {
       untrimmedURL = null;
      }
 
     match.value = this._strippedPrefix + url;
     match.comment = url;
     match.finalCompleteValue = untrimmedURL;
     // Although this has a frecency, this query is executed before any other
     // queries that would result in frecency matches.
--- a/toolkit/components/places/nsPlacesAutoComplete.js
+++ b/toolkit/components/places/nsPlacesAutoComplete.js
@@ -1492,17 +1492,17 @@ urlInlineComplete.prototype = {
           if (this._pendingSearch != pendingSearch)
             return;
           let row = aResultSet.getNextRow();
           let trimmedHost = row.getResultByIndex(0);
           let untrimmedHost = row.getResultByIndex(1);
           // If the untrimmed value doesn't preserve the user's input just
           // ignore it and complete to the found host.
           if (untrimmedHost &&
-              !untrimmedHost.toLowerCase().contains(this._originalSearchString.toLowerCase())) {
+              !untrimmedHost.toLowerCase().includes(this._originalSearchString.toLowerCase())) {
             untrimmedHost = null;
           }
 
           this._result.appendMatch(this._strippedPrefix + trimmedHost, "", "", "", untrimmedHost);
 
           // handleCompletion() will cause the result listener to be called, and
           // will display the result in the UI.
         },
@@ -1569,17 +1569,17 @@ urlInlineComplete.prototype = {
           url = url.slice(0, separatorIndex);
         }
 
         // Add the result.
         // If the untrimmed value doesn't preserve the user's input just
         // ignore it and complete to the found url.
         let untrimmedURL = prefix + url;
         if (untrimmedURL &&
-            !untrimmedURL.toLowerCase().contains(this._originalSearchString.toLowerCase())) {
+            !untrimmedURL.toLowerCase().includes(this._originalSearchString.toLowerCase())) {
           untrimmedURL = null;
          }
 
         this._result.appendMatch(this._strippedPrefix + url, "", "", "", untrimmedURL);
 
         // handleCompletion() will cause the result listener to be called, and
         // will display the result in the UI.
       },
--- a/toolkit/components/search/tests/xpcshell/test_multipleIcons.js
+++ b/toolkit/components/search/tests/xpcshell/test_multipleIcons.js
@@ -16,20 +16,20 @@ function run_test() {
 }
 
 add_task(function* test_multipleIcons() {
   let [engine] = yield addTestEngines([
     { name: "IconsTest", xmlFileName: "engineImages.xml" },
   ]);
 
   do_print("The default should be the 16x16 icon");
-  do_check_true(engine.iconURI.spec.contains("ico16"));
+  do_check_true(engine.iconURI.spec.includes("ico16"));
 
-  do_check_true(engine.getIconURLBySize(32,32).contains("ico32"));
-  do_check_true(engine.getIconURLBySize(74,74).contains("ico74"));
+  do_check_true(engine.getIconURLBySize(32,32).includes("ico32"));
+  do_check_true(engine.getIconURLBySize(74,74).includes("ico74"));
 
   do_print("Invalid dimensions should return null.");
   do_check_null(engine.getIconURLBySize(50,50));
 
   let allIcons = engine.getIcons();
 
   do_print("Check that allIcons contains expected icon sizes");
   do_check_eq(allIcons.length, 3);
--- a/toolkit/content/tests/widgets/test_videocontrols_standalone.html
+++ b/toolkit/content/tests/widgets/test_videocontrols_standalone.html
@@ -62,17 +62,17 @@ function runTestAudioPre() {
         runTestAudio(audio);
       })
     }
   })
 }
 
 function runTestAudio(aAudio) {
   info("User agent (help diagnose bug #943556): " + navigator.userAgent);
-  var isAndroid = navigator.userAgent.contains("Android");
+  var isAndroid = navigator.userAgent.includes("Android");
   var expectedHeight = isAndroid ? 103 : 28;
   var condition = function () {
     var boundingRect = aAudio.getBoundingClientRect();
     return boundingRect.height == expectedHeight;
   };
   waitForCondition(condition, function () {
     var boundingRect = aAudio.getBoundingClientRect();
     is(boundingRect.height, expectedHeight,
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -1115,17 +1115,17 @@ extends="chrome://global/content/binding
         <parameter name="aHeight"/>
         <body>
           <![CDATA[
           if (!aURL.endsWith('.ico') && !aURL.endsWith('.ICO')) {
             return aURL;
           }
           let width  = Math.round(aWidth * aWin.devicePixelRatio);
           let height = Math.round(aHeight * aWin.devicePixelRatio);
-          return aURL + (aURL.contains("#") ? "&" : "#") +
+          return aURL + (aURL.includes("#") ? "&" : "#") +
                  "-moz-resolution=" + width + "," + height;
           ]]>
         </body>
       </method>
 
       <method name="_appendCurrentResult">
         <body>
           <![CDATA[
--- a/toolkit/devtools/event-emitter.js
+++ b/toolkit/devtools/event-emitter.js
@@ -150,17 +150,17 @@ EventEmitter.prototype = {
     let logging = isWorker ? true : Services.prefs.getBoolPref("devtools.dump.emit");
 
     if (logging) {
       let caller, func, path;
       if (!isWorker) {
         caller = components.stack.caller.caller;
         func = caller.name;
         let file = caller.filename;
-        if (file.contains(" -> ")) {
+        if (file.includes(" -> ")) {
           file = caller.filename.split(/ -> /)[1];
         }
         path = file + ":" + caller.lineNumber;
       }
 
       let argOut = "(";
       if (args.length === 1) {
         argOut += aEvent;
--- a/toolkit/devtools/event-parsers.js
+++ b/toolkit/devtools/event-parsers.js
@@ -98,17 +98,17 @@ let parsers = [
 
       let name = handlerDO.displayName;
 
       if (!name) {
         return handlerDO;
       }
 
       for (let path of paths) {
-        if (name.contains(path[0])) {
+        if (name.includes(path[0])) {
           path.splice(0, 1);
 
           for (let point of path) {
             let names = handlerDO.environment.names();
 
             for (let varName of names) {
               let temp = handlerDO.environment.getVariable(varName);
               if (!temp) {
@@ -116,17 +116,17 @@ let parsers = [
               }
 
               let displayName = temp.displayName;
               if (!displayName) {
                 continue;
               }
 
               if (temp.class === "Function" &&
-                  (displayName.contains(point) || point === "*")) {
+                  (displayName.includes(point) || point === "*")) {
                 handlerDO = temp;
                 break;
               }
             }
           }
           break;
         }
       }
--- a/toolkit/devtools/server/actors/script.js
+++ b/toolkit/devtools/server/actors/script.js
@@ -1537,17 +1537,17 @@ ThreadActor.prototype = {
     if (aFrame) {
       aFrame.onStep = undefined;
       aFrame.onPop = undefined;
     }
 
     // Clear DOM event breakpoints.
     // XPCShell tests don't use actual DOM windows for globals and cause
     // removeListenerForAllEvents to throw.
-    if (this.global && !this.global.toString().contains("Sandbox")) {
+    if (this.global && !this.global.toString().includes("Sandbox")) {
       let els = Cc["@mozilla.org/eventlistenerservice;1"]
                 .getService(Ci.nsIEventListenerService);
       els.removeListenerForAllEvents(this.global, this._allEventsListener, true);
       for (let [,bp] of this._hiddenBreakpoints) {
         bp.onDelete();
       }
       this._hiddenBreakpoints.clear();
     }
--- a/toolkit/devtools/server/tests/unit/test_source-01.js
+++ b/toolkit/devtools/server/tests/unit/test_source-01.js
@@ -51,17 +51,17 @@ function test_source()
 
       do_check_true(!!source);
 
       let sourceClient = gThreadClient.source(source);
       sourceClient.source(function (aResponse) {
         do_check_true(!!aResponse);
         do_check_true(!aResponse.error);
         do_check_true(!!aResponse.contentType);
-        do_check_true(aResponse.contentType.contains("javascript"));
+        do_check_true(aResponse.contentType.includes("javascript"));
 
         do_check_true(!!aResponse.source);
         do_check_eq(SOURCE_CONTENT,
                     aResponse.source);
 
         gThreadClient.resume(function () {
           finishClient(gClient);
         });
--- a/toolkit/devtools/tests/unit/test_safeErrorString.js
+++ b/toolkit/devtools/tests/unit/test_safeErrorString.js
@@ -10,37 +10,37 @@ function run_test() {
   test_with_string();
   test_with_thrower();
   test_with_psychotic();
 }
 
 function test_with_error() {
   let s = DevToolsUtils.safeErrorString(new Error("foo bar"));
   // Got the message.
-  do_check_true(s.contains("foo bar"));
+  do_check_true(s.includes("foo bar"));
   // Got the stack.
-  do_check_true(s.contains("test_with_error"))
-  do_check_true(s.contains("test_safeErrorString.js"));
+  do_check_true(s.includes("test_with_error"))
+  do_check_true(s.includes("test_safeErrorString.js"));
   // Got the lineNumber and columnNumber.
-  do_check_true(s.contains("Line"));
-  do_check_true(s.contains("column"));
+  do_check_true(s.includes("Line"));
+  do_check_true(s.includes("column"));
 }
 
 function test_with_tricky_error() {
   let e = new Error("batman");
   e.stack = { toString: Object.create(null) };
   let s = DevToolsUtils.safeErrorString(e);
   // Still got the message, despite a bad stack property.
-  do_check_true(s.contains("batman"));
+  do_check_true(s.includes("batman"));
 }
 
 function test_with_string() {
   let s = DevToolsUtils.safeErrorString("not really an error");
   // Still get the message.
-  do_check_true(s.contains("not really an error"));
+  do_check_true(s.includes("not really an error"));
 }
 
 function test_with_thrower() {
   let s = DevToolsUtils.safeErrorString({
     toString: () => {
       throw new Error("Muahahaha");
     }
   });
--- a/toolkit/devtools/webconsole/utils.js
+++ b/toolkit/devtools/webconsole/utils.js
@@ -592,17 +592,17 @@ let WebConsoleUtils = {
           // Cleanup function if notification is dismissed
           if (eventType == "removed") {
             inputField.removeEventListener("keyup", pasteKeyUpHandler);
           }
         });
 
       function pasteKeyUpHandler(aEvent2) {
         let value = inputField.value || inputField.textContent;
-        if (value.contains(okstring)) {
+        if (value.includes(okstring)) {
           notificationBox.removeNotification(notification);
           inputField.removeEventListener("keyup", pasteKeyUpHandler);
           WebConsoleUtils.usageCount = CONSOLE_ENTRY_THRESHOLD;
         }
       }
       inputField.addEventListener("keyup", pasteKeyUpHandler);
 
       aEvent.preventDefault();
--- a/toolkit/modules/GMPInstallManager.jsm
+++ b/toolkit/modules/GMPInstallManager.jsm
@@ -731,17 +731,17 @@ GMPExtractor.prototype = {
                       createInstance(Ci.nsIZipReader);
       zipReader.open(zipFile)
       let entries = this._getZipEntries(zipReader);
       let extractedPaths = [];
 
       // Extract each of the entries
       entries.forEach(entry => {
         // We don't need these types of files
-        if (entry.contains("__MACOSX")) {
+        if (entry.includes("__MACOSX")) {
           return;
         }
         let outFile = Cc["@mozilla.org/file/local;1"].
                       createInstance(Ci.nsILocalFile);
         outFile.initWithPath(this.installToDirPath);
         outFile.appendRelativePath(entry);
 
         // Make sure the directory hierarchy exists
--- a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
+++ b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
@@ -194,17 +194,17 @@ add_test(function test_checkForAddons_ba
 
 
   overrideXHR(200, "");
   let installManager = new GMPInstallManager();
   let promise = installManager.checkForAddons();
   promise.then(() => {
     do_throw("Defensive timeout should reject");
   }, err => {
-    do_check_true(err.message.contains("SSL is required and URI scheme is " +
+    do_check_true(err.message.includes("SSL is required and URI scheme is " +
                                        "not https."));
     installManager.uninit();
     if (PREF_KEY_URL_OVERRIDE_BACKUP) {
       Preferences.set(GMPScope.GMPPrefs.KEY_URL_OVERRIDE,
         PREF_KEY_URL_OVERRIDE_BACKUP);
     }
     if (PREF_CERTS_BRANCH_DOT_ONE_BACKUP) {
       Preferences.set(CERTS_BRANCH_DOT_ONE,
--- a/toolkit/modules/tests/xpcshell/test_Log.js
+++ b/toolkit/modules/tests/xpcshell/test_Log.js
@@ -424,26 +424,26 @@ add_task(function log_message_with_param
 
   /*
    * Check that errors get special formatting if they're formatted directly as
    * a named param or they're the only param, but not if they're a field in a
    * larger structure.
    */
   let err = Components.Exception("test exception", Components.results.NS_ERROR_FAILURE);
   let str = formatMessage("Exception is ${}", err);
-  do_check_true(str.contains('Exception is [Exception... "test exception"'));
-  do_check_true(str.contains("(NS_ERROR_FAILURE)"));
+  do_check_true(str.includes('Exception is [Exception... "test exception"'));
+  do_check_true(str.includes("(NS_ERROR_FAILURE)"));
   str = formatMessage("Exception is", err);
-  do_check_true(str.contains('Exception is: [Exception... "test exception"'));
+  do_check_true(str.includes('Exception is: [Exception... "test exception"'));
   str = formatMessage("Exception is ${error}", {error: err});
-  do_check_true(str.contains('Exception is [Exception... "test exception"'));
+  do_check_true(str.includes('Exception is [Exception... "test exception"'));
   str = formatMessage("Exception is", {_error: err});
   do_print(str);
   // Exceptions buried inside objects are formatted badly.
-  do_check_true(str.contains('Exception is: {"_error":{}'));
+  do_check_true(str.includes('Exception is: {"_error":{}'));
   // If the message text is null, the message contains only the formatted params object.
   str = formatMessage(null, err);
   do_check_true(str.startsWith('[Exception... "test exception"'));
   // If the text is null and 'params' is a String object, the message is exactly that string.
   str = formatMessage(null, new String("String in place of params"));
   do_check_eq(str, "String in place of params");
 
   // We use object.valueOf() internally; make sure a broken valueOf() method
@@ -520,24 +520,24 @@ add_task(function test_structured_basic(
   log.level = Log.Level.Info;
   appender.level = Log.Level.Info;
   log.addAppender(appender);
 
   // A structured entry with no _message is treated the same as log./level/(null, params)
   // except the 'action' field is added to the object.
   log.logStructured("action", {data: "structure"});
   do_check_eq(appender.messages.length, 1);
-  do_check_true(appender.messages[0].contains('{"data":"structure","action":"action"}'));
+  do_check_true(appender.messages[0].includes('{"data":"structure","action":"action"}'));
 
   // A structured entry with _message and substitution is treated the same as
   // log./level/(null, params).
   log.logStructured("action", {_message: "Structured sub ${data}", data: "structure"});
   do_check_eq(appender.messages.length, 2);
   do_print(appender.messages[1]);
-  do_check_true(appender.messages[1].contains('Structured sub structure'));
+  do_check_true(appender.messages[1].includes('Structured sub structure'));
 });
 
 /*
  * Test that all the basic logger methods pass the message and params through to the appender.
  */
 add_task(function log_message_with_params() {
   let log = Log.repository.getLogger("error.logger");
   let testFormatter = { format: msg => msg };
@@ -563,30 +563,30 @@ add_task(function log_message_with_param
  * Check that we format JS Errors reasonably.
  */
 add_task(function format_errors() {
   let pFormat = new Log.ParameterFormatter();
 
   // Test that subclasses of Error are recognized as errors.
   err = new ReferenceError("Ref Error", "ERROR_FILE", 28);
   str = pFormat.format(err);
-  do_check_true(str.contains("ReferenceError"));
-  do_check_true(str.contains("ERROR_FILE:28"));
-  do_check_true(str.contains("Ref Error"));
+  do_check_true(str.includes("ReferenceError"));
+  do_check_true(str.includes("ERROR_FILE:28"));
+  do_check_true(str.includes("Ref Error"));
 
   // Test that JS-generated Errors are recognized and formatted.
   try {
     yield Promise.resolve();  // Scrambles the stack
     eval("javascript syntax error");
   }
   catch (e) {
     str = pFormat.format(e);
-    do_check_true(str.contains("SyntaxError: missing ;"));
+    do_check_true(str.includes("SyntaxError: missing ;"));
     // Make sure we identified it as an Error and formatted the error location as
     // lineNumber:columnNumber.
-    do_check_true(str.contains(":1:11)"));
+    do_check_true(str.includes(":1:11)"));
     // Make sure that we use human-readable stack traces
     // Check that the error doesn't contain any reference to "Promise.jsm" or "Task.jsm"
-    do_check_false(str.contains("Promise.jsm"));
-    do_check_false(str.contains("Task.jsm"));
-    do_check_true(str.contains("format_errors"));
+    do_check_false(str.includes("Promise.jsm"));
+    do_check_false(str.includes("Task.jsm"));
+    do_check_true(str.includes("format_errors"));
   }
 });
--- a/toolkit/modules/tests/xpcshell/test_task.js
+++ b/toolkit/modules/tests/xpcshell/test_task.js
@@ -547,17 +547,17 @@ add_test(function test_throw_stack_do_no
         for (let i = 0; i < iter_a; ++i) {
           yield Promise.resolve();
         }
         throw new Error("BOOM");
       }).then(do_throw, function(ex) {
         do_check_rewritten_stack(["task_a",
                                   "test_throw_stack_do_not_capture_the_wrong_task"],
                                   ex);
-        do_check_true(!ex.stack.contains("task_b"));
+        do_check_true(!ex.stack.includes("task_b"));
         run_next_test();
       });
       Task.spawn(function* task_b() {
         for (let i = 0; i < iter_b; ++i) {
           yield Promise.resolve();
         }
       });
     }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_XPIStates.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_XPIStates.js
@@ -184,17 +184,17 @@ add_task(function* uninstall_bootstrap()
   let [pe, pd, ue, ud] = yield promiseAddonsByIDs([
          "packed-enabled@tests.mozilla.org",
          "packed-disabled@tests.mozilla.org",
          "unpacked-enabled@tests.mozilla.org",
          "unpacked-disabled@tests.mozilla.org"
          ]);
   pe.uninstall();
   let xpiState = Services.prefs.getCharPref("extensions.xpiState");
-  do_check_false(xpiState.contains("\"packed-enabled@tests.mozilla.org\""));
+  do_check_false(xpiState.includes("\"packed-enabled@tests.mozilla.org\""));
 });
 
 /*
  * Installing a restartless add-on should immediately add it to XPIState
  */
 add_task(function* install_bootstrap() {
   let XS = getXS();
 
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js
@@ -109,20 +109,20 @@ function test() {
 }
 
 function endThisTest() {
   is(gResults.length, 2, "Should have two urls");
   isnot(gResults[0].loc, gResults[1].loc, "Should not have results from the same page.");
   isnot(gResults[0].xpi, gResults[1].xpi, "Should not have the same XPIs.");
   for (let i = 0; i < 2; i++) {
     let {loc, xpi} = gResults[i];
-    if (loc.contains("example.org")) {
-      ok(xpi.contains("example.org"), "Should get .org XPI for .org loc");
-    } else if (loc.contains("example.com")) {
-      ok(xpi.contains("example.com"), "Should get .com XPI for .com loc");
+    if (loc.includes("example.org")) {
+      ok(xpi.includes("example.org"), "Should get .org XPI for .org loc");
+    } else if (loc.includes("example.com")) {
+      ok(xpi.includes("example.com"), "Should get .com XPI for .com loc");
     } else {
       ok(false, "Should never get anything that isn't from example.org or example.com");
     }
   }
 
   finish();
 }
 
--- a/toolkit/webapps/tests/test_hosted_uninstall.xul
+++ b/toolkit/webapps/tests/test_hosted_uninstall.xul
@@ -103,17 +103,17 @@ let runTest = Task.async(function*() {
   }
   // On Mac, the app is moved to the trash, it is still considered launchable
   // (because it does have a install path).
   if (!MAC) {
     ok(!WebappOSUtils.isLaunchable(app), "App not launchable");
     is(WebappOSUtils.getInstallPath(app), null, "getInstallPath == null");
   } else {
     testAppInfo.trashDir = WebappOSUtils.getInstallPath(app);
-    ok(testAppInfo.trashDir.contains(".Trash"), "App moved to Trash");
+    ok(testAppInfo.trashDir.includes(".Trash"), "App moved to Trash");
   }
 
   is(WebappOSUtils.launch(app), false, "Launch fails");
 
   // On Mac, after we've tried to launch the app, its install path becomes null
   // We can now repeat the tests we've already done on the other platforms:
   if (MAC) {
     while (WebappOSUtils.isLaunchable(app)) {
--- a/toolkit/webapps/tests/test_packaged_uninstall.xul
+++ b/toolkit/webapps/tests/test_packaged_uninstall.xul
@@ -113,17 +113,17 @@ let runTest = Task.async(function*() {
 
   // On Mac, the app is moved to the trash, it is still considered launchable
   // (because it does have a install path).
   if (!MAC) {
     ok(!WebappOSUtils.isLaunchable(app), "App not launchable");
     is(WebappOSUtils.getInstallPath(app), null, "getInstallPath == null");
   } else {
     testAppInfo.trashDir = WebappOSUtils.getInstallPath(app);
-    ok(testAppInfo.trashDir.contains(".Trash"), "App moved to Trash");
+    ok(testAppInfo.trashDir.includes(".Trash"), "App moved to Trash");
   }
 
   is(WebappOSUtils.launch(app), false, "Launch fails");
 
   // On Mac, after we've tried to launch the app, its install path becomes null
   // We can now repeat the tests we've already done on the other platforms:
   if (MAC) {
     while (WebappOSUtils.isLaunchable(app)) {
--- a/webapprt/content/downloads/downloads.js
+++ b/webapprt/content/downloads/downloads.js
@@ -471,17 +471,17 @@ DownloadItem.prototype = {
   /**
    * Check if the download matches the provided search term based on the texts
    * shown to the user. All search terms are checked to see if each matches any
    * of the displayed texts.
    *
    * @return Boolean true if it matches the search; false otherwise
    */
   matchesSearch: function(aTerms, aAttributes) {
-    return aTerms.some(term => aAttributes.some(attr => this.element.getAttribute(attr).contains(term)));
+    return aTerms.some(term => aAttributes.some(attr => this.element.getAttribute(attr).includes(term)));
   },
 
   isCommandEnabled: function(aCommand) {
     switch (aCommand) {
       case "cmd_cancel":
         return this.inProgress;
 
       case "cmd_open":