summaryrefslogtreecommitdiffstats
path: root/devtools/shared/heapsnapshot/tests/unit/test_census-tree-node-06.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-22 17:32:39 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:50:57 +0200
commit36fc5f674ef1a02d1498484c563a7108f4de44ed (patch)
tree120483cd8fc0decd189d5118941a9b23d6156ad5 /devtools/shared/heapsnapshot/tests/unit/test_census-tree-node-06.js
parent7b30664f59e65cadb7d5eb2e42591e90a32871f8 (diff)
downloadUXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.tar
UXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.tar.gz
UXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.tar.lz
UXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.tar.xz
UXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.zip
Reclassify heapsnapshot and nsJSInspector as not part of devtools
This resolves Issue #316
Diffstat (limited to 'devtools/shared/heapsnapshot/tests/unit/test_census-tree-node-06.js')
-rw-r--r--devtools/shared/heapsnapshot/tests/unit/test_census-tree-node-06.js200
1 files changed, 0 insertions, 200 deletions
diff --git a/devtools/shared/heapsnapshot/tests/unit/test_census-tree-node-06.js b/devtools/shared/heapsnapshot/tests/unit/test_census-tree-node-06.js
deleted file mode 100644
index eb1801207..000000000
--- a/devtools/shared/heapsnapshot/tests/unit/test_census-tree-node-06.js
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test inverting CensusTreeNode with a by alloaction stack breakdown.
- */
-
-function run_test() {
- const BREAKDOWN = {
- by: "allocationStack",
- then: { by: "count", count: true, bytes: true },
- noStack: { by: "count", count: true, bytes: true },
- };
-
- let stack1, stack2, stack3, stack4;
-
- function a(n) {
- return b(n);
- }
- function b(n) {
- return c(n);
- }
- function c(n) {
- return saveStack(n);
- }
- function d(n) {
- return b(n);
- }
- function e(n) {
- return c(n);
- }
-
- const abc_Stack = a(3);
- const bc_Stack = b(2);
- const c_Stack = c(1);
- const dbc_Stack = d(3);
- const ec_Stack = e(2);
-
- const REPORT = new Map([
- [abc_Stack, { bytes: 10, count: 1 }],
- [ bc_Stack, { bytes: 10, count: 1 }],
- [ c_Stack, { bytes: 10, count: 1 }],
- [dbc_Stack, { bytes: 10, count: 1 }],
- [ ec_Stack, { bytes: 10, count: 1 }],
- ["noStack", { bytes: 50, count: 5 }],
- ]);
-
- const EXPECTED = {
- name: null,
- bytes: 0,
- totalBytes: 100,
- count: 0,
- totalCount: 10,
- children: [
- {
- name: "noStack",
- bytes: 50,
- totalBytes: 50,
- count: 5,
- totalCount: 5,
- children: [
- {
- name: null,
- bytes: 0,
- totalBytes: 100,
- count: 0,
- totalCount: 10,
- children: undefined,
- id: 16,
- parent: 15,
- reportLeafIndex: undefined,
- }
- ],
- id: 15,
- parent: 14,
- reportLeafIndex: 6,
- },
- {
- name: abc_Stack,
- bytes: 50,
- totalBytes: 10,
- count: 5,
- totalCount: 1,
- children: [
- {
- name: null,
- bytes: 0,
- totalBytes: 100,
- count: 0,
- totalCount: 10,
- children: undefined,
- id: 18,
- parent: 17,
- reportLeafIndex: undefined,
- },
- {
- name: abc_Stack.parent,
- bytes: 0,
- totalBytes: 10,
- count: 0,
- totalCount: 1,
- children: [
- {
- name: null,
- bytes: 0,
- totalBytes: 100,
- count: 0,
- totalCount: 10,
- children: undefined,
- id: 22,
- parent: 19,
- reportLeafIndex: undefined,
- },
- {
- name: abc_Stack.parent.parent,
- bytes: 0,
- totalBytes: 10,
- count: 0,
- totalCount: 1,
- children: [
- {
- name: null,
- bytes: 0,
- totalBytes: 100,
- count: 0,
- totalCount: 10,
- children: undefined,
- id: 21,
- parent: 20,
- reportLeafIndex: undefined,
- }
- ],
- id: 20,
- parent: 19,
- reportLeafIndex: undefined,
- },
- {
- name: dbc_Stack.parent.parent,
- bytes: 0,
- totalBytes: 10,
- count: 0,
- totalCount: 1,
- children: [
- {
- name: null,
- bytes: 0,
- totalBytes: 100,
- count: 0,
- totalCount: 10,
- children: undefined,
- id: 24,
- parent: 23,
- reportLeafIndex: undefined,
- }
- ],
- id: 23,
- parent: 19,
- reportLeafIndex: undefined,
- }
- ],
- id: 19,
- parent: 17,
- reportLeafIndex: undefined,
- },
- {
- name: ec_Stack.parent,
- bytes: 0,
- totalBytes: 10,
- count: 0,
- totalCount: 1,
- children: [
- {
- name: null,
- bytes: 0,
- totalBytes: 100,
- count: 0,
- totalCount: 10,
- children: undefined,
- id: 26,
- parent: 25,
- reportLeafIndex: undefined,
- },
- ],
- id: 25,
- parent: 17,
- reportLeafIndex: undefined,
- },
- ],
- id: 17,
- parent: 14,
- reportLeafIndex: new Set([1, 2, 3, 4, 5]),
- }
- ],
- id: 14,
- parent: undefined,
- reportLeafIndex: undefined,
- };
-
- compareCensusViewData(BREAKDOWN, REPORT, EXPECTED, { invert: true });
-}