summaryrefslogtreecommitdiffstats
path: root/comm/calendar/test/unit/test_bug486186.js
blob: cf2559479041dec1f9aa9108e98386e025b776a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* 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/. */

var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");

XPCOMUtils.defineLazyModuleGetters(this, {
  CalAlarm: "resource:///modules/CalAlarm.jsm",
});

function run_test() {
  // ensure that RELATED property is correctly set on the VALARM component
  let alarm = new CalAlarm();
  alarm.action = "DISPLAY";
  alarm.description = "test";
  alarm.related = Ci.calIAlarm.ALARM_RELATED_END;
  alarm.offset = cal.createDuration("-PT15M");
  if (alarm.icalString.search(/RELATED=END/) == -1) {
    do_throw("Bug 486186: RELATED property missing in VALARM component");
  }
}