blob: 1fc25341b8f9357325ed60ab8abd9f2ba407c96a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Bug 1201597 - Test to verify that we can take a heap snapshot in an e10s child process.
*/
"use strict";
add_task(async function () {
// Create a minimal browser
const browser = document.createXULElement("browser");
browser.setAttribute("type", "content");
document.body.appendChild(browser);
await BrowserTestUtils.browserLoaded(browser);
info("Save heap snapshot");
const result = await SpecialPowers.spawn(browser, [], () => {
try {
ChromeUtils.saveHeapSnapshot({ runtime: true });
} catch (err) {
return err.toString();
}
return "";
});
is(result, "", "result of saveHeapSnapshot");
browser.remove();
});
|