Bug 1191296 - Revert use of .includes() to .indexOf() != -1. r=jesup
authorJan-Ivar Bruaroey <jib@mozilla.com>
Wed, 05 Aug 2015 12:03:50 -0400
changeset 256697 fda85fc07f423f4063d953da85333dc34941ed88
parent 256696 d8b9c2d8e7afabbbed5a84482a62701de65b8f4f
child 256698 b5168cc893e880f0fa3acf6daf5825b46a0bae74
push id63400
push userkwierso@gmail.com
push dateFri, 07 Aug 2015 01:11:26 +0000
treeherdermozilla-inbound@efc97cd68267 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1191296
milestone42.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 1191296 - Revert use of .includes() to .indexOf() != -1. r=jesup
dom/media/tests/mochitest/test_getUserMedia_constraints.html
--- a/dom/media/tests/mochitest/test_getUserMedia_constraints.html
+++ b/dom/media/tests/mochitest/test_getUserMedia_constraints.html
@@ -85,20 +85,20 @@ var mustSupport = [
  */
 
 runTest(function() {
 
   // Check supported constraints first.
   var dict = navigator.mediaDevices.getSupportedConstraints();
   var supported = Object.keys(dict);
 
-  mustSupport.forEach(key => ok(supported.includes(key) && dict[key],
+  mustSupport.forEach(key => ok(supported.indexOf(key) != -1 && dict[key],
                                 "Supports " + key));
 
-  var unexpected = supported.filter(key => !mustSupport.includes(key));
+  var unexpected = supported.filter(key => mustSupport.indexOf(key) == -1);
   is(unexpected.length, 0,
      "Unanticipated support (please update test): " + unexpected);
 
   // Run constraint tests
 
   var p = new Promise(resolve => SpecialPowers.pushPrefEnv({
       set : [ ['media.getusermedia.browser.enabled', false],
               ['media.getusermedia.screensharing.enabled', false] ]