diff options
Diffstat (limited to 'devtools/shared/heapsnapshot/tests/xpcshell/test_census_diff_02.js')
-rw-r--r-- | devtools/shared/heapsnapshot/tests/xpcshell/test_census_diff_02.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/devtools/shared/heapsnapshot/tests/xpcshell/test_census_diff_02.js b/devtools/shared/heapsnapshot/tests/xpcshell/test_census_diff_02.js new file mode 100644 index 0000000000..cefe76abde --- /dev/null +++ b/devtools/shared/heapsnapshot/tests/xpcshell/test_census_diff_02.js @@ -0,0 +1,26 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + +// 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); +} |