From ba65ed56c1102b6a3dcb4bdc8acf0f32d9aaa3f1 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Wed, 11 Mar 2015 09:27:07 +1100 Subject: [PATCH] Bug 1141505 - avoid array.includes in xpcshell test. r=adw --- browser/components/readinglist/test/xpcshell/test_scheduler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/components/readinglist/test/xpcshell/test_scheduler.js b/browser/components/readinglist/test/xpcshell/test_scheduler.js index bb258a4720d..8b2eb033366 100644 --- a/browser/components/readinglist/test/xpcshell/test_scheduler.js +++ b/browser/components/readinglist/test/xpcshell/test_scheduler.js @@ -30,7 +30,7 @@ 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); } }