test_bug601470.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. SimpleTest.waitForExplicitFinish();
  22. window.onload = function() {
  23. var mgr = SpecialPowers.Cc["@mozilla.org/memory-reporter-manager;1"]
  24. .getService(SpecialPowers.Ci.nsIMemoryReporterManager);
  25. var amount = 0;
  26. var handleReport = function(aProcess, aPath, aKind, aUnits, aAmount, aDesc) {
  27. amount += aAmount;
  28. }
  29. var finished = function() {
  30. ok(amount > 0, "we should be using a nonzero amount of memory");
  31. ok(true, "yay, didn't crash!");
  32. SimpleTest.finish();
  33. }
  34. mgr.getReports(handleReport, null, finished, null, /* anonymize = */ false);
  35. }
  36. </script>
  37. </pre>
  38. </body>
  39. </html>