Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE HTML>
<html>
<!--
-->
<head>
</head>
<body>
<script type="application/javascript">
const {addDebuggerToGlobal} = ChromeUtils.importESModule("moz-src:///devtools/platform/jsdebugger.sys.mjs");
addDebuggerToGlobal(globalThis);
SimpleTest.waitForExplicitFinish();
window.onload = function() {
const iframe = document.createElement("iframe");
iframe.onload = function() {
const dbg = new Debugger(iframe.contentWindow);
dbg.onDebuggerStatement = () => {
Promise.resolve().then(() => {});
};
iframe.contentWindow.wrappedJSObject.go();
setTimeout(() => {
dbg.removeAllDebuggees();
ok(iframe.contentWindow.wrappedJSObject.secondJobRan,
"Suppressed microtask should eventually run");
SimpleTest.finish();
}, 0);
};
document.body.appendChild(iframe);
};
</script>
</body>
</html>