Bug 1126633 - Use Array.prototype.some() instead of Array.prototype.includes() in promiseSetToolbarVisibility. r=mak, a=test-only
authorBrian Birtles <birtles@gmail.com>
Fri, 30 Jan 2015 08:46:03 +0900
changeset 249606 4dfdf27c25541607280b33cf94b6c1b2430cee8b
parent 249605 c4c5fd24109fcae0981f5a94cb1dacf9f2aac63a
child 249607 c2931fcc7178f1c858df8ad8f32563c53c8cc6b2
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, test-only
bugs1126633
milestone37.0a2
Bug 1126633 - Use Array.prototype.some() instead of Array.prototype.includes() in promiseSetToolbarVisibility. r=mak, a=test-only Array.prototype.includes() is disabled for all channels except Nightly so this patch switches the code in head.js to use some() instead.
browser/components/places/tests/browser/head.js
--- a/browser/components/places/tests/browser/head.js
+++ b/browser/components/places/tests/browser/head.js
@@ -400,18 +400,19 @@ function promiseSetToolbarVisibility(aTo
         aToolbar.removeEventListener("transitionend", listener);
         resolve();
       }
     }
 
     let transitionProperties =
       window.getComputedStyle(aToolbar).transitionProperty.split(", ");
     if (isToolbarVisible(aToolbar) != aVisible &&
-        (transitionProperties.includes("max-height") ||
-         transitionProperties.includes("all"))) {
+        transitionProperties.some(
+          prop => prop == "max-height" || prop == "all"
+        )) {
       // Just because max-height is a transitionable property doesn't mean
       // a transition will be triggered, but it's more likely.
       aToolbar.addEventListener("transitionend", listener);
       setToolbarVisibility(aToolbar, aVisible);
       return;
     }
 
     // No animation to wait for