Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: js/xpconnect/tests/browser/browser.toml
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
*/
add_task(async function test() {
const url =
let newTab = await BrowserTestUtils.openNewForegroundTab(gBrowser, url);
let browser = gBrowser.selectedBrowser;
let innerWindowId = browser.innerWindowID;
let contentDocDead = await ContentTask.spawn(
browser,
{ innerWindowId },
async function (args) {
let doc = content.document;
let { TestUtils } = ChromeUtils.importESModule(
);
let promise = TestUtils.topicObserved("inner-window-nuked", subject => {
let id = subject.QueryInterface(Ci.nsISupportsPRUint64).data;
return id == args.innerWindowId;
});
await promise;
return Cu.isDeadWrapper(doc);
}
);
is(contentDocDead, true, "wrapper is dead");
BrowserTestUtils.removeTab(newTab);
});