Fix bug 1159447 - TEST-UNEXPECTED-FAIL | xpcshell-icaljs.ini:calendar/test/unit/test_extract.js (regression). r=redDragon,a=philipp
authorPhilipp Kewisch <mozilla@kewis.ch>
Wed, 29 Apr 2015 09:32:27 +0200
changeset 25980 63334a823610d7cac154e68e762aee275737901c
parent 25979 e122397eeb86fafb9cccd53e941a1eaba6e06d79
child 25981 0126951b6e9e88d423b231af9f9981894d7fdf4b
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersredDragon, philipp
bugs1159447
Fix bug 1159447 - TEST-UNEXPECTED-FAIL | xpcshell-icaljs.ini:calendar/test/unit/test_extract.js (regression). r=redDragon,a=philipp
calendar/base/content/calendar-extract.js
calendar/test/unit/test_extract.js
--- a/calendar/base/content/calendar-extract.js
+++ b/calendar/base/content/calendar-extract.js
@@ -87,17 +87,17 @@ let calendarExtract = {
                                                   false,
                                                   true,
                                                   { });
         cal.LOG("[calExtract] Original email content: \n" + title + "\r\n" + content);
         let date = new Date(message.date/1000);
         let time = (new Date()).getTime();
 
         let locale = Preferences.get("general.useragent.locale", "en-US");
-        let baseUrl = "jar:resource://calendar/chrome/calendar-LOCALE.jar!/locale/LOCALE/calendar/calendar-extract.properties";
+        let baseUrl = "resource://calendar/chrome/calendar-LOCALE/locale/LOCALE/calendar/calendar-extract.properties";
         let dayStart = Preferences.get("calendar.view.daystarthour", 6);
         let extractor;
 
         if (fixedLang) {
             extractor = new Extractor(baseUrl, fixedLocale, dayStart);
         } else {
             extractor = new Extractor(baseUrl, locale, dayStart, false);
         }
--- a/calendar/test/unit/test_extract.js
+++ b/calendar/test/unit/test_extract.js
@@ -1,19 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 Components.utils.import("resource://calendar/modules/calExtract.jsm");
 Components.utils.import("resource://gre/modules/Preferences.jsm");
 
-var baseUrl = "jar:resource://calendar/chrome/calendar-LOCALE.jar!/locale/LOCALE/calendar/calendar-extract.properties";
-var extractor = new Extractor(baseUrl, "en-US", 8);
+let baseUrl = "resource://calendar/chrome/calendar-LOCALE/locale/LOCALE/calendar/calendar-extract.properties";
+let extractor = new Extractor(baseUrl, "en-US", 8);
 
 function run_test() {
+    // Sanity check to make sure the base url is still right. If this fails,
+    // don't forget to also fix the url in base/content/calendar-extract.js.
+    ok(extractor.checkBundle("en-US"));
+
     test_event_start_end();
     test_event_start_duration();
     test_event_start_end_whitespace();
     test_event_without_date();
     test_event_next_year();
     test_task_due();
     test_overrides();
     test_event_start_dollar_sign();