Bug 1321533 - places/tests/unit/test_telemetry.js assumes the decay time must be positive. r=Standard8 draft
authorMarco Bonardo <mbonardo@mozilla.com>
Fri, 21 Apr 2017 12:13:07 +0200
changeset 566384 68ad4a64de2cec95c0663f32395600c2cafd2d59
parent 566156 8b854986038cf3f3f240697e27ef48ea65914c13
child 625289 1be76ae14124a0d8244ab7c55f630c29bbb001e3
push id55188
push usermak77@bonardo.net
push dateFri, 21 Apr 2017 10:15:49 +0000
reviewersStandard8
bugs1321533
milestone55.0a1
Bug 1321533 - places/tests/unit/test_telemetry.js assumes the decay time must be positive. r=Standard8 The decay time in optimize builds could be very small, and due to timers resolution it could end up being 0. MozReview-Commit-ID: 3F8sm5Fmuri
toolkit/components/places/tests/unit/test_telemetry.js
--- a/toolkit/components/places/tests/unit/test_telemetry.js
+++ b/toolkit/components/places/tests/unit/test_telemetry.js
@@ -12,17 +12,17 @@ var histograms = {
   PLACES_KEYWORDS_COUNT: val => do_check_eq(val, 1),
   PLACES_SORTED_BOOKMARKS_PERC: val => do_check_eq(val, 100),
   PLACES_TAGGED_BOOKMARKS_PERC: val => do_check_eq(val, 100),
   PLACES_DATABASE_FILESIZE_MB: val => do_check_true(val > 0),
   PLACES_DATABASE_PAGESIZE_B: val => do_check_eq(val, 32768),
   PLACES_DATABASE_SIZE_PER_PAGE_B: val => do_check_true(val > 0),
   PLACES_EXPIRATION_STEPS_TO_CLEAN2: val => do_check_true(val > 1),
   // PLACES_AUTOCOMPLETE_1ST_RESULT_TIME_MS:  val => do_check_true(val > 1),
-  PLACES_IDLE_FRECENCY_DECAY_TIME_MS: val => do_check_true(val > 0),
+  PLACES_IDLE_FRECENCY_DECAY_TIME_MS: val => do_check_true(val >= 0),
   PLACES_IDLE_MAINTENANCE_TIME_MS: val => do_check_true(val > 0),
   // One from the `setItemAnnotation` call; the other from the mobile root.
   // This can be removed along with the anno in bug 1306445.
   PLACES_ANNOS_BOOKMARKS_COUNT: val => do_check_eq(val, 2),
   PLACES_ANNOS_PAGES_COUNT: val => do_check_eq(val, 1),
   PLACES_MAINTENANCE_DAYSFROMLAST: val => do_check_true(val >= 0),
 }