Skip to content

Commit

Permalink
Bug 1763327 - [devtools] Automatically generate Symbol rep stubs. r=b…
Browse files Browse the repository at this point in the history
…omsy.

Differential Revision: https://phabricator.services.mozilla.com/D143445
  • Loading branch information
nchevobbe committed Apr 12, 2022
1 parent ad907ed commit d39eede
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ const EXPRESSIONS_BY_FILE = {
["False", `false`],
["NegZeroGrip", `1 / -Infinity`],
]),
"symbol.js": new Map([
["Symbol", `Symbol("foo")`],
["SymbolWithoutIdentifier", `Symbol()`],
["SymbolWithLongString", `Symbol("aa".repeat(10000))`],
]),
"text-node.js": new Map([
[
"testRendering",
Expand Down Expand Up @@ -89,7 +94,6 @@ const EXPRESSIONS_BY_FILE = {
// "promise.js",
// "regexp.js",
// "stylesheet.js",
// "symbol.js",
};

add_task(async function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ support-files =
nan.js
null.js
number.js
symbol.js
text-node.js
undefined.js
window.js
Expand Down
35 changes: 19 additions & 16 deletions devtools/client/shared/components/test/node/stubs/reps/symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,31 @@
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */

"use strict";
/*
* THIS FILE IS AUTOGENERATED. DO NOT MODIFY BY HAND. RUN browser_reps_stubs.js with STUBS_UPDATE=true env TO UPDATE.
*/

const stubs = new Map();
stubs.set("Symbol", {
type: "symbol",
actor: "server1.conn1.child1/symbol1",
name: "foo",
stubs.set(`Symbol`, {
"type": "symbol",
"actor": "server0.conn0.windowGlobal4294967299/symbol40",
"name": "foo"
});

stubs.set("SymbolWithoutIdentifier", {
type: "symbol",
actor: "server1.conn1.child1/symbol2",
stubs.set(`SymbolWithoutIdentifier`, {
"type": "symbol",
"actor": "server0.conn0.windowGlobal4294967299/symbol42"
});

stubs.set("SymbolWithLongString", {
type: "symbol",
actor: "server1.conn1.child1/symbol1",
name: {
type: "longString",
initial: "aa".repeat(10000),
length: 20000,
actor: "server1.conn1.child1/longString58",
},
stubs.set(`SymbolWithLongString`, {
"type": "symbol",
"actor": "server0.conn0.windowGlobal4294967299/symbol44",
"name": {
"type": "longString",
"actor": "server0.conn0.windowGlobal4294967299/longstractor45",
"length": 20000,
"initial": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
});

module.exports = stubs;

0 comments on commit d39eede

Please sign in to comment.