4 Bug 923275 - Add a memory monitor widget to the developer toolbar
8 <title>Memory monitoring actor test
</title>
9 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css">
14 <script src=
"memory-helpers.js" type=
"application/javascript"></script>
18 window
.onload = function() {
19 SimpleTest
.waitForExplicitFinish();
22 const { memory
, target
} = await
startServerAndGetSelectedTabMemory();
23 const measurement
= await memory
.measure();
24 ok(measurement
.total
> 0, "total memory is valid");
25 ok(measurement
.domSize
> 0, "domSize is valid");
26 ok(measurement
.styleSize
> 0, "styleSize is valid");
27 ok(measurement
.jsObjectsSize
> 0, "jsObjectsSize is valid");
28 ok(measurement
.jsStringsSize
> 0, "jsStringsSize is valid");
29 ok(measurement
.jsOtherSize
> 0, "jsOtherSize is valid");
30 ok(measurement
.otherSize
> 0, "otherSize is valid");
31 ok(measurement
.jsMilliseconds
, "jsMilliseconds is valid");
32 ok(measurement
.nonJSMilliseconds
, "nonJSMilliseconds is valid");
33 await
destroyServerAndFinish(target
);