summaryrefslogtreecommitdiffstats
path: root/devtools/client/shared/source-map-loader/test/browser/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/shared/source-map-loader/test/browser/fixtures')
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/absolute.js2
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/absolute.js.map10
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/bundle.js94
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/bundle.js.map21
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/empty.js2
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/empty.js.map10
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/if.js12
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/if.out.js16
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/if.out.js.map7
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/intermingled-sources.js62
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/intermingled-sources.js.map8
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/missingmap.js2
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/noroot.js2
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/noroot.js.map9
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/noroot2.js2
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/noroot2.js.map10
-rw-r--r--devtools/client/shared/source-map-loader/test/browser/fixtures/wasm.js.map7
17 files changed, 276 insertions, 0 deletions
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/absolute.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/absolute.js
new file mode 100644
index 0000000000..adcc337eca
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/absolute.js
@@ -0,0 +1,2 @@
+/* Doesn't really matter what is in here. */
+// # sourceMappingURL=absolute.js.map
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/absolute.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/absolute.js.map
new file mode 100644
index 0000000000..0597515870
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/absolute.js.map
@@ -0,0 +1,10 @@
+{
+ "version": 3,
+ "sources": [
+ "heart.js"
+ ],
+ "names": [],
+ "mappings": ";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA,QAAO,SAAS;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;AAEA,mBAAkB;;;;;;;ACJlB;AACA;AACA",
+ "file": "absolute.js",
+ "sourceRoot": "https://example.com/cheese/"
+}
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/bundle.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/bundle.js
new file mode 100644
index 0000000000..9ee477b856
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/bundle.js
@@ -0,0 +1,94 @@
+/** ****/ (function(modules) { // webpackBootstrap
+/** ****/ // The module cache
+/** ****/ var installedModules = {};
+/** ****/
+/** ****/ // The require function
+/** ****/ function __webpack_require__(moduleId) {
+/** ****/
+/** ****/ // Check if module is in cache
+/** ****/ if (installedModules[moduleId])
+/** ****/ {return installedModules[moduleId].exports;}
+/** ****/
+/** ****/ // Create a new module (and put it into the cache)
+/** ****/ var module = installedModules[moduleId] = {
+/** ****/ exports: {},
+/** ****/ id: moduleId,
+/** ****/ loaded: false
+/** ****/ };
+/** ****/
+/** ****/ // Execute the module function
+/** ****/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/** ****/
+/** ****/ // Flag the module as loaded
+/** ****/ module.loaded = true;
+/** ****/
+/** ****/ // Return the exports of the module
+/** ****/ return module.exports;
+/** ****/ }
+/** ****/
+/** ****/
+/** ****/ // expose the modules object (__webpack_modules__)
+/** ****/ __webpack_require__.m = modules;
+/** ****/
+/** ****/ // expose the module cache
+/** ****/ __webpack_require__.c = installedModules;
+/** ****/
+/** ****/ // __webpack_public_path__
+/** ****/ __webpack_require__.p = "";
+/** ****/
+/** ****/ // Load entry module and return exports
+/** ****/ return __webpack_require__(0);
+/** ****/ })([
+/* 0 */
+/** */ function(module, exports, __webpack_require__) {
+
+ const times2 = __webpack_require__(1);
+ const { output } = __webpack_require__(2);
+ const opts = __webpack_require__(3);
+
+ output(times2(1));
+ output(times2(2));
+
+ if (opts.extra) {
+ output(times2(3));
+}
+
+ window.keepMeAlive = function() {
+ // This function exists to make sure this script is never garbage
+ // collected. It is also callable from tests.
+ return times2(4);
+};
+
+/** *
+/ },
+/* 1 */
+/** */ function(module, exports) {
+
+ module.exports = function(x) {
+ return x * 2;
+};
+
+/** *
+/ },
+/* 2 */
+/** */ function(module, exports) {
+
+ function output(str) {
+ console.log(str);
+}
+
+ module.exports = { output };
+
+/** *
+/ },
+/* 3 */
+/** */ function(module, exports) {
+
+ module.exports = {
+ extra: true
+};
+
+/** *
+/ }
+/** ****/ ]);
+// # sourceMappingURL=bundle.js.map
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/bundle.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/bundle.js.map
new file mode 100644
index 0000000000..f53036cb8e
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/bundle.js.map
@@ -0,0 +1,21 @@
+{
+ "version": 3,
+ "sources": [
+ "webpack:///webpack/bootstrap 4ef8c7ec7c1df790781e",
+ "webpack:///./entry.js",
+ "webpack:///./times2.js",
+ "webpack:///./output.js",
+ "webpack:///./opts.js"
+ ],
+ "names": [],
+ "mappings": ";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA,QAAO,SAAS;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;AAEA,mBAAkB;;;;;;;ACJlB;AACA;AACA",
+ "file": "bundle.js",
+ "sourcesContent": [
+ " \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 4ef8c7ec7c1df790781e",
+ "const times2 = require(\"./times2\");\nconst { output } = require(\"./output\");\nconst opts = require(\"./opts\");\n\noutput(times2(1));\noutput(times2(2));\n\nif(opts.extra) {\n output(times2(3));\n}\n\nwindow.keepMeAlive = function() {\n // This function exists to make sure this script is never garbage\n // collected. It is also callable from tests.\n return times2(4);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./entry.js\n// module id = 0\n// module chunks = 0",
+ "module.exports = function(x) {\n return x * 2;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./times2.js\n// module id = 1\n// module chunks = 0",
+ "function output(str) {\n console.log(str);\n}\n\nmodule.exports = { output };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./output.js\n// module id = 2\n// module chunks = 0",
+ "module.exports = {\n extra: true\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./opts.js\n// module id = 3\n// module chunks = 0"
+ ],
+ "sourceRoot": ""
+}
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/empty.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/empty.js
new file mode 100644
index 0000000000..72c472a745
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/empty.js
@@ -0,0 +1,2 @@
+/* Doesn't really matter what is in here. */
+// # sourceMappingURL=empty.js.map
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/empty.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/empty.js.map
new file mode 100644
index 0000000000..9ebfec598d
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/empty.js.map
@@ -0,0 +1,10 @@
+{
+ "version": 3,
+ "sources": [
+ "heart.js"
+ ],
+ "names": [],
+ "mappings": ";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA,QAAO,SAAS;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;AAEA,mBAAkB;;;;;;;ACJlB;AACA;AACA",
+ "file": "empty.js",
+ "sourceRoot": ""
+}
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/if.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/if.js
new file mode 100644
index 0000000000..4ee69b19ef
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/if.js
@@ -0,0 +1,12 @@
+function componentWillReceiveProps(nextProps) {
+ console.log("start");
+ const { selectedSource } = nextProps;
+
+ if (
+ nextProps.startPanelSize !== this.props.startPanelSize ||
+ nextProps.endPanelSize !== this.props.endPanelSize
+ ) {
+ this.state.editor.codeMirror.setSize();
+ }
+ console.log("done");
+}
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/if.out.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/if.out.js
new file mode 100644
index 0000000000..9bb0752a92
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/if.out.js
@@ -0,0 +1,16 @@
+"use strict";
+
+function componentWillReceiveProps(nextProps) {
+ console.log("start");
+ var selectedSource = nextProps.selectedSource;
+
+ if (
+ nextProps.startPanelSize !== this.props.startPanelSize ||
+ nextProps.endPanelSize !== this.props.endPanelSize
+ ) {
+ this.state.editor.codeMirror.setSize();
+ }
+ console.log("done");
+}
+
+//# sourceMappingURL=if.out.js.map
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/if.out.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/if.out.js.map
new file mode 100644
index 0000000000..27feb5278f
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/if.out.js.map
@@ -0,0 +1,7 @@
+{
+ "version":3,
+ "sources":["if.js"],
+ "names":[],
+ "mappings":";;AAAA,SAAS,yBAAT,CAAmC,SAAnC,EAA8C;AAC7C,UAAQ,GAAR,CAAY,OAAZ;AAD6C,MAElC,cAFkC,GAEf,SAFe,CAElC,cAFkC;;;AAI1C,MACE,UAAU,cAAV,KAA6B,KAAK,KAAL,CAAW,cAAxC,IACA,UAAU,YAAV,KAA2B,KAAK,KAAL,CAAW,YAFxC,EAGE;AACA,SAAK,KAAL,CAAW,MAAX,CAAkB,UAAlB,CAA6B,OAA7B;AACD;AACJ,UAAQ,GAAR,CAAY,MAAZ;AACA","file":"if.out.js",
+ "sourcesContent":["function componentWillReceiveProps(nextProps) {\n\tconsole.log('start');\n const { selectedSource } = nextProps;\n\n if (\n nextProps.startPanelSize !== this.props.startPanelSize ||\n nextProps.endPanelSize !== this.props.endPanelSize\n ) {\n this.state.editor.codeMirror.setSize();\n }\n\tconsole.log('done');\n}\n"]
+}
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/intermingled-sources.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/intermingled-sources.js
new file mode 100644
index 0000000000..c3d9a150bd
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/intermingled-sources.js
@@ -0,0 +1,62 @@
+"use strict";
+
+var decl = (function() {
+ var _ref = _asyncToGenerator(
+ /*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
+ return regeneratorRuntime.wrap(
+ function _callee$(_context) {
+ while (1) {
+ switch ((_context.prev = _context.next)) {
+ case 0:
+ console.log("2");
+
+ case 1:
+ case "end":
+ return _context.stop();
+ }
+ }
+ },
+ _callee,
+ this
+ );
+ })
+ );
+
+ return function decl() {
+ return _ref.apply(this, arguments);
+ };
+})();
+
+function _asyncToGenerator(fn) {
+ return function() {
+ var gen = fn.apply(this, arguments);
+ return new Promise(function(resolve, reject) {
+ function step(key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+ if (info.done) {
+ resolve(value);
+ } else {
+ return Promise.resolve(value).then(
+ function(value) {
+ step("next", value);
+ },
+ function(err) {
+ step("throw", err);
+ }
+ );
+ }
+ }
+ return step("next");
+ });
+ };
+}
+
+console.log("1");
+
+console.log("3");
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/intermingled-sources.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/intermingled-sources.js.map
new file mode 100644
index 0000000000..2876b9900b
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/intermingled-sources.js.map
@@ -0,0 +1,8 @@
+{
+ "version":3,
+ "file":"output.js",
+ "mappings":";;;qEAEA;AAAA;AAAA;AAAA;AAAA;AACE,oBAAQ,GAAR,CAAY,GAAZ;;AADF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;kBAAe,I;;;;;;;AAFf,QAAQ,GAAR,CAAY,GAAZ;;AAMA,QAAQ,GAAR,CAAY,GAAZ",
+ "sources":["input.js"],
+ "sourcesContent":["console.log(\"1\")\n\nasync function decl(){\n console.log(\"2\");\n}\n\nconsole.log(\"3\");"],
+ "names":[]
+} \ No newline at end of file
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/missingmap.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/missingmap.js
new file mode 100644
index 0000000000..5a162652a7
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/missingmap.js
@@ -0,0 +1,2 @@
+// Source where the map is missing.
+// # sourceMappingURL=missingmap.js.map
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot.js
new file mode 100644
index 0000000000..33d15cf494
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot.js
@@ -0,0 +1,2 @@
+/* Doesn't really matter what is in here. */
+// # sourceMappingURL=noroot.js.map
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot.js.map
new file mode 100644
index 0000000000..dfeee2d765
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot.js.map
@@ -0,0 +1,9 @@
+{
+ "version": 3,
+ "sources": [
+ "heart.js"
+ ],
+ "names": [],
+ "mappings": ";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA,QAAO,SAAS;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;AAEA,mBAAkB;;;;;;;ACJlB;AACA;AACA",
+ "file": "noroot.js"
+}
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot2.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot2.js
new file mode 100644
index 0000000000..35aa77b92c
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot2.js
@@ -0,0 +1,2 @@
+/* Doesn't really matter what is in here. */
+// # sourceMappingURL=noroot2.js.map
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot2.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot2.js.map
new file mode 100644
index 0000000000..1d22100178
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/noroot2.js.map
@@ -0,0 +1,10 @@
+{
+ "version": 3,
+ "sources": [
+ "heart.js"
+ ],
+ "names": [],
+ "mappings": ";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA,QAAO,SAAS;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;AAEA,mBAAkB;;;;;;;ACJlB;AACA;AACA",
+ "file": "noroot.js",
+ "sourceContents": ["this is the full text"]
+}
diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/wasm.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/wasm.js.map
new file mode 100644
index 0000000000..828f6a9aa4
--- /dev/null
+++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/wasm.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "file": "wasm.js",
+ "names": [],
+ "sources": ["one.js"],
+ "mappings": "CAAC,IAAM"
+}