test_SaveHeapSnapshot.html (754B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 Bug 1024774 - Sanity test that we can take a heap snapshot in a web window. 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>ChromeUtils.saveHeapSnapshot 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"> 11 </head> 12 <body> 13 <pre id="test"> 14 <script> 15 "use strict"; 16 17 SimpleTest.waitForExplicitFinish(); 18 window.onload = function() { 19 ok(ChromeUtils, "The ChromeUtils interface should be exposed in chrome windows."); 20 ChromeUtils.saveHeapSnapshot({ runtime: true }); 21 ok(true, "Should save a heap snapshot and shouldn't throw."); 22 SimpleTest.finish(); 23 }; 24 </script> 25 </pre> 26 </body> 27 </html>