Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: asan
- Manifest: devtools/client/webconsole/test/browser/_webconsole.toml
/* Any copyright is dedicated to the Public Domain.
// When the debugger is paused in a worker thread, console evaluations should
// be performed in that worker's selected frame.
"use strict";
const TEST_URI =
"test/browser/test-evaluate-worker.html";
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);
await openDebugger();
const toolbox = hud.toolbox;
await waitFor(
() => toolbox.commands.targetCommand.store.getState().targets.length == 2
);
const dbg = createDebuggerContext(toolbox);
execute(hud, "pauseInWorker(42)");
await waitForPaused(dbg);
await openConsole();
await executeAndWaitForResultMessage(hud, "data", "42");
ok(true, "Evaluated console message in worker thread");
});