Bug 1533260 - Fix browser_dbg_rr_logpoint-02.js test failures.
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 07 Mar 2019 06:35:30 -1000
changeset 520797 289dadcfedfb819f01a33612f6dfa225c0a5ffee
parent 520796 7619b93072788e53e25a6d9561052b6e50c54961
child 520798 a8c07059ab926e6c1d7ee415d8406a9ff3331878
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1533260
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1533260 - Fix browser_dbg_rr_logpoint-02.js test failures.
devtools/client/debugger/new/test/mochitest/helpers.js
devtools/client/webreplay/mochitest/browser_dbg_rr_logpoint-02.js
--- a/devtools/client/debugger/new/test/mochitest/helpers.js
+++ b/devtools/client/debugger/new/test/mochitest/helpers.js
@@ -750,36 +750,38 @@ function getFirstBreakpointColumn(dbg, {
  * @memberof mochitest/actions
  * @param {Object} dbg
  * @param {String} source
  * @param {Number} line
  * @param {Number} col
  * @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);
   return waitForDispatch(dbg, "DISABLE_BREAKPOINT");
 }
 
 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");
 }
 
 function findBreakpoint(dbg, url, line) {
   const {
     selectors: { getBreakpoint, getBreakpointsList },
     getState
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_logpoint-02.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_logpoint-02.js
@@ -13,16 +13,17 @@ add_task(async function() {
     "doc_rr_basic.html",
     { waitForRecording: true }
   );
 
   const {tab, toolbox} = dbg;
   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,
                       { logValue: `"Logpoint Beginning"` });
   await addBreakpoint(dbg, "doc_rr_basic.html", 8, undefined,
                       { logValue: `"Logpoint Ending"` });
   await waitForMessageCount(hud, "Logpoint", 12);