Files
palemoon27/toolkit/devtools/debugger/test/browser_dbg_console-eval.js
roytam1 bfa8452350 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1084525 - Part 2: Refactor expectState from memory-bridge.js to common.js r=fitzgen (241c8d7cd)
- Bug 1084525 - Part 3: Add attach and detach methods to PromisesActor r=fitzgen (df0dea46d)
- Avoid infinite recursion when lazy-loading devtools modules and stepping into promise code in chrome debugging (bug 1149910). r=jlongster,fitzgen (a8e372285)
- Bug 1136341 - fix source actors representing inline scripts in XUL files so breakpoints work r=ejpbruel (904825023)
- Bug 1158498 - Can't set a JS breakpoint in inline JS;r=jlong (bbf9200ed)
- Bug 1166844 - treat eval'ed code from the console as unnamed eval sources r=ejpbruel (98d19de4e)
- Bug 1166852 - handle named eval sources from the console correctly r=ejpbruel (447b21b07)
- Bug 1163024 - Part 1: Stylesheet actors should use the common DevToolsUtils.fetch(). r=bgrins (2871b6295)
- Bug 1148893 - Miscellaneous fixes to multiple style editor tests. r=bgrins (073392349)
- Bug 1150005 - Don't wait for "editor-selected" event in browser_styleeditor_fetch-from-cache.js as it may have already been emitted. r=bgrins (c68786780)
- Bug 1163024 - Part 2: Ignore network requests from chrome code in a content toolbox. r=ochameau (6fd22227c)
- fix misspatch? (f1c0c1012)
- Bug 1161072 - Destroy inspector actor on disconnect. r=pbrosset (62bc54dfe)
- Bug 1168088 - Remove SpiderMonkey-specific syntax from toolkit/devtools. r=pbrosset (1f177ae4b)
- Bug 1134568 - Implement a preset gallery for CubicBezierWidget incl. 8 preset functions for categories: ease-in, ease-out, and ease-in-out. r=pbrosset (3ae37e757)
- Bug 1055181 - Mochitests for the CSS Filter tooltip; r=pbrosset (981c13b02)
- Bug 1149671 - Use alt/na/shift to step 0.1/1/10 at a time. r=pbrosset (fd70b5f1b)
- Bug 1126457 - Implement a worker utility to easily offload tasks into a worker. r=bgrins (2681ad8a1)
- fix misspatch (7afd26b57)
2021-04-17 08:04:03 +08:00

43 lines
1.3 KiB
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Breaking in the middle of a script evaluated by the console should
* work
*/
function test() {
Task.spawn(runTests);
}
function* runTests() {
let TAB_URL = EXAMPLE_URL + "doc_empty-tab-01.html";
let [,, panel] = yield initDebugger(TAB_URL);
let dbgWin = panel.panelWin;
let sources = dbgWin.DebuggerView.Sources;
let frames = dbgWin.DebuggerView.StackFrames;
let editor = dbgWin.DebuggerView.editor;
let toolbox = gDevTools.getToolbox(panel.target);
let paused = promise.all([
waitForEditorEvents(panel, "cursorActivity"),
waitForDebuggerEvents(panel, dbgWin.EVENTS.SOURCE_SHOWN)
]);
toolbox.once("webconsole-ready", () => {
ok(toolbox.splitConsole, "Split console is shown.");
let jsterm = toolbox.getPanel("webconsole").hud.jsterm;
jsterm.execute('debugger');
});
EventUtils.synthesizeKey("VK_ESCAPE", {}, dbgWin);
yield paused;
is(sources.selectedItem.attachment.label, 'SCRIPT0',
'Anonymous source is selected in sources');
dump('text ::' + editor.getText() + '::\n');
ok(editor.getText() === 'debugger', 'Editor has correct text');
yield toolbox.closeSplitConsole();
yield resumeDebuggerThenCloseAndFinish(panel);
}