Bug 1303810 - Fix undeclared variable in test_css-properties-db.js; r=me to help reopen this CLOSED TREE
authorGreg Tatum <tatum.creative@gmail.com>
Mon, 19 Sep 2016 15:17:06 -0700
changeset 355660 c429089a8e66cff46a0fba433acee27f08057034
parent 355659 5dddbefdf759f09b1411f33fa0920835b919fc81
child 355661 ef0680dc3d4feb015a07b3edefe0b9d2a095bdec
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1303810
milestone51.0a2
Bug 1303810 - Fix undeclared variable in test_css-properties-db.js; r=me to help reopen this CLOSED TREE MozReview-Commit-ID: CVBWocRIzlK
devtools/shared/tests/unit/test_css-properties-db.js
--- a/devtools/shared/tests/unit/test_css-properties-db.js
+++ b/devtools/shared/tests/unit/test_css-properties-db.js
@@ -59,17 +59,17 @@ function run_test() {
 
   /**
    * Check that the list of properties on the platform and client are the same. If
    * they are not, check that there may be preferences that are disabling them on the
    * target platform.
    */
   const mismatches = getKeyMismatches(platformProperties, CSS_PROPERTIES)
     // Filter out OS-specific properties.
-    .filter(name => name.indexOf("-moz-osx-") === -1);
+    .filter(name => name && name.indexOf("-moz-osx-") === -1);
 
   if (mismatches.length === 0) {
     ok(true, "No client and platform CSS property database mismatches were found.");
   }
 
   mismatches.forEach(propertyName => {
     if (getPreference(propertyName) === false) {
       ok(true, `The static database and platform do not agree on the property ` +
@@ -144,13 +144,13 @@ function getPreference(propertyName) {
  * @param {Object} b
  * @return {Array} keys
  */
 function getKeyMismatches(a, b) {
   const aNames = Object.keys(a);
   const bNames = Object.keys(b);
   const aMismatches = aNames.filter(key => !bNames.includes(key));
   const bMismatches = bNames.filter(key => {
-    return !aNames.includes(key) && !aMismatches.includes(name);
+    return !aNames.includes(key) && !aMismatches.includes(key);
   });
 
   return aMismatches.concat(bMismatches);
 }