Bug 1346797 - Fix calendar eslint issues - Fix id-length issues. r=MakeMyDay
authoreslint <eslint@bugzilla.kewis.ch>
Sun, 30 Jul 2017 13:18:09 +0200
changeset 22298 69ed6b20f6f2955a848a1cc750762834b857c482
parent 22297 076da1348bcce4fc0b579531505709fb0601b790
child 22299 b97e6e08645d15f892d3a30341c9d19b6cc2b3f3
push id13598
push usermozilla@jorgk.com
push dateSun, 08 Oct 2017 20:54:24 +0000
treeherdercomm-central@86066f04ca11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMakeMyDay
bugs1346797
Bug 1346797 - Fix calendar eslint issues - Fix id-length issues. r=MakeMyDay MozReview-Commit-ID: DCvy81iP1qp
calendar/test/unit/test_datetimeformatter.js
--- a/calendar/test/unit/test_datetimeformatter.js
+++ b/calendar/test/unit/test_datetimeformatter.js
@@ -38,18 +38,18 @@ add_task(function* formatDate_test() {
 
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
         Preferences.set("calendar.date.format", test.input.dateformat);
-        let tz = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
-        let date = cal.createDateTime(test.input.datetime).getInTimezone(tz);
+        let zone = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
         let formatted = dtFormatter.formatDate(date);
         ok(
             test.expected.includes(formatted),
             "(test #" + i + ": result '" + formatted + "', expected '" + test.expected + "')"
         );
@@ -117,18 +117,18 @@ add_task(function* formatDateShort_test(
     Preferences.set("calendar.date.format", 0);
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
 
-        let tz = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
-        let date = cal.createDateTime(test.input.datetime).getInTimezone(tz);
+        let zone = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
 
         let formatted = dtFormatter.formatDateShort(date);
         ok(
             test.expected.includes(formatted),
             "(test #" + i + ": result '" + formatted + "', expected '" + test.expected + "')"
@@ -197,18 +197,18 @@ add_task(function* formatDateLong_test()
     Preferences.set("calendar.date.format", 1);
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
 
-        let tz = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
-        let date = cal.createDateTime(test.input.datetime).getInTimezone(tz);
+        let zone = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
 
         let formatted = dtFormatter.formatDateLong(date);
         ok(
             test.expected.includes(formatted),
             "(test #" + i + ": result '" + formatted + "', expected '" + test.expected + "')"
@@ -277,18 +277,18 @@ add_task(function* formatDateWithoutYear
     Preferences.set("calendar.date.format", 1);
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
 
-        let tz = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
-        let date = cal.createDateTime(test.input.datetime).getInTimezone(tz);
+        let zone = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
 
         equal(dtFormatter.formatDateWithoutYear(date), test.expected, "(test #" + i + ")");
     }
     // let's reset the preferences
     Preferences.set("calendar.timezone.local", tzlocal);
@@ -332,18 +332,18 @@ add_task(function* formatTime_test() {
     Preferences.set("calendar.timezone.local", "Pacific/Fakaofo");
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
 
-        let tz = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
-        let date = cal.createDateTime(test.input.datetime).getInTimezone(tz);
+        let zone = (test.input.timezone == 'floating') ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
 
         let formatted = dtFormatter.formatTime(date);
         ok(
             test.expected.includes(formatted),
             "(test #" + i + ": result '" + formatted + "', expected '" + test.expected + "')"