Commit 51ac91a3 authored by Hubert Boma Manilla's avatar Hubert Boma Manilla Committed by hmanilla@mozilla.com
Browse files

Bug 1953415 - [devtools] Remove CM5 support code from debugger mochitests...

Bug 1953415 - [devtools] Remove CM5 support code from debugger mochitests r=devtools-reviewers,ochameau

Differential Revision: https://phabricator.services.mozilla.com/D250365
parent 60964144
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -107,7 +107,6 @@ add_task(async function test_backgroundtask_debugger() {
    createLocation,
    createLocation,
    getEditorContent,
    getEditorContent,
    getCMEditor,
    getCMEditor,
    isCm6Enabled,
    log: (msg, data) =>
    log: (msg, data) =>
      console.log(`${msg} ${!data ? "" : JSON.stringify(data)}`),
      console.log(`${msg} ${!data ? "" : JSON.stringify(data)}`),
    info: (msg, data) =>
    info: (msg, data) =>
+8 −12
Original line number Original line Diff line number Diff line
@@ -84,7 +84,7 @@ add_task(async function () {


  info("Double click the conditional breakpoint in secondary pane");
  info("Double click the conditional breakpoint in secondary pane");
  dblClickElement(dbg, "conditionalBreakpointInSecPane");
  dblClickElement(dbg, "conditionalBreakpointInSecPane");
  assertConditonalBreakpointPanelFocus(dbg, { isCm6Enabled });
  assertConditonalBreakpointPanelFocus(dbg, {});


  info("Click the conditional breakpoint in secondary pane");
  info("Click the conditional breakpoint in secondary pane");
  await clickElement(dbg, "conditionalBreakpointInSecPane");
  await clickElement(dbg, "conditionalBreakpointInSecPane");
@@ -113,7 +113,7 @@ add_task(async function () {


  info("Double click the logpoint in secondary pane");
  info("Double click the logpoint in secondary pane");
  dblClickElement(dbg, "logPointInSecPane");
  dblClickElement(dbg, "logPointInSecPane");
  assertConditonalBreakpointPanelFocus(dbg, { isLogPoint: true, isCm6Enabled });
  assertConditonalBreakpointPanelFocus(dbg, { isLogPoint: true });


  info("Click the logpoint in secondary pane");
  info("Click the logpoint in secondary pane");
  await clickElement(dbg, "logPointInSecPane");
  await clickElement(dbg, "logPointInSecPane");
@@ -147,17 +147,13 @@ async function setConditionalBreakpoint(dbg, index, condition) {
  typeInPanel(dbg, condition);
  typeInPanel(dbg, condition);
}
}


function assertConditonalBreakpointPanelFocus(
function assertConditonalBreakpointPanelFocus(dbg, { isLogPoint = false }) {
  dbg,
  { isLogPoint = false, isCm6Enabled }
) {
  const focusedElement = dbg.win.document.activeElement;
  const focusedElement = dbg.win.document.activeElement;
  const isPanelFocused = isCm6Enabled
  const isPanelFocused =
    ? focusedElement.classList.contains("cm-content") &&
    focusedElement.classList.contains("cm-content") &&
    focusedElement.closest(
    focusedElement.closest(
      `.conditional-breakpoint-panel${isLogPoint ? ".log-point" : ""}`
      `.conditional-breakpoint-panel${isLogPoint ? ".log-point" : ""}`
      )
    );
    : focusedElement.tagName == "TEXTAREA";
  ok(
  ok(
    isPanelFocused,
    isPanelFocused,
    `The content element of ${
    `The content element of ${
+0 −1
Original line number Original line Diff line number Diff line
@@ -35,7 +35,6 @@ add_task(async function () {
    getSelector,
    getSelector,
    findElementWithSelector,
    findElementWithSelector,
    createLocation,
    createLocation,
    isCm6Enabled,
    getEditorContent,
    getEditorContent,
    getCMEditor,
    getCMEditor,
  });
  });
+0 −1
Original line number Original line Diff line number Diff line
@@ -45,7 +45,6 @@ add_task(async function () {
    selectSource,
    selectSource,
    assertTextContentOnLine,
    assertTextContentOnLine,
    getEditorContent,
    getEditorContent,
    isCm6Enabled,
    getCMEditor,
    getCMEditor,
  });
  });


+0 −5
Original line number Original line Diff line number Diff line
@@ -8,11 +8,6 @@
"use strict";
"use strict";


add_task(async function testHorizontalScrolling() {
add_task(async function testHorizontalScrolling() {
  if (!isCm6Enabled) {
    ok(true, "This test is disabled on CM5");
    return;
  }

  // Ensure having the default fixed height, as it can impact the number of displayed lines
  // Ensure having the default fixed height, as it can impact the number of displayed lines
  await pushPref("devtools.toolbox.footer.height", 250);
  await pushPref("devtools.toolbox.footer.height", 250);


Loading