mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
4e55362a90
Map the modules directory to services-sync instead of weave and update imports.
26 lines
704 B
JavaScript
26 lines
704 B
JavaScript
Cu.import("resource://services-sync/trackers.js");
|
|
|
|
function run_test() {
|
|
let tracker = new Tracker();
|
|
let id = "the_id!";
|
|
|
|
_("Make sure nothing exists yet..");
|
|
do_check_eq(tracker.changedIDs[id], null);
|
|
|
|
_("Make sure adding of time 0 works");
|
|
tracker.addChangedID(id, 0);
|
|
do_check_eq(tracker.changedIDs[id], 0);
|
|
|
|
_("A newer time will replace the old 0");
|
|
tracker.addChangedID(id, 10);
|
|
do_check_eq(tracker.changedIDs[id], 10);
|
|
|
|
_("An older time will not replace the newer 10");
|
|
tracker.addChangedID(id, 5);
|
|
do_check_eq(tracker.changedIDs[id], 10);
|
|
|
|
_("Adding without time defaults to current time");
|
|
tracker.addChangedID(id);
|
|
do_check_true(tracker.changedIDs[id] > 10);
|
|
}
|