let frame;
window.unloadChild = function() {
document.body.removeChild(frame);
};
promise_test(async t => {
frame = document.createElement('iframe');
frame.srcdoc = ``;
document.body.appendChild(frame);
}, 'Unload child iframe with pending getDevices promise');
promise_test(async t => {
frame = document.createElement('iframe');
frame.srcdoc = ``;
document.body.appendChild(frame);
}, 'Unload child iframe with pending requestDevice promise');