diff --git a/devtools/client/debugger/test/mochitest/browser_dbg-dom-mutation-breakpoints.js b/devtools/client/debugger/test/mochitest/browser_dbg-dom-mutation-breakpoints.js index 2fc90d9d3822..8ab7a1d08003 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg-dom-mutation-breakpoints.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg-dom-mutation-breakpoints.js @@ -73,7 +73,28 @@ add_task(async function() { await waitForPaused(dbg); await resume(dbg); + info("Blackboxing the source prevents debugger pause"); + await waitForSource(dbg, "dom-mutation.original.js"); + + const source = findSource(dbg, "dom-mutation.original.js"); + + await selectSource(dbg, source); + await clickElement(dbg, "blackbox"); + await waitForDispatch(dbg, "BLACKBOX"); + + SpecialPowers.spawn(gBrowser.selectedBrowser, [], function() { + content.document.querySelector("#blackbox").click(); + }); + + await waitForPaused(dbg, "click.js"); + await resume(dbg); + + await selectSource(dbg, source); + await clickElement(dbg, "blackbox"); + await waitForDispatch(dbg, "BLACKBOX"); + info("Removing breakpoints works"); dbg.win.document.querySelector(".dom-mutation-list .close-btn").click(); await waitForAllElements(dbg, "domMutationItem", 1, true); + }); diff --git a/devtools/client/debugger/test/mochitest/examples/doc-dom-mutation.html b/devtools/client/debugger/test/mochitest/examples/doc-dom-mutation.html index c7833d618df6..5ad60f4c6439 100644 --- a/devtools/client/debugger/test/mochitest/examples/doc-dom-mutation.html +++ b/devtools/client/debugger/test/mochitest/examples/doc-dom-mutation.html @@ -11,14 +11,7 @@
- + +