Commit 0c654954 authored by Alexandre Poirot's avatar Alexandre Poirot
Browse files

Bug 1829744 - [devtools] Fix jumping to generated location from editor's...

Bug 1829744 - [devtools] Fix jumping to generated location from editor's footer. r=devtools-reviewers,nchevobbe r=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D176346
parent 8e3843c7
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
import React, { PureComponent } from "react";
import PropTypes from "prop-types";
import { connect } from "../../utils/connect";
import { createLocation } from "../../utils/location";
import classnames from "classnames";
import actions from "../../actions";
import {
@@ -200,11 +201,11 @@ class SourceFooter extends PureComponent {
      filename
    );
    const title = L10N.getFormatStr("sourceFooter.mappedSource", filename);
    const mappedSourceLocation = {
      sourceId: selectedSource.id,
    const mappedSourceLocation = createLocation({
      source: selectedSource,
      line: 1,
      column: 1,
    };
    });
    return (
      <button
        className="mapped-source"
+8 −1
Original line number Diff line number Diff line
@@ -43,7 +43,8 @@ add_task(async function() {
    { noExpand: true }
  );

  await selectSource(dbg, "bundle.js");
  const bundleSrc = findSource(dbg, "bundle.js");
  await selectSource(dbg, bundleSrc);

  await clickGutter(dbg, 70);
  await waitForBreakpointCount(dbg, 1);
@@ -100,6 +101,12 @@ add_task(async function() {
    JSON.stringify({ url: entrySrc.url, line: 16, column: 0 }),
    "Pending selected location is the expected one"
  );

  info("Click on jump to generated source link from editor's footer");
  findElement(dbg, "sourceMapLink").click();

  await waitForSelectedSource(dbg, bundleSrc);
  assertPausedAtSourceAndLine(dbg, bundleSrc.id, 62);
});

function assertBreakpointExists(dbg, source, line) {