|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=601470 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 601470</title> |
|
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
10 </head> |
|
11 <body> |
|
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=601470">Mozilla Bug 601470</a> |
|
13 <p id="display"></p> |
|
14 <div id="content" style="display: none"> |
|
15 <img src="lime100x100.svg" style="width: 100px; height: 100px;"> |
|
16 <img src="damon.jpg" style="width: 100px; height: 100px;"> |
|
17 </div> |
|
18 <pre id="test"> |
|
19 <script type="application/javascript"> |
|
20 /** Test for Bug 601470 **/ |
|
21 |
|
22 SimpleTest.waitForExplicitFinish(); |
|
23 |
|
24 window.onload = function() { |
|
25 var mgr = SpecialPowers.Cc["@mozilla.org/memory-reporter-manager;1"] |
|
26 .getService(SpecialPowers.Ci.nsIMemoryReporterManager); |
|
27 |
|
28 var amount = 0; |
|
29 var handleReport = function(aProcess, aPath, aKind, aUnits, aAmount, aDesc) { |
|
30 amount += aAmount; |
|
31 } |
|
32 |
|
33 mgr.getReportsForThisProcess(handleReport, null); |
|
34 |
|
35 ok(amount > 0, "we should be using a nonzero amount of memory"); |
|
36 ok(true, "yay, didn't crash!"); |
|
37 |
|
38 SimpleTest.finish(); |
|
39 } |
|
40 |
|
41 </script> |
|
42 </pre> |
|
43 </body> |
|
44 </html> |