Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/shared. r=jdescottes,nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D158379
This commit is contained in:
Alexandre Poirot 2022-09-30 15:17:39 +00:00
Родитель e3e094dade
Коммит fa37432f92
329 изменённых файлов: 932 добавлений и 761 удалений

Просмотреть файл

@ -4,7 +4,7 @@
"use strict";
const asyncStorage = require("devtools/shared/async-storage");
const asyncStorage = require("resource://devtools/shared/async-storage.js");
/*
* asyncStoreHelper wraps asyncStorage so that it is easy to define project

Просмотреть файл

@ -4,7 +4,7 @@
"use strict";
const EventEmitter = require("devtools/shared/event-emitter");
const EventEmitter = require("resource://devtools/shared/event-emitter.js");
loader.lazyRequireGetter(
this,

Просмотреть файл

@ -7,15 +7,15 @@
const {
Component,
createElement,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const {
ul,
li,
h2,
div,
span,
} = require("devtools/client/shared/vendor/react-dom-factories");
} = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
class Accordion extends Component {
static get propTypes() {

Просмотреть файл

@ -5,14 +5,16 @@
"use strict";
// React deps
const { Component } = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const {
Component,
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const { div, h1, h2, h3, p, a } = dom;
// Localized strings for (devtools/client/locales/en-US/components.properties)
loader.lazyGetter(this, "L10N", function() {
const { LocalizationHelper } = require("devtools/shared/l10n");
const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
return new LocalizationHelper(
"devtools/client/locales/components.properties"
);

Просмотреть файл

@ -4,21 +4,25 @@
"use strict";
const { Component } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const {
Component,
} = require("resource://devtools/client/shared/vendor/react.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const {
getUnicodeUrl,
getUnicodeUrlPath,
getUnicodeHostname,
} = require("devtools/client/shared/unicode-url");
} = require("resource://devtools/client/shared/unicode-url.js");
const {
getSourceNames,
parseURL,
getSourceMappedFile,
} = require("devtools/client/shared/source-utils");
const { LocalizationHelper } = require("devtools/shared/l10n");
const { MESSAGE_SOURCE } = require("devtools/client/webconsole/constants");
} = require("resource://devtools/client/shared/source-utils.js");
const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
const {
MESSAGE_SOURCE,
} = require("resource://devtools/client/webconsole/constants.js");
const l10n = new LocalizationHelper(
"devtools/client/locales/components.properties"

Просмотреть файл

@ -23,10 +23,12 @@
// | | |
// +-----------------------+---------------------+
const { Component } = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { assert } = require("devtools/shared/DevToolsUtils");
const {
Component,
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const { assert } = require("resource://devtools/shared/DevToolsUtils.js");
class HSplitBox extends Component {
static get propTypes() {

Просмотреть файл

@ -9,18 +9,20 @@ const {
createRef,
Component,
cloneElement,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const {
ul,
li,
div,
} = require("devtools/client/shared/vendor/react-dom-factories");
} = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const { scrollIntoView } = require("devtools/client/shared/scroll");
const {
scrollIntoView,
} = require("resource://devtools/client/shared/scroll.js");
const {
preventDefaultAndStopPropagation,
} = require("devtools/client/shared/events");
} = require("resource://devtools/client/shared/events.js");
loader.lazyRequireGetter(
this,

Просмотреть файл

@ -4,8 +4,8 @@
"use strict";
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const { a } = dom;
loader.lazyRequireGetter(

Просмотреть файл

@ -7,17 +7,19 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { LocalizationHelper } = require("devtools/shared/l10n");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
const l10n = new LocalizationHelper(
"devtools/client/locales/components.properties"
);
const { div, span, button } = dom;
loader.lazyGetter(this, "MDNLink", function() {
return createFactory(require("devtools/client/shared/components/MdnLink"));
return createFactory(
require("resource://devtools/client/shared/components/MdnLink.js")
);
});
// Priority Levels

Просмотреть файл

@ -10,17 +10,19 @@ const {
createFactory,
createRef,
PureComponent,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
loader.lazyGetter(this, "SearchBoxAutocompletePopup", function() {
return createFactory(
require("devtools/client/shared/components/SearchBoxAutocompletePopup")
require("resource://devtools/client/shared/components/SearchBoxAutocompletePopup.js")
);
});
loader.lazyGetter(this, "MDNLink", function() {
return createFactory(require("devtools/client/shared/components/MdnLink"));
return createFactory(
require("resource://devtools/client/shared/components/MdnLink.js")
);
});
loader.lazyRequireGetter(

Просмотреть файл

@ -4,9 +4,11 @@
"use strict";
const { Component } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const {
Component,
} = require("resource://devtools/client/shared/vendor/react.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
class SearchBoxAutocompletePopup extends Component {
static get propTypes() {

Просмотреть файл

@ -7,14 +7,14 @@
const {
createFactory,
PureComponent,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const SidebarToggle = createFactory(
require("devtools/client/shared/components/SidebarToggle")
require("resource://devtools/client/shared/components/SidebarToggle.js")
);
const Tabs = createFactory(
require("devtools/client/shared/components/tabs/Tabs").Tabs
require("resource://devtools/client/shared/components/tabs/Tabs.js").Tabs
);
class Sidebar extends PureComponent {

Просмотреть файл

@ -4,9 +4,11 @@
"use strict";
const { Component } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const {
Component,
} = require("resource://devtools/client/shared/vendor/react.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
// Shortcuts
const { button } = dom;

Просмотреть файл

@ -7,9 +7,9 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { LocalizationHelper } = require("devtools/shared/l10n");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
const l10n = new LocalizationHelper(
"devtools/client/locales/components.properties"
@ -18,15 +18,15 @@ const dbgL10n = new LocalizationHelper(
"devtools/client/locales/debugger.properties"
);
const Frames = createFactory(
require("devtools/client/debugger/src/components/SecondaryPanes/Frames/index")
require("resource://devtools/client/debugger/src/components/SecondaryPanes/Frames/index.js")
.Frames
);
const {
annotateFrames,
} = require("devtools/client/debugger/src/utils/pause/frames/annotateFrames");
} = require("resource://devtools/client/debugger/src/utils/pause/frames/annotateFrames.js");
const {
getDisplayURL,
} = require("devtools/client/debugger/src/utils/sources-tree/getURL");
} = require("resource://devtools/client/debugger/src/utils/sources-tree/getURL.js");
class SmartTrace extends Component {
static get propTypes() {

Просмотреть файл

@ -7,11 +7,13 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { LocalizationHelper } = require("devtools/shared/l10n");
const Frame = createFactory(require("devtools/client/shared/components/Frame"));
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
const Frame = createFactory(
require("resource://devtools/client/shared/components/Frame.js")
);
const l10n = new LocalizationHelper(
"devtools/client/locales/webconsole.properties"

Просмотреть файл

@ -4,10 +4,10 @@
"use strict";
const React = require("devtools/client/shared/vendor/react");
const React = require("resource://devtools/client/shared/vendor/react.js");
const { Component, createFactory } = React;
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
// depth
const AUTO_EXPAND_DEPTH = 0;

Просмотреть файл

@ -7,13 +7,15 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { scrollIntoView } = require("devtools/client/shared/scroll");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const {
scrollIntoView,
} = require("resource://devtools/client/shared/scroll.js");
const {
preventDefaultAndStopPropagation,
} = require("devtools/client/shared/events");
} = require("resource://devtools/client/shared/events.js");
loader.lazyRequireGetter(
this,

Просмотреть файл

@ -13,8 +13,10 @@
* See devtools/client/framework/toolbox.js:setIframeVisible().
*/
const { Component } = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const {
Component,
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
class VisibilityHandler extends Component {
static get propTypes() {

Просмотреть файл

@ -7,13 +7,13 @@
// A button that toggles a doorhanger menu.
const flags = require("devtools/shared/flags");
const flags = require("resource://devtools/shared/flags.js");
const {
createRef,
PureComponent,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const { button } = dom;
const isMacOS = Services.appinfo.OS === "Darwin";

Просмотреть файл

@ -11,12 +11,15 @@ const {
createFactory,
createRef,
PureComponent,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const { button, li, span } = dom;
loader.lazyGetter(this, "Localized", () =>
createFactory(require("devtools/client/shared/vendor/fluent-react").Localized)
createFactory(
require("resource://devtools/client/shared/vendor/fluent-react.js")
.Localized
)
);
class MenuItem extends PureComponent {

Просмотреть файл

@ -13,11 +13,13 @@
const {
Children,
PureComponent,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const { div } = dom;
const { focusableSelector } = require("devtools/client/shared/focus");
const {
focusableSelector,
} = require("resource://devtools/client/shared/focus.js");
class MenuList extends PureComponent {
static get propTypes() {

Просмотреть файл

@ -4,8 +4,8 @@
"use strict";
const Menu = require("devtools/client/framework/menu");
const MenuItem = require("devtools/client/framework/menu-item");
const Menu = require("resource://devtools/client/framework/menu.js");
const MenuItem = require("resource://devtools/client/framework/menu-item.js");
/**
* Helper function for opening context menu.

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const { loadItemProperties } = require("devtools/client/shared/components/object-inspector/utils/load-properties");
const { loadItemProperties } = require("resource://devtools/client/shared/components/object-inspector/utils/load-properties.js");
const {
getPathExpression,
getParentFront,
@ -10,8 +10,8 @@ const {
getValue,
nodeIsBucket,
getFront,
} = require("devtools/client/shared/components/object-inspector/utils/node");
const { getLoadedProperties, getWatchpoints } = require("devtools/client/shared/components/object-inspector/reducer");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const { getLoadedProperties, getWatchpoints } = require("resource://devtools/client/shared/components/object-inspector/reducer.js");
/**
* This action is responsible for expanding a given node, which also means that

Просмотреть файл

@ -8,32 +8,32 @@ const {
Component,
createFactory,
createElement,
} = require("devtools/client/shared/vendor/react");
} = require("resource://devtools/client/shared/vendor/react.js");
const {
connect,
Provider,
} = require("devtools/client/shared/vendor/react-redux");
} = require("resource://devtools/client/shared/vendor/react-redux.js");
loader.lazyRequireGetter(
this,
"createStore",
"devtools/client/shared/redux/create-store"
);
const actions = require("devtools/client/shared/components/object-inspector/actions");
const actions = require("resource://devtools/client/shared/components/object-inspector/actions.js");
const {
getExpandedPaths,
getLoadedProperties,
getEvaluations,
default: reducer,
} = require("devtools/client/shared/components/object-inspector/reducer");
} = require("resource://devtools/client/shared/components/object-inspector/reducer.js");
const Tree = createFactory(require("devtools/client/shared/components/Tree"));
const Tree = createFactory(require("resource://devtools/client/shared/components/Tree.js"));
const ObjectInspectorItem = createFactory(
require("devtools/client/shared/components/object-inspector/components/ObjectInspectorItem")
require("resource://devtools/client/shared/components/object-inspector/components/ObjectInspectorItem.js")
);
const Utils = require("devtools/client/shared/components/object-inspector/utils/index");
const Utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const { renderRep, shouldRenderRootsInReps } = Utils;
const {
getChildrenWithEvaluations,

Просмотреть файл

@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const { Component } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { Component } = require("resource://devtools/client/shared/vendor/react.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const isMacOS = Services.appinfo.OS === "Darwin";
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const Utils = require("devtools/client/shared/components/object-inspector/utils/index");
const Utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const {
getValue,

Просмотреть файл

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const ObjectInspector = require("devtools/client/shared/components/object-inspector/components/ObjectInspector");
const utils = require("devtools/client/shared/components/object-inspector/utils/index");
const reducer = require("devtools/client/shared/components/object-inspector/reducer");
const actions = require("devtools/client/shared/components/object-inspector/actions");
const ObjectInspector = require("resource://devtools/client/shared/components/object-inspector/components/ObjectInspector.js");
const utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const reducer = require("resource://devtools/client/shared/components/object-inspector/reducer.js");
const actions = require("resource://devtools/client/shared/components/object-inspector/actions.js");
module.exports = { ObjectInspector, utils, actions, reducer };

Просмотреть файл

@ -5,7 +5,7 @@
const {
getValue,
nodeHasFullText,
} = require("devtools/client/shared/components/object-inspector/utils/node");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
async function enumIndexedProperties(objectFront, start, end) {
try {

Просмотреть файл

@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const client = require("devtools/client/shared/components/object-inspector/utils/client");
const loadProperties = require("devtools/client/shared/components/object-inspector/utils/load-properties");
const node = require("devtools/client/shared/components/object-inspector/utils/node");
const client = require("resource://devtools/client/shared/components/object-inspector/utils/client.js");
const loadProperties = require("resource://devtools/client/shared/components/object-inspector/utils/load-properties.js");
const node = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const { nodeIsError, nodeIsPrimitive, nodeHasCustomFormatter, nodeHasCustomFormattedBody } = node;
const selection = require("devtools/client/shared/components/object-inspector/utils/selection");
const selection = require("resource://devtools/client/shared/components/object-inspector/utils/selection.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const {
REPS: { Rep, Grip },
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
function shouldRenderRootsInReps(roots, props = {}) {
if (roots.length !== 1) {

Просмотреть файл

@ -13,7 +13,7 @@ const {
getPromiseState,
getProxySlots,
getCustomFormatterBody,
} = require("devtools/client/shared/components/object-inspector/utils/client");
} = require("resource://devtools/client/shared/components/object-inspector/utils/client.js");
const {
getClosestGripNode,
@ -33,7 +33,7 @@ const {
nodeIsProxy,
nodeNeedsNumericalBuckets,
nodeIsLongString,
} = require("devtools/client/shared/components/object-inspector/utils/node");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
function loadItemProperties(item, client, loadedProperties, threadActorID) {
const gripItem = getClosestGripNode(item);

Просмотреть файл

@ -4,16 +4,16 @@
const {
maybeEscapePropertyName,
} = require("devtools/client/shared/components/reps/reps/rep-utils");
const ArrayRep = require("devtools/client/shared/components/reps/reps/array");
const GripArrayRep = require("devtools/client/shared/components/reps/reps/grip-array");
const GripMap = require("devtools/client/shared/components/reps/reps/grip-map");
const GripEntryRep = require("devtools/client/shared/components/reps/reps/grip-entry");
const ErrorRep = require("devtools/client/shared/components/reps/reps/error");
const BigIntRep = require("devtools/client/shared/components/reps/reps/big-int");
} = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");
const ArrayRep = require("resource://devtools/client/shared/components/reps/reps/array.js");
const GripArrayRep = require("resource://devtools/client/shared/components/reps/reps/grip-array.js");
const GripMap = require("resource://devtools/client/shared/components/reps/reps/grip-map.js");
const GripEntryRep = require("resource://devtools/client/shared/components/reps/reps/grip-entry.js");
const ErrorRep = require("resource://devtools/client/shared/components/reps/reps/error.js");
const BigIntRep = require("resource://devtools/client/shared/components/reps/reps/big-int.js");
const {
isLongString,
} = require("devtools/client/shared/components/reps/reps/string");
} = require("resource://devtools/client/shared/components/reps/reps/string.js");
const MAX_NUMERICAL_PROPERTIES = 100;

Просмотреть файл

@ -4,9 +4,12 @@
"use strict";
const { createRef, Component } = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const {
createRef,
Component,
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
class Draggable extends Component {
static get propTypes() {

Просмотреть файл

@ -7,10 +7,10 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const Draggable = createFactory(
require("devtools/client/shared/components/splitter/Draggable")
require("resource://devtools/client/shared/components/splitter/Draggable.js")
);
class GridElementWidthResizer extends Component {

Просмотреть файл

@ -7,12 +7,12 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const Draggable = createFactory(
require("devtools/client/shared/components/splitter/Draggable")
require("resource://devtools/client/shared/components/splitter/Draggable.js")
);
/**

Просмотреть файл

@ -9,12 +9,12 @@
const {
Component,
createFactory,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
} = require("resource://devtools/client/shared/vendor/react.js");
const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
const Sidebar = createFactory(
require("devtools/client/shared/components/Sidebar")
require("resource://devtools/client/shared/components/Sidebar.js")
);
loader.lazyRequireGetter(this, "Menu", "devtools/client/framework/menu");

Просмотреть файл

@ -11,14 +11,18 @@ var { require } = ChromeUtils.import(
"resource://devtools/shared/loader/Loader.jsm"
);
var { Assert } = ChromeUtils.import("resource://testing-common/Assert.jsm");
var { gDevTools } = require("devtools/client/framework/devtools");
var { gDevTools } = require("resource://devtools/client/framework/devtools.js");
var { BrowserLoader } = ChromeUtils.import(
"resource://devtools/shared/loader/browser-loader.js"
);
var { DevToolsServer } = require("devtools/server/devtools-server");
var { DevToolsClient } = require("devtools/client/devtools-client");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
var { Toolbox } = require("devtools/client/framework/toolbox");
var {
DevToolsServer,
} = require("resource://devtools/server/devtools-server.js");
var {
DevToolsClient,
} = require("resource://devtools/client/devtools-client.js");
var DevToolsUtils = require("resource://devtools/shared/DevToolsUtils.js");
var { Toolbox } = require("resource://devtools/client/framework/toolbox.js");
var { require: browserRequire } = BrowserLoader({
baseURI: "resource://devtools/client/shared/",

Просмотреть файл

@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const ObjectFront = require("devtools/client/shared/components/test/node/__mocks__/object-front");
const ObjectFront = require("resource://devtools/client/shared/components/test/node/__mocks__/object-front.js");
const {
mountObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
function generateDefaults(overrides) {
return {

Просмотреть файл

@ -6,19 +6,19 @@
const {
mountObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const {
formatObjectInspector,
waitForDispatch,
waitForLoadedProperties,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
const gripMapRepStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const mapStubs = require("devtools/client/shared/components/test/node/stubs/object-inspector/map");
const ObjectFront = require("devtools/client/shared/components/test/node/__mocks__/object-front");
const gripMapRepStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const mapStubs = require("resource://devtools/client/shared/components/test/node/stubs/object-inspector/map.js");
const ObjectFront = require("resource://devtools/client/shared/components/test/node/__mocks__/object-front.js");
function generateDefaults(overrides) {
return {

Просмотреть файл

@ -5,10 +5,10 @@
/* global jest */
const {
mountObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
const gripRepStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const ObjectFront = require("devtools/client/shared/components/test/node/__mocks__/object-front");
const gripRepStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const ObjectFront = require("resource://devtools/client/shared/components/test/node/__mocks__/object-front.js");
function generateDefaults(overrides) {
return {

Просмотреть файл

@ -4,16 +4,16 @@
const {
mountObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const {
createNode,
} = require("devtools/client/shared/components/object-inspector/utils/node");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const functionStubs = require("devtools/client/shared/components/test/node/stubs/reps/function");
const ObjectFront = require("devtools/client/shared/components/test/node/__mocks__/object-front");
const functionStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/function.js");
const ObjectFront = require("resource://devtools/client/shared/components/test/node/__mocks__/object-front.js");
function generateDefaults(overrides) {
return {

Просмотреть файл

@ -4,18 +4,18 @@
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const {
formatObjectInspector,
waitForLoadedProperties,
mountObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
const {
makeNodesForProperties,
} = require("devtools/client/shared/components/object-inspector/utils/node");
const accessorStubs = require("devtools/client/shared/components/test/node/stubs/reps/accessor");
const ObjectFront = require("devtools/client/shared/components/test/node/__mocks__/object-front");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const accessorStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/accessor.js");
const ObjectFront = require("resource://devtools/client/shared/components/test/node/__mocks__/object-front.js");
function generateDefaults(overrides) {
return {

Просмотреть файл

@ -6,13 +6,13 @@
const {
mountObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
const gripRepStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const ObjectFront = require("devtools/client/shared/components/test/node/__mocks__/object-front");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
const gripRepStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const ObjectFront = require("resource://devtools/client/shared/components/test/node/__mocks__/object-front.js");
const {
formatObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
function generateDefaults(overrides) {
return {

Просмотреть файл

@ -5,19 +5,19 @@
/* global jest */
const {
mountObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
const gripStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const gripStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const stub = gripStubs.get("testProxy");
const proxySlots = gripStubs.get("testProxySlots");
const {
formatObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
const ObjectFront = require("devtools/client/shared/components/test/node/__mocks__/object-front");
const ObjectFront = require("resource://devtools/client/shared/components/test/node/__mocks__/object-front.js");
function generateDefaults(overrides) {
return {
roots: [

Просмотреть файл

@ -4,14 +4,14 @@
const {
createNode,
} = require("devtools/client/shared/components/object-inspector/utils/node");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const {
waitForDispatch,
mountObjectInspector,
} = require("devtools/client/shared/components/test/node/components/object-inspector/test-utils");
} = require("resource://devtools/client/shared/components/test/node/components/object-inspector/test-utils.js");
const gripWindowStubs = require("devtools/client/shared/components/test/node/stubs/reps/window");
const ObjectFront = require("devtools/client/shared/components/test/node/__mocks__/object-front");
const gripWindowStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/window.js");
const ObjectFront = require("resource://devtools/client/shared/components/test/node/__mocks__/object-front.js");
const windowNode = createNode({
name: "window",
contents: { value: gripWindowStubs.get("Window")._grip },

Просмотреть файл

@ -3,37 +3,37 @@
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const { mount } = require("enzyme");
const { createFactory } = require("devtools/client/shared/vendor/react");
const { createFactory } = require("resource://devtools/client/shared/vendor/react.js");
const { Provider } = require("devtools/client/shared/vendor/react-redux");
const { Provider } = require("resource://devtools/client/shared/vendor/react-redux.js");
const {
combineReducers,
createStore,
applyMiddleware,
} = require("devtools/client/shared/vendor/redux");
} = require("resource://devtools/client/shared/vendor/redux.js");
const { thunk } = require("devtools/client/shared/redux/middleware/thunk");
const { thunk } = require("resource://devtools/client/shared/redux/middleware/thunk.js");
const {
waitUntilService,
} = require("devtools/client/shared/redux/middleware/wait-service");
} = require("resource://devtools/client/shared/redux/middleware/wait-service.js");
/**
* Redux store utils
* @module utils/create-store
*/
const objectInspector = require("devtools/client/shared/components/object-inspector/index");
const objectInspector = require("resource://devtools/client/shared/components/object-inspector/index.js");
const {
getLoadedProperties,
getLoadedPropertyKeys,
getExpandedPaths,
getExpandedPathKeys,
} = require("devtools/client/shared/components/object-inspector/reducer");
} = require("resource://devtools/client/shared/components/object-inspector/reducer.js");
const ObjectInspector = createFactory(objectInspector.ObjectInspector);
const {
NAME: WAIT_UNTIL_TYPE,
} = require("devtools/client/shared/redux/middleware/wait-service");
} = require("resource://devtools/client/shared/redux/middleware/wait-service.js");
/*
* Takes an Enzyme wrapper (obtained with mount/shallow/) and

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const { createNode, NODE_TYPES } = require("devtools/client/shared/components/object-inspector/utils/node");
const { createNode, NODE_TYPES } = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
describe("createNode", () => {
it("returns null when contents is undefined", () => {

Просмотреть файл

@ -2,19 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const accessorStubs = require("devtools/client/shared/components/test/node/stubs/reps/accessor");
const performanceStubs = require("devtools/client/shared/components/test/node/stubs/object-inspector/performance");
const gripMapStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const gripEntryStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-entry");
const gripStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const accessorStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/accessor.js");
const performanceStubs = require("resource://devtools/client/shared/components/test/node/stubs/object-inspector/performance.js");
const gripMapStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const gripEntryStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-entry.js");
const gripStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const {
createNode,
getChildren,
getValue,
makeNodesForProperties,
} = require("devtools/client/shared/components/object-inspector/utils/node");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
function createRootNodeWithAccessorProperty(accessorStub) {
const node = { name: "root", path: "rootpath" };

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const { getValue } = require("devtools/client/shared/components/object-inspector/utils/node");
const { getValue } = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
describe("getValue", () => {
it("get the value from contents.value", () => {

Просмотреть файл

@ -9,8 +9,8 @@ const {
nodeIsEntries,
nodeIsMapEntry,
nodeIsPrototype,
} = require("devtools/client/shared/components/object-inspector/utils/node");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const root = {
path: "root",
@ -227,7 +227,7 @@ describe("makeNodesForProperties", () => {
});
it("object with entries", () => {
const gripMapStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const gripMapStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const mapNode = createNode({
name: "map",

Просмотреть файл

@ -5,8 +5,8 @@
const {
createNode,
makeNumericalBuckets,
} = require("devtools/client/shared/components/object-inspector/utils/node");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
describe("makeNumericalBuckets", () => {
it("handles simple numerical buckets", () => {

Просмотреть файл

@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const gripMapStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const gripMapStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const {
createNode,
nodeHasEntries,
} = require("devtools/client/shared/components/object-inspector/utils/node");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const createRootNode = value =>
createNode({ name: "root", contents: { value } });

Просмотреть файл

@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const gripWindowStubs = require("devtools/client/shared/components/test/node/stubs/reps/window");
const gripWindowStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/window.js");
const {
createNode,
nodeIsWindow,
} = require("devtools/client/shared/components/object-inspector/utils/node");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const createRootNode = value =>
createNode({ name: "root", contents: { value } });

Просмотреть файл

@ -6,7 +6,7 @@ const {
createNode,
makeNodesForEntries,
nodeSupportsNumericalBucketing,
} = require("devtools/client/shared/components/object-inspector/utils/node");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
const createRootNode = stub =>
createNode({
@ -14,8 +14,8 @@ const createRootNode = stub =>
contents: { value: stub },
});
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const gripMapStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const gripMapStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
describe("nodeSupportsNumericalBucketing", () => {
it("returns true for Arrays", () => {

Просмотреть файл

@ -5,7 +5,7 @@
const {
makeNodesForPromiseProperties,
nodeIsPromise,
} = require("devtools/client/shared/components/object-inspector/utils/node");
} = require("resource://devtools/client/shared/components/object-inspector/utils/node.js");
describe("promises utils function", () => {
it("is promise", () => {

Просмотреть файл

@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const Utils = require("devtools/client/shared/components/object-inspector/utils/index");
const Utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const { createNode, getChildren, makeNodesForEntries } = Utils.node;
const { shouldLoadItemEntries } = Utils.loadProperties;
const gripMapStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const gripStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const gripMapStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const gripStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
describe("shouldLoadItemEntries", () => {
it("returns true for an entries node", () => {

Просмотреть файл

@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const Utils = require("devtools/client/shared/components/object-inspector/utils/index");
const Utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const { createNode } = Utils.node;
const { shouldLoadItemFullText } = Utils.loadProperties;
const longStringStubs = require("devtools/client/shared/components/test/node/stubs/reps/long-string");
const symbolStubs = require("devtools/client/shared/components/test/node/stubs/reps/symbol");
const longStringStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/long-string.js");
const symbolStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/symbol.js");
describe("shouldLoadItemFullText", () => {
it("returns true for a longString node with unloaded full text", () => {

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const Utils = require("devtools/client/shared/components/object-inspector/utils/index");
const Utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const {
createNode,
createGetterNode,
@ -16,12 +16,12 @@ const { shouldLoadItemIndexedProperties } = Utils.loadProperties;
const {
createGripMapEntry,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
const accessorStubs = require("devtools/client/shared/components/test/node/stubs/reps/accessor");
const gripMapStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const gripStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const windowStubs = require("devtools/client/shared/components/test/node/stubs/reps/window");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const accessorStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/accessor.js");
const gripMapStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const gripStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const windowStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/window.js");
describe("shouldLoadItemIndexedProperties", () => {
it("returns true for an array", () => {

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const Utils = require("devtools/client/shared/components/object-inspector/utils/index");
const Utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const {
createNode,
createGetterNode,
@ -16,12 +16,12 @@ const { shouldLoadItemNonIndexedProperties } = Utils.loadProperties;
const {
createGripMapEntry,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
const accessorStubs = require("devtools/client/shared/components/test/node/stubs/reps/accessor");
const gripMapStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const gripStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const windowStubs = require("devtools/client/shared/components/test/node/stubs/reps/window");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const accessorStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/accessor.js");
const gripMapStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const gripStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const windowStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/window.js");
describe("shouldLoadItemNonIndexedProperties", () => {
it("returns true for an array", () => {

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const Utils = require("devtools/client/shared/components/object-inspector/utils/index");
const Utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const {
createNode,
createGetterNode,
@ -16,12 +16,12 @@ const { shouldLoadItemPrototype } = Utils.loadProperties;
const {
createGripMapEntry,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
const accessorStubs = require("devtools/client/shared/components/test/node/stubs/reps/accessor");
const gripMapStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const gripStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const windowStubs = require("devtools/client/shared/components/test/node/stubs/reps/window");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const accessorStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/accessor.js");
const gripMapStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const gripStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const windowStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/window.js");
describe("shouldLoadItemPrototype", () => {
it("returns true for an array", () => {

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const Utils = require("devtools/client/shared/components/object-inspector/utils/index");
const Utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const {
createNode,
createGetterNode,
@ -16,12 +16,12 @@ const { shouldLoadItemSymbols } = Utils.loadProperties;
const {
createGripMapEntry,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
const accessorStubs = require("devtools/client/shared/components/test/node/stubs/reps/accessor");
const gripMapStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const gripStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const windowStubs = require("devtools/client/shared/components/test/node/stubs/reps/window");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const accessorStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/accessor.js");
const gripMapStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const gripStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const windowStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/window.js");
describe("shouldLoadItemSymbols", () => {
it("returns true for an array", () => {

Просмотреть файл

@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const Utils = require("devtools/client/shared/components/object-inspector/utils/index");
const Utils = require("resource://devtools/client/shared/components/object-inspector/utils/index.js");
const { shouldRenderRootsInReps } = Utils;
const nullStubs = require("devtools/client/shared/components/test/node/stubs/reps/null");
const numberStubs = require("devtools/client/shared/components/test/node/stubs/reps/number");
const undefinedStubs = require("devtools/client/shared/components/test/node/stubs/reps/undefined");
const gripStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const symbolStubs = require("devtools/client/shared/components/test/node/stubs/reps/symbol");
const errorStubs = require("devtools/client/shared/components/test/node/stubs/reps/error");
const bigIntStubs = require("devtools/client/shared/components/test/node/stubs/reps/big-int");
const nullStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/null.js");
const numberStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/number.js");
const undefinedStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/undefined.js");
const gripStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const symbolStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/symbol.js");
const errorStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/error.js");
const bigIntStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/big-int.js");
describe("shouldRenderRootsInReps", () => {
it("returns true for a string", () => {

Просмотреть файл

@ -10,12 +10,12 @@ const { JSDOM } = require("jsdom");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Accessible } = REPS;
const {
ELLIPSIS,
} = require("devtools/client/shared/components/reps/reps/rep-utils");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/accessible");
} = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/accessible.js");
describe("Accessible - Document", () => {
const stub = stubs.get("Document");

Просмотреть файл

@ -9,11 +9,11 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Accessor, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/accessor");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/accessor.js");
describe("Accessor - getter", () => {
const object = stubs.get("getter");

Просмотреть файл

@ -9,11 +9,11 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const { ArrayRep, Rep } = REPS;
const { maxLengthMap } = ArrayRep;

Просмотреть файл

@ -9,15 +9,15 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const { Attribute, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/attribute");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/attribute.js");
describe("Attribute", () => {
const stub = stubs.get("Attribute")._grip;

Просмотреть файл

@ -8,9 +8,9 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { BigInt, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/big-int");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/big-int.js");
describe("BigInt", () => {
describe("1n", () => {

Просмотреть файл

@ -9,17 +9,17 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const { Rep, CommentNode } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/comment-node");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/comment-node.js");
describe("CommentNode", () => {
const stub = stubs.get("Comment")._grip;

Просмотреть файл

@ -9,15 +9,15 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const { DateTime, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/date-time");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/date-time.js");
describe("test DateTime", () => {
const stub = stubs.get("DateTime")._grip;

Просмотреть файл

@ -8,14 +8,14 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const { DocumentType } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/document-type");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/document-type.js");
describe("DocumentType", () => {
const stub = stubs.get("html");

Просмотреть файл

@ -8,14 +8,14 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const { Document } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/document");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/document.js");
describe("Document", () => {
const stub = stubs.get("Document");

Просмотреть файл

@ -10,22 +10,22 @@ const { JSDOM } = require("jsdom");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const {
MAX_ATTRIBUTE_LENGTH,
} = require("devtools/client/shared/components/reps/reps/element-node");
} = require("resource://devtools/client/shared/components/reps/reps/element-node.js");
const { ElementNode } = REPS;
const {
expectActorAttribute,
getSelectableInInspectorGrips,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const {
ELLIPSIS,
} = require("devtools/client/shared/components/reps/reps/rep-utils");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/element-node");
} = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/element-node.js");
describe("ElementNode - BodyNode", () => {
const stub = stubs.get("BodyNode");

Просмотреть файл

@ -9,18 +9,18 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const { ErrorRep } = REPS;
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/error");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/error.js");
const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
describe("Error - Simple error", () => {
// Test object = `new Error("Error message")`

Просмотреть файл

@ -9,17 +9,17 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Event } = REPS;
const {
expectActorAttribute,
getSelectableInInspectorGrips,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/event");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/event.js");
describe("Event - beforeprint", () => {
const object = stubs.get("testEvent");

Просмотреть файл

@ -7,11 +7,13 @@
/* global beforeAll, afterAll */
const { shallow } = require("enzyme");
const { REPS } = require("devtools/client/shared/components/reps/reps/rep");
const {
REPS,
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/failure");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/failure.js");
let originalConsoleError;
beforeAll(() => {

Просмотреть файл

@ -6,16 +6,18 @@
/* global jest */
const { shallow } = require("enzyme");
const { REPS } = require("devtools/client/shared/components/reps/reps/rep");
const {
REPS,
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const { Func } = REPS;
const { getFunctionName } = Func;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/function");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/function.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const renderRep = (object, props) => {
return shallow(Func.rep({ object, ...props }));
};

Просмотреть файл

@ -6,17 +6,19 @@
/* global jest */
const { shallow } = require("enzyme");
const { getRep } = require("devtools/client/shared/components/reps/reps/rep");
const GripArray = require("devtools/client/shared/components/reps/reps/grip-array");
const {
getRep,
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const GripArray = require("resource://devtools/client/shared/components/reps/reps/grip-array.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const {
expectActorAttribute,
getSelectableInInspectorGrips,
getGripLengthBubbleText,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const { maxLengthMap } = GripArray;
function shallowRenderRep(object, props = {}) {

Просмотреть файл

@ -10,20 +10,20 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { GripEntry } = REPS;
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const {
createGripMapEntry,
getGripLengthBubbleText,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-entry");
const nodeStubs = require("devtools/client/shared/components/test/node/stubs/reps/element-node");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-entry.js");
const nodeStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/element-node.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const renderRep = (object, mode, props) => {
return shallow(

Просмотреть файл

@ -7,17 +7,19 @@
/* global jest */
const { shallow } = require("enzyme");
const { getRep } = require("devtools/client/shared/components/reps/reps/rep");
const GripMap = require("devtools/client/shared/components/reps/reps/grip-map");
const {
getRep,
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const GripMap = require("resource://devtools/client/shared/components/reps/reps/grip-map.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
const {
expectActorAttribute,
getSelectableInInspectorGrips,
getMapLengthBubbleText,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const { maxLengthMap, getLength } = GripMap;
function shallowRenderRep(object, props = {}) {

Просмотреть файл

@ -10,19 +10,19 @@ const { shallow } = require("enzyme");
const {
getRep,
Rep,
} = require("devtools/client/shared/components/reps/reps/rep");
const Grip = require("devtools/client/shared/components/reps/reps/grip");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const Grip = require("resource://devtools/client/shared/components/reps/reps/grip.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const gripArrayStubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
const gripArrayStubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const {
expectActorAttribute,
getSelectableInInspectorGrips,
getGripLengthBubbleText,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const { maxLengthMap } = Grip;
function shallowRenderRep(object, props = {}) {

Просмотреть файл

@ -6,11 +6,11 @@
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
const {
getGripLengthBubbleText,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
describe("getGripLengthBubbleText - Zero length", () => {
const object = stubs.get("testBasic");

Просмотреть файл

@ -9,11 +9,11 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { InfinityRep, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/infinity");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/infinity.js");
describe("testInfinity", () => {
const stub = stubs.get("Infinity");

Просмотреть файл

@ -8,18 +8,18 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
ELLIPSIS,
} = require("devtools/client/shared/components/reps/reps/rep-utils");
} = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const { StringRep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/long-string");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/long-string.js");
function quoteNewlines(text) {
return text.split("\n").join("\\n");

Просмотреть файл

@ -9,11 +9,11 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { NaNRep, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/nan");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/nan.js");
describe("NaN", () => {
const stub = stubs.get("NaN");

Просмотреть файл

@ -9,11 +9,11 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Null, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/null");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/null.js");
describe("testNull", () => {
const stub = stubs.get("Null");

Просмотреть файл

@ -8,9 +8,9 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Number, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/number");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/number.js");
describe("Int", () => {
const stub = stubs.get("Int");

Просмотреть файл

@ -7,14 +7,14 @@
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { shallow } = require("enzyme");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/object-with-text");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/object-with-text.js");
const { ObjectWithText, Rep } = REPS;
describe("Object with text - CSSStyleRule", () => {

Просмотреть файл

@ -8,12 +8,12 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { ObjectWithURL } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/object-with-url");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/object-with-url.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
describe("ObjectWithURL", () => {
const stub = stubs.get("ObjectWithUrl");

Просмотреть файл

@ -8,11 +8,11 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Obj } = REPS;
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const renderComponent = (object, props) => {
return shallow(Obj.rep({ object, ...props }));
@ -217,129 +217,129 @@ describe("Object - noGrip prop", () => {
});
it("Attribute grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/attribute");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/attribute.js");
expect(getRep(stubs.get("Attribute"), undefined, true)).toBe(Obj.rep);
});
it("CommentNode grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/comment-node");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/comment-node.js");
expect(getRep(stubs.get("Comment"), undefined, true)).toBe(Obj.rep);
});
it("DateTime grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/date-time");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/date-time.js");
expect(getRep(stubs.get("DateTime"), undefined, true)).toBe(Obj.rep);
});
it("Document grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/document");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/document.js");
expect(getRep(stubs.get("Document"), undefined, true)).toBe(Obj.rep);
});
it("ElementNode grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/element-node");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/element-node.js");
expect(getRep(stubs.get("BodyNode"), undefined, true)).toBe(Obj.rep);
});
it("Error grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/error");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/error.js");
expect(getRep(stubs.get("SimpleError"), undefined, true)).toBe(Obj.rep);
});
it("Event grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/event");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/event.js");
expect(getRep(stubs.get("testEvent"), undefined, true)).toBe(Obj.rep);
});
it("Function grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/function");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/function.js");
expect(getRep(stubs.get("Named"), undefined, true)).toBe(Obj.rep);
});
it("Array grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-array");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js");
expect(getRep(stubs.get("testMaxProps"), undefined, true)).toBe(Obj.rep);
});
it("Map grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/grip-map");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-map.js");
expect(getRep(stubs.get("testSymbolKeyedMap"), undefined, true)).toBe(
Obj.rep
);
});
it("Object grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/grip");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js");
expect(getRep(stubs.get("testMaxProps"), undefined, true)).toBe(Obj.rep);
});
it("Infinity grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/infinity");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/infinity.js");
expect(getRep(stubs.get("Infinity"), undefined, true)).toBe(Obj.rep);
});
it("LongString grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/long-string");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/long-string.js");
expect(getRep(stubs.get("testMultiline"), undefined, true)).toBe(Obj.rep);
});
it("NaN grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/nan");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/nan.js");
expect(getRep(stubs.get("NaN"), undefined, true)).toBe(Obj.rep);
});
it("Null grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/null");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/null.js");
expect(getRep(stubs.get("Null"), undefined, true)).toBe(Obj.rep);
});
it("Number grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/number");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/number.js");
expect(getRep(stubs.get("NegZeroGrip"), undefined, true)).toBe(Obj.rep);
});
it("ObjectWithText grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/object-with-text");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/object-with-text.js");
expect(getRep(stubs.get("ShadowRule"), undefined, true)).toBe(Obj.rep);
});
it("ObjectWithURL grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/object-with-url");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/object-with-url.js");
expect(getRep(stubs.get("ObjectWithUrl"), undefined, true)).toBe(Obj.rep);
});
it("Promise grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/promise");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/promise.js");
expect(getRep(stubs.get("Pending"), undefined, true)).toBe(Obj.rep);
});
it("RegExp grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/regexp");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/regexp.js");
expect(getRep(stubs.get("RegExp"), undefined, true)).toBe(Obj.rep);
});
it("Stylesheet grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/stylesheet");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/stylesheet.js");
expect(getRep(stubs.get("StyleSheet"), undefined, true)).toBe(Obj.rep);
});
it("Symbol grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/symbol");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/symbol.js");
expect(getRep(stubs.get("Symbol"), undefined, true)).toBe(Obj.rep);
});
it("TextNode grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/text-node");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/text-node.js");
expect(getRep(stubs.get("testRendering"), undefined, true)).toBe(Obj.rep);
});
it("Undefined grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/undefined");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/undefined.js");
expect(getRep(stubs.get("Undefined"), undefined, true)).toBe(Obj.rep);
});
it("Window grip", () => {
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/window");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/window.js");
expect(getRep(stubs.get("Window"), undefined, true)).toBe(Obj.rep);
});

Просмотреть файл

@ -9,17 +9,17 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { PromiseRep } = REPS;
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/promise");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/promise.js");
const {
expectActorAttribute,
getSelectableInInspectorGrips,
getGripLengthBubbleText,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const renderRep = (object, props) => {
return shallow(PromiseRep.rep({ object, ...props }));

Просмотреть файл

@ -8,15 +8,15 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Rep, RegExp } = REPS;
const {
ELLIPSIS,
} = require("devtools/client/shared/components/reps/reps/rep-utils");
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/regexp");
} = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/regexp.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
describe("test RegExp", () => {
const stub = stubs.get("RegExp");

Просмотреть файл

@ -6,11 +6,13 @@
/* global jest */
const { mount } = require("enzyme");
const { REPS } = require("devtools/client/shared/components/reps/reps/rep");
const {
REPS,
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Rep } = REPS;
const {
getGripLengthBubbleText,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const renderRep = (string, props) =>
mount(
@ -544,7 +546,7 @@ describe("test String with URL", () => {
});
it("does render a link in a grip array", () => {
const object = require("devtools/client/shared/components/test/node/stubs/reps/grip-array").get(
const object = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip-array.js").get(
'["http://example.com/abcdefghijabcdefghij some other text"]'
);
const length = getGripLengthBubbleText(object);
@ -578,7 +580,7 @@ describe("test String with URL", () => {
});
it("does render a link in a grip object", () => {
const object = require("devtools/client/shared/components/test/node/stubs/reps/grip").get(
const object = require("resource://devtools/client/shared/components/test/node/stubs/reps/grip.js").get(
'{test: "http://example.com/ some other text"}'
);
const openLink = jest.fn();

Просмотреть файл

@ -7,8 +7,10 @@
const { shallow, mount } = require("enzyme");
const {
ELLIPSIS,
} = require("devtools/client/shared/components/reps/reps/rep-utils");
const { REPS } = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");
const {
REPS,
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Rep } = REPS;
const renderRep = (string, props) =>

Просмотреть файл

@ -8,12 +8,12 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { StyleSheet, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/stylesheet");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/stylesheet.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
describe("Test StyleSheet", () => {
const stub = stubs.get("StyleSheet")._grip;

Просмотреть файл

@ -5,12 +5,14 @@
"use strict";
const { shallow } = require("enzyme");
const { REPS } = require("devtools/client/shared/components/reps/reps/rep");
const {
REPS,
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/symbol");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/symbol.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
describe("test Symbol", () => {
const stub = stubs.get("Symbol");

Просмотреть файл

@ -8,19 +8,19 @@ const { shallow } = require("enzyme");
const {
lengthBubble,
} = require("devtools/client/shared/components/reps/shared/grip-length-bubble");
} = require("resource://devtools/client/shared/components/reps/shared/grip-length-bubble.js");
const {
maxLengthMap: arrayLikeMaxLengthMap,
getLength: getArrayLikeLength,
} = require("devtools/client/shared/components/reps/reps/grip-array");
} = require("resource://devtools/client/shared/components/reps/reps/grip-array.js");
const {
maxLengthMap: mapMaxLengths,
getLength: getMapLength,
} = require("devtools/client/shared/components/reps/reps/grip-map");
} = require("resource://devtools/client/shared/components/reps/reps/grip-map.js");
const {
getGripPreviewItems,
} = require("devtools/client/shared/components/reps/reps/rep-utils");
const nodeConstants = require("devtools/client/shared/components/reps/shared/dom-node-constants");
} = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");
const nodeConstants = require("resource://devtools/client/shared/components/reps/shared/dom-node-constants.js");
/**
* Get an array of all the items from the grip in parameter (including the grip

Просмотреть файл

@ -10,19 +10,19 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const { TextNode } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/text-node");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/text-node.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
const {
ELLIPSIS,
} = require("devtools/client/shared/components/reps/reps/rep-utils");
} = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");
function quoteNewlines(text) {
return text.split("\n").join("\\n");

Просмотреть файл

@ -9,11 +9,11 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const { Undefined, Rep } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/undefined");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/undefined.js");
// Test that correct rep is chosen
describe("Test Undefined", () => {
const stub = stubs.get("Undefined");

Просмотреть файл

@ -9,16 +9,16 @@ const { shallow } = require("enzyme");
const {
REPS,
getRep,
} = require("devtools/client/shared/components/reps/reps/rep");
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const { Rep, Window } = REPS;
const stubs = require("devtools/client/shared/components/test/node/stubs/reps/window");
const stubs = require("resource://devtools/client/shared/components/test/node/stubs/reps/window.js");
const {
expectActorAttribute,
} = require("devtools/client/shared/components/test/node/components/reps/test-helpers");
} = require("resource://devtools/client/shared/components/test/node/components/reps/test-helpers.js");
describe("test Window", () => {
const stub = stubs.get("Window")._grip;

Просмотреть файл

@ -11,7 +11,9 @@ const { mount } = require("enzyme");
const dom = require("react-dom-factories");
const { Component, createFactory } = React;
const Tree = createFactory(require("devtools/client/shared/components/Tree"));
const Tree = createFactory(
require("resource://devtools/client/shared/components/Tree.js")
);
function mountTree(overrides = {}) {
return mount(

Просмотреть файл

@ -11,5 +11,5 @@ Enzyme.configure({ adapter: new Adapter() });
const {
setMocksInGlobal,
} = require("devtools/client/shared/test-helpers/shared-node-helpers");
} = require("resource://devtools/client/shared/test-helpers/shared-node-helpers.js");
setMocksInGlobal();

Просмотреть файл

@ -6,10 +6,10 @@
const {
MODE,
} = require("devtools/client/shared/components/reps/reps/constants");
} = require("resource://devtools/client/shared/components/reps/reps/constants.js");
const {
maxLengthMap,
} = require("devtools/client/shared/components/reps/reps/grip-array");
} = require("resource://devtools/client/shared/components/reps/reps/grip-array.js");
const stubs = new Map();
stubs.set("testBasic", {

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше