зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1201008 - only add a breakpoint in the debugger if a source is actually loaded. r=bgrins
--HG-- extra : rebase_source : 8af6cdc227f09dc528ce27e26b4f0054d7f6f0d2
This commit is contained in:
Родитель
64050c40ce
Коммит
717071e509
|
@ -311,7 +311,10 @@ var DebuggerView = {
|
||||||
if (button == 2) {
|
if (button == 2) {
|
||||||
this.clickedLine = line;
|
this.clickedLine = line;
|
||||||
}
|
}
|
||||||
else {
|
// Bug 1201008: Only add the breakpoint to the editor if we're currently
|
||||||
|
// looking at a source. Even if no source is loaded, you can
|
||||||
|
// interact with line 1 of the editor.
|
||||||
|
else if (DebuggerView.Sources.selectedValue) {
|
||||||
if (this.editor.hasBreakpoint(line)) {
|
if (this.editor.hasBreakpoint(line)) {
|
||||||
this.editor.removeBreakpoint(line);
|
this.editor.removeBreakpoint(line);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -289,6 +289,8 @@ skip-if = e10s # TODO
|
||||||
skip-if = e10s # TODO
|
skip-if = e10s # TODO
|
||||||
[browser_dbg_navigation.js]
|
[browser_dbg_navigation.js]
|
||||||
skip-if = e10s && debug
|
skip-if = e10s && debug
|
||||||
|
[browser_dbg_no-dangling-breakpoints.js]
|
||||||
|
skip-if = e10s && debug
|
||||||
[browser_dbg_no-page-sources.js]
|
[browser_dbg_no-page-sources.js]
|
||||||
skip-if = e10s && debug
|
skip-if = e10s && debug
|
||||||
[browser_dbg_on-pause-highlight.js]
|
[browser_dbg_on-pause-highlight.js]
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bug 1201008 - Make sure you can't set a breakpoint in a blank
|
||||||
|
* editor
|
||||||
|
*/
|
||||||
|
|
||||||
|
function test() {
|
||||||
|
initDebugger('data:text/html,hi').then(([aTab,, aPanel]) => {
|
||||||
|
const gPanel = aPanel;
|
||||||
|
const gDebugger = gPanel.panelWin;
|
||||||
|
|
||||||
|
Task.spawn(function*() {
|
||||||
|
const editor = gDebugger.DebuggerView.editor;
|
||||||
|
editor.emit("gutterClick", 0);
|
||||||
|
is(editor.getBreakpoints().length, 0,
|
||||||
|
"A breakpoint should not exist");
|
||||||
|
|
||||||
|
closeDebuggerAndFinish(gPanel);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
Загрузка…
Ссылка в новой задаче