2012-01-27 02:02:49 +04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
|
|
|
|
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
|
|
|
|
<window title="about:memory"
|
|
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
|
|
|
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
|
|
|
|
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
|
|
|
|
|
|
|
<!-- This file tests the collapsing and expanding of sub-trees in
|
|
|
|
about:memory. -->
|
|
|
|
|
|
|
|
<!-- test results are displayed in the html:body -->
|
|
|
|
<body xmlns="http://www.w3.org/1999/xhtml"></body>
|
|
|
|
|
|
|
|
<!-- test code goes here -->
|
|
|
|
<script type="application/javascript">
|
|
|
|
<![CDATA[
|
2012-03-02 03:08:38 +04:00
|
|
|
"use strict";
|
|
|
|
|
2012-01-27 02:02:49 +04:00
|
|
|
const Cc = Components.classes;
|
|
|
|
const Ci = Components.interfaces;
|
2012-02-17 10:09:13 +04:00
|
|
|
let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
|
2012-01-27 02:02:49 +04:00
|
|
|
getService(Ci.nsIMemoryReporterManager);
|
|
|
|
|
2013-11-07 09:35:30 +04:00
|
|
|
// Hide all the real reporters; we'll restore them at the end.
|
|
|
|
mgr.blockRegistrationAndHideExistingReporters();
|
2012-01-27 02:02:49 +04:00
|
|
|
|
|
|
|
// Setup various fake-but-deterministic reporters.
|
|
|
|
const KB = 1024;
|
|
|
|
const MB = KB * KB;
|
|
|
|
const HEAP = Ci.nsIMemoryReporter.KIND_HEAP;
|
|
|
|
const OTHER = Ci.nsIMemoryReporter.KIND_OTHER;
|
|
|
|
const BYTES = Ci.nsIMemoryReporter.UNITS_BYTES;
|
|
|
|
|
2013-08-28 03:24:51 +04:00
|
|
|
let hiPath = "explicit/h/i";
|
|
|
|
let hi2Path = "explicit/h/i2";
|
|
|
|
let jkPath = "explicit/j/k";
|
|
|
|
let jk2Path = "explicit/j/k2";
|
2012-03-20 07:32:28 +04:00
|
|
|
|
2012-02-17 10:09:13 +04:00
|
|
|
let fakeReporters = [
|
2014-05-21 10:06:54 +04:00
|
|
|
{ collectReports: function(aCbObj, aClosure, aAnonymize) {
|
2013-08-28 03:24:51 +04:00
|
|
|
function f(aP, aK, aA) {
|
|
|
|
aCbObj.callback("", aP, aK, BYTES, aA, "Desc.", aClosure);
|
|
|
|
}
|
|
|
|
f("heap-allocated", OTHER, 250 * MB);
|
|
|
|
f("explicit/a/b", HEAP, 50 * MB);
|
|
|
|
f("explicit/a/c/d", HEAP, 25 * MB);
|
|
|
|
f("explicit/a/c/e", HEAP, 15 * MB);
|
|
|
|
f("explicit/a/f", HEAP, 30 * MB);
|
|
|
|
f("explicit/g", HEAP, 100 * MB);
|
|
|
|
f(hiPath, HEAP, 10 * MB);
|
|
|
|
f(hi2Path, HEAP, 9 * MB);
|
|
|
|
f(jkPath, HEAP, 0.5 * MB);
|
|
|
|
f(jk2Path, HEAP, 0.3 * MB);
|
|
|
|
f("explicit/a/l/m", HEAP, 0.1 * MB);
|
|
|
|
f("explicit/a/l/n", HEAP, 0.1 * MB);
|
|
|
|
}
|
|
|
|
}
|
2012-01-27 02:02:49 +04:00
|
|
|
];
|
|
|
|
|
2012-02-17 10:09:13 +04:00
|
|
|
for (let i = 0; i < fakeReporters.length; i++) {
|
2013-11-07 09:35:30 +04:00
|
|
|
mgr.registerStrongReporterEvenIfBlocked(fakeReporters[i]);
|
2012-01-27 02:02:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<iframe id="amFrame" height="500" src="about:memory"></iframe>
|
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
<![CDATA[
|
|
|
|
function finish()
|
|
|
|
{
|
2013-11-07 09:35:30 +04:00
|
|
|
mgr.unblockRegistrationAndRestoreOriginalReporters();
|
2012-01-27 02:02:49 +04:00
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Click on the identified element, then cut+paste the entire page and
|
|
|
|
// check that the cut text matches what we expect.
|
2013-04-08 08:37:19 +04:00
|
|
|
function test(aId, aSwap, aExpected, aNext) {
|
2012-02-17 10:09:13 +04:00
|
|
|
let win = document.getElementById("amFrame").contentWindow;
|
2012-03-20 07:32:28 +04:00
|
|
|
if (aId) {
|
|
|
|
let node = win.document.getElementById(aId);
|
2012-01-27 02:02:49 +04:00
|
|
|
|
2012-03-20 07:32:28 +04:00
|
|
|
// Yuk: clicking a button is easy; but for tree entries we need to
|
|
|
|
// click on a child of the span identified via |id|.
|
|
|
|
if (node.nodeName === "button") {
|
2013-04-08 08:37:19 +04:00
|
|
|
if (aSwap) {
|
2013-08-28 03:24:51 +04:00
|
|
|
// We swap hipath/hi2Path and jkPath/jk2Path just before updating, to
|
|
|
|
// test what happens when significant nodes become insignificant and
|
|
|
|
// vice versa.
|
|
|
|
hiPath = "explicit/j/k";
|
|
|
|
hi2Path = "explicit/j/k2";
|
|
|
|
jkPath = "explicit/h/i";
|
|
|
|
jk2Path = "explicit/h/i2";
|
2013-04-08 08:37:19 +04:00
|
|
|
}
|
2012-03-20 07:32:28 +04:00
|
|
|
node.click();
|
|
|
|
} else {
|
|
|
|
node.childNodes[0].click();
|
|
|
|
}
|
2012-01-27 02:02:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.executeSoon(function() {
|
2012-02-17 10:10:39 +04:00
|
|
|
let mostRecentActual;
|
2012-01-27 02:02:49 +04:00
|
|
|
document.getElementById("amFrame").focus();
|
|
|
|
SimpleTest.waitForClipboard(
|
2012-02-17 10:10:39 +04:00
|
|
|
function(aActual) {
|
|
|
|
mostRecentActual = aActual;
|
|
|
|
return aActual === aExpected;
|
|
|
|
},
|
2012-01-27 02:02:49 +04:00
|
|
|
function() {
|
|
|
|
synthesizeKey("A", {accelKey: true});
|
|
|
|
synthesizeKey("C", {accelKey: true});
|
|
|
|
},
|
|
|
|
aNext,
|
|
|
|
function() {
|
|
|
|
ok(false, "pasted text doesn't match");
|
2012-02-17 10:10:39 +04:00
|
|
|
dump("******EXPECTED******\n");
|
|
|
|
dump(aExpected);
|
|
|
|
dump("*******ACTUAL*******\n");
|
|
|
|
dump(mostRecentActual);
|
|
|
|
dump("********************\n");
|
2012-01-27 02:02:49 +04:00
|
|
|
finish();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Returns a function that chains together one test() call per id.
|
2012-02-17 10:10:39 +04:00
|
|
|
function chain(aIds) {
|
|
|
|
let x = aIds.shift();
|
2012-01-27 02:02:49 +04:00
|
|
|
if (x) {
|
2013-04-08 08:37:19 +04:00
|
|
|
return function() { test(x.id, x.swap, x.expected, chain(aIds)); }
|
2012-01-27 02:02:49 +04:00
|
|
|
} else {
|
|
|
|
return function() { finish(); };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-20 07:32:28 +04:00
|
|
|
let startExpected =
|
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
|
|
|
├──120.20 MB (48.08%) -- a\n\
|
|
|
|
│ ├───50.00 MB (20.00%) ── b\n\
|
|
|
|
│ ├───40.00 MB (16.00%) -- c\n\
|
|
|
|
│ │ ├──25.00 MB (10.00%) ── d\n\
|
|
|
|
│ │ └──15.00 MB (06.00%) ── e\n\
|
|
|
|
│ ├───30.00 MB (12.00%) ── f\n\
|
|
|
|
│ └────0.20 MB (00.08%) ++ l\n\
|
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
|
|
|
├───19.00 MB (07.60%) -- h\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──10.00 MB (04.00%) ── i\n\
|
|
|
|
│ └───9.00 MB (03.60%) ── i2\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) ++ j\n\
|
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
";
|
|
|
|
|
|
|
|
let acCollapsedExpected =
|
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
|
|
|
├──120.20 MB (48.08%) -- a\n\
|
|
|
|
│ ├───50.00 MB (20.00%) ── b\n\
|
|
|
|
│ ├───40.00 MB (16.00%) ++ c\n\
|
|
|
|
│ ├───30.00 MB (12.00%) ── f\n\
|
|
|
|
│ └────0.20 MB (00.08%) ++ l\n\
|
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
|
|
|
├───19.00 MB (07.60%) -- h\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──10.00 MB (04.00%) ── i\n\
|
|
|
|
│ └───9.00 MB (03.60%) ── i2\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) ++ j\n\
|
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
";
|
|
|
|
|
|
|
|
let alExpandedExpected =
|
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
|
|
|
├──120.20 MB (48.08%) -- a\n\
|
|
|
|
│ ├───50.00 MB (20.00%) ── b\n\
|
|
|
|
│ ├───40.00 MB (16.00%) ++ c\n\
|
|
|
|
│ ├───30.00 MB (12.00%) ── f\n\
|
|
|
|
│ └────0.20 MB (00.08%) -- l\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──0.10 MB (00.04%) ── m\n\
|
|
|
|
│ └──0.10 MB (00.04%) ── n\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
|
|
|
├───19.00 MB (07.60%) -- h\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──10.00 MB (04.00%) ── i\n\
|
|
|
|
│ └───9.00 MB (03.60%) ── i2\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) ++ j\n\
|
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
";
|
|
|
|
|
|
|
|
let aCollapsedExpected =
|
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
|
|
|
├──120.20 MB (48.08%) ++ a\n\
|
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
|
|
|
├───19.00 MB (07.60%) -- h\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──10.00 MB (04.00%) ── i\n\
|
|
|
|
│ └───9.00 MB (03.60%) ── i2\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) ++ j\n\
|
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
";
|
|
|
|
|
|
|
|
let hCollapsedExpected =
|
2012-01-27 02:02:49 +04:00
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├──120.20 MB (48.08%) ++ a\n\
|
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
|
|
|
├───19.00 MB (07.60%) ++ h\n\
|
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) ++ j\n\
|
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
";
|
|
|
|
|
|
|
|
let jExpandedExpected =
|
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
|
|
|
├──120.20 MB (48.08%) ++ a\n\
|
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
|
|
|
├───19.00 MB (07.60%) ++ h\n\
|
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) -- j\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
├──0.50 MB (00.20%) ── k\n\
|
|
|
|
└──0.30 MB (00.12%) ── k2\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
";
|
|
|
|
|
|
|
|
// The important thing here is that two values have been swapped.
|
|
|
|
// explicit/h/i should remain collapsed, and explicit/j/k should remain
|
|
|
|
// expanded. See bug 724863.
|
|
|
|
let updatedExpected =
|
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
|
|
|
├──120.20 MB (48.08%) ++ a\n\
|
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
|
|
|
├───19.00 MB (07.60%) -- j\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──10.00 MB (04.00%) ── k\n\
|
|
|
|
│ └───9.00 MB (03.60%) ── k2\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) ++ h\n\
|
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
";
|
|
|
|
|
|
|
|
let aExpandedExpected =
|
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
|
|
|
├──120.20 MB (48.08%) -- a\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
│ ├───50.00 MB (20.00%) ── b\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
│ ├───40.00 MB (16.00%) ++ c\n\
|
|
|
|
│ ├───30.00 MB (12.00%) ── f\n\
|
|
|
|
│ └────0.20 MB (00.08%) -- l\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──0.10 MB (00.04%) ── m\n\
|
|
|
|
│ └──0.10 MB (00.04%) ── n\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───19.00 MB (07.60%) -- j\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──10.00 MB (04.00%) ── k\n\
|
|
|
|
│ └───9.00 MB (03.60%) ── k2\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) ++ h\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
";
|
|
|
|
|
2012-03-20 07:32:28 +04:00
|
|
|
let acExpandedExpected =
|
2012-01-27 02:02:49 +04:00
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├──120.20 MB (48.08%) -- a\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
│ ├───50.00 MB (20.00%) ── b\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
│ ├───40.00 MB (16.00%) -- c\n\
|
|
|
|
│ │ ├──25.00 MB (10.00%) ── d\n\
|
|
|
|
│ │ └──15.00 MB (06.00%) ── e\n\
|
|
|
|
│ ├───30.00 MB (12.00%) ── f\n\
|
|
|
|
│ └────0.20 MB (00.08%) -- l\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──0.10 MB (00.04%) ── m\n\
|
|
|
|
│ └──0.10 MB (00.04%) ── n\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───19.00 MB (07.60%) -- j\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──10.00 MB (04.00%) ── k\n\
|
|
|
|
│ └───9.00 MB (03.60%) ── k2\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) ++ h\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
";
|
|
|
|
|
2012-03-20 07:32:28 +04:00
|
|
|
let alCollapsedExpected =
|
2012-01-27 02:02:49 +04:00
|
|
|
"\
|
|
|
|
Main Process\n\
|
|
|
|
Explicit Allocations\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
250.00 MB (100.0%) -- explicit\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├──120.20 MB (48.08%) -- a\n\
|
|
|
|
│ ├───50.00 MB (20.00%) ── b\n\
|
|
|
|
│ ├───40.00 MB (16.00%) -- c\n\
|
|
|
|
│ │ ├──25.00 MB (10.00%) ── d\n\
|
|
|
|
│ │ └──15.00 MB (06.00%) ── e\n\
|
|
|
|
│ ├───30.00 MB (12.00%) ── f\n\
|
|
|
|
│ └────0.20 MB (00.08%) ++ l\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
├──100.00 MB (40.00%) ── g\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───19.00 MB (07.60%) -- j\n\
|
2012-05-17 07:43:36 +04:00
|
|
|
│ ├──10.00 MB (04.00%) ── k\n\
|
|
|
|
│ └───9.00 MB (03.60%) ── k2\n\
|
2012-03-20 07:32:28 +04:00
|
|
|
├───10.00 MB (04.00%) ── heap-unclassified\n\
|
|
|
|
└────0.80 MB (00.32%) ++ h\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
\n\
|
|
|
|
Other Measurements\n\
|
2013-04-03 22:39:06 +04:00
|
|
|
\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
250.00 MB ── heap-allocated\n\
|
|
|
|
\n\
|
2013-10-23 09:27:58 +04:00
|
|
|
End of Main Process\n\
|
2012-01-27 02:02:49 +04:00
|
|
|
";
|
|
|
|
|
2012-03-20 07:32:28 +04:00
|
|
|
// Test the following cases:
|
|
|
|
// - explicit/a/c is significant, we collapse it, it's unchanged upon
|
|
|
|
// update, we re-expand it
|
|
|
|
// - explicit/a/l is insignificant, we expand it, it's unchanged upon
|
|
|
|
// update, we re-collapse it
|
|
|
|
// - explicit/a is significant, we collapse it (which hides its
|
|
|
|
// sub-trees), it's unchanged upon update, we re-expand it
|
|
|
|
// - explicit/h is significant, we collapse it, it becomes insignificant
|
|
|
|
// upon update (and should remain collapsed)
|
|
|
|
// - explicit/j is insignificant, we expand it, it becomes significant
|
|
|
|
// upon update (and should remain expanded)
|
|
|
|
//
|
2012-02-17 10:09:13 +04:00
|
|
|
let idsToClick = [
|
2013-04-08 08:37:19 +04:00
|
|
|
{ id: "measureButton", swap: 0, expected: startExpected },
|
|
|
|
{ id: "Main Process:explicit/a/c", swap: 0, expected: acCollapsedExpected },
|
|
|
|
{ id: "Main Process:explicit/a/l", swap: 0, expected: alExpandedExpected },
|
|
|
|
{ id: "Main Process:explicit/a", swap: 0, expected: aCollapsedExpected },
|
|
|
|
{ id: "Main Process:explicit/h", swap: 0, expected: hCollapsedExpected },
|
|
|
|
{ id: "Main Process:explicit/j", swap: 0, expected: jExpandedExpected },
|
|
|
|
{ id: "measureButton", swap: 1, expected: updatedExpected },
|
|
|
|
{ id: "Main Process:explicit/a", swap: 0, expected: aExpandedExpected },
|
|
|
|
{ id: "Main Process:explicit/a/c", swap: 0, expected: acExpandedExpected },
|
|
|
|
{ id: "Main Process:explicit/a/l", swap: 0, expected: alCollapsedExpected }
|
2012-01-27 02:02:49 +04:00
|
|
|
];
|
|
|
|
|
2012-02-17 10:10:39 +04:00
|
|
|
SimpleTest.waitForFocus(chain(idsToClick));
|
2012-01-27 02:02:49 +04:00
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</window>
|