Bug 1141505 - avoid array.includes in xpcshell test. r=adw a=readinglist
authorMark Hammond <mhammond@skippinet.com.au>
Wed, 11 Mar 2015 09:27:07 +1100
changeset 248420 b18bdcfaba790d7f8261306bcf9d16fb97411a5c
parent 248419 569f5001706570cc73b0aba67d05092175ecc552
child 248421 82be87b08032f3d4512813b25077e9998081c0e7
push id7837
push userjwein@mozilla.com
push dateFri, 27 Mar 2015 00:27:16 +0000
treeherdermozilla-aurora@cb0db44ce60e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw, readinglist
bugs1141505
milestone38.0a2
Bug 1141505 - avoid array.includes in xpcshell test. r=adw a=readinglist
browser/components/readinglist/test/xpcshell/test_scheduler.js
--- a/browser/components/readinglist/test/xpcshell/test_scheduler.js
+++ b/browser/components/readinglist/test/xpcshell/test_scheduler.js
@@ -25,17 +25,17 @@ function promiseObserver(topic) {
     Services.obs.addObserver(obs, topic, false);
   });
 }
 
 function createScheduler(options) {
   // avoid typos in the test and other footguns in the options.
   let allowedOptions = ["expectedDelay", "expectNewTimer", "syncFunction"];
   for (let key of Object.keys(options)) {
-    if (!allowedOptions.includes(key)) {
+    if (allowedOptions.indexOf(key) == -1) {
       throw new Error("Invalid option " + key);
     }
   }
   let scheduler = createTestableScheduler();
   // make our hooks
   let syncFunction = options.syncFunction || Promise.resolve;
   scheduler._engine.sync = syncFunction;
   // we expect _setTimeout to be called *twice* - first is the initial sync,