~ubuntu-branches/ubuntu/trusty/enigmail/trusty-updates

« back to all changes in this revision

Viewing changes to services/sync/tests/unit/test_tracker_addChanged.js

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2011-06-07 14:35:53 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: package-import@ubuntu.com-20110607143553-fbgqhhvh8g8h6j1y
Tags: 2:1.2~a2~cvs20110606t2200-0ubuntu1
* Update to latest trunk snapshot for Thunderbird beta compat

* Remove build/pgo/profileserver.py from debian/clean. The new build
  system has a target depending on this
  - update debian/clean
* Drop debian/patches/autoconf.diff, just generate this at build time
* Refresh debian/patches/build_system_dont_link_libxul.diff
* libipc seems to be renamed to libipc-pipe. Fix genxpi and chrome.manifest
  to fix this 
  - add debian/patches/ipc-pipe_rename.diff
  - update debian/patches/series
* The makefiles in extensions/enigmail/ipc have an incorrect DEPTH
  attribute. Fix this so that they can find the rest of the build system
  - add debian/patches/makefile_depth.diff
  - update debian/patches/series
* Drop debian/patches/makefile-in-empty-xpcom-fix.diff - fixed in the
  current version
* Don't register a class ID multiple times, as this breaks enigmail entirely
  - add debian/patches/dont_register_cids_multiple_times.diff
  - update debian/patches/series
* Look for the Thunderbird 5 SDK
  - update debian/rules
  - update debian/control
* Run autoconf2.13 at build time
  - update debian/rules
  - update debian/control
* Add useless mesa-common-dev build-dep, just to satisfy the build system.
  We should just patch this out entirely really, but that's for another upload
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Cu.import("resource://services-sync/engines.js");
 
2
 
 
3
function run_test() {
 
4
  let tracker = new Tracker();
 
5
  let id = "the_id!";
 
6
 
 
7
  _("Make sure nothing exists yet..");
 
8
  do_check_eq(tracker.changedIDs[id], null);
 
9
 
 
10
  _("Make sure adding of time 0 works");
 
11
  tracker.addChangedID(id, 0);
 
12
  do_check_eq(tracker.changedIDs[id], 0);
 
13
 
 
14
  _("A newer time will replace the old 0");
 
15
  tracker.addChangedID(id, 10);
 
16
  do_check_eq(tracker.changedIDs[id], 10);
 
17
 
 
18
  _("An older time will not replace the newer 10");
 
19
  tracker.addChangedID(id, 5);
 
20
  do_check_eq(tracker.changedIDs[id], 10);
 
21
 
 
22
  _("Adding without time defaults to current time");
 
23
  tracker.addChangedID(id);
 
24
  do_check_true(tracker.changedIDs[id] > 10);
 
25
}