mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-15 11:47:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Tests that `debugger` statements are hit before the debugger even
|
||||
// initializes and it properly highlights the right location in the
|
||||
// debugger.
|
||||
|
||||
add_task(function* () {
|
||||
const url = EXAMPLE_URL + "doc-script-switching.html";
|
||||
const toolbox = yield openNewTabAndToolbox(url, "webconsole");
|
||||
|
||||
// Type "debugger" into console
|
||||
let jsterm = toolbox.getPanel("webconsole").hud.jsterm;
|
||||
jsterm.execute("debugger");
|
||||
|
||||
// Wait for the debugger to be selected and make sure it's paused
|
||||
yield new Promise((resolve) => {
|
||||
toolbox.on("jsdebugger-selected", resolve);
|
||||
});
|
||||
is(toolbox.threadClient.state, "paused");
|
||||
|
||||
// Create a dbg context
|
||||
const dbg = createDebuggerContext(toolbox);
|
||||
const { selectors: { getSelectedSource }, getState } = dbg;
|
||||
|
||||
// Make sure the thread is paused in the right source and location
|
||||
yield waitForDispatch(dbg, "LOAD_SOURCE_TEXT");
|
||||
is(dbg.win.cm.getValue(), "debugger");
|
||||
const source = getSelectedSource(getState()).toJS();
|
||||
assertPausedLocation(dbg, source, 1);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue