зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1533260 - Fix browser_dbg_rr_logpoint-02.js test failures.
This commit is contained in:
Родитель
5bd8cf8e91
Коммит
ab6b030e03
|
@ -755,17 +755,18 @@ function getFirstBreakpointColumn(dbg, {line, sourceId}) {
|
|||
* @return {Promise}
|
||||
* @static
|
||||
*/
|
||||
async function addBreakpoint(dbg, source, line, column) {
|
||||
async function addBreakpoint(dbg, source, line, column, options) {
|
||||
source = findSource(dbg, source);
|
||||
const sourceId = source.id;
|
||||
column = column || getFirstBreakpointColumn(dbg, {line, sourceId: source.id});
|
||||
const bpCount = dbg.selectors.getBreakpointCount(dbg.getState());
|
||||
dbg.actions.addBreakpoint({ sourceId, line, column });
|
||||
dbg.actions.addBreakpoint({ sourceId, line, column }, options);
|
||||
await waitForDispatch(dbg, "ADD_BREAKPOINT");
|
||||
is(dbg.selectors.getBreakpointCount(dbg.getState()), bpCount + 1, "a new breakpoint was created");
|
||||
}
|
||||
|
||||
function disableBreakpoint(dbg, source, line, column) {
|
||||
column = column || getFirstBreakpointColumn(dbg, {line, sourceId: source.id});
|
||||
const location = { sourceId: source.id, sourceUrl: source.url, line, column };
|
||||
const bp = dbg.selectors.getBreakpointForLocation(dbg.getState(), location);
|
||||
dbg.actions.disableBreakpoint(bp);
|
||||
|
@ -775,6 +776,7 @@ function disableBreakpoint(dbg, source, line, column) {
|
|||
function setBreakpointOptions(dbg, source, line, column, options) {
|
||||
source = findSource(dbg, source);
|
||||
const sourceId = source.id;
|
||||
column = column || getFirstBreakpointColumn(dbg, {line, sourceId});
|
||||
dbg.actions.setBreakpointOptions({ sourceId, line, column }, options);
|
||||
return waitForDispatch(dbg, "SET_BREAKPOINT_OPTIONS");
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ add_task(async function() {
|
|||
const console = await getDebuggerSplitConsole(dbg);
|
||||
const hud = console.hud;
|
||||
|
||||
await selectSource(dbg, "doc_rr_basic.html");
|
||||
await addBreakpoint(dbg, "doc_rr_basic.html", 21, undefined,
|
||||
{ logValue: `"Logpoint Number " + number` });
|
||||
await addBreakpoint(dbg, "doc_rr_basic.html", 6, undefined,
|
||||
|
|
Загрузка…
Ссылка в новой задаче