summaryrefslogtreecommitdiffstats
path: root/dom/heapsnapshot/tests/unit/test_census_diff_02.js
blob: 169e3f036866864df8ba6ac6fa17e635534b552a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

// Test diffing census reports of breakdown by "count".

const BREAKDOWN = { by: "count", count: true, bytes: true };

const REPORT1 = {
  "count": 10,
  "bytes": 100,
};

const REPORT2 = {
  "count": 11,
  "bytes": 110,
};

const EXPECTED = {
  "count": 1,
  "bytes": 10,
};

function run_test() {
  assertDiff(BREAKDOWN, REPORT1, REPORT2, EXPECTED);
}