diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /devtools/client/framework/test/reload | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/framework/test/reload')
12 files changed, 137 insertions, 0 deletions
diff --git a/devtools/client/framework/test/reload/.eslintrc.js b/devtools/client/framework/test/reload/.eslintrc.js new file mode 100644 index 0000000000..562c45bc96 --- /dev/null +++ b/devtools/client/framework/test/reload/.eslintrc.js @@ -0,0 +1,18 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +module.exports = { + globals: { + __dirname: true, + }, + overrides: [ + { + files: ["**/*.js"], + rules: { + "no-unused-vars": "off", + }, + }, + ], +}; diff --git a/devtools/client/framework/test/reload/README.md b/devtools/client/framework/test/reload/README.md new file mode 100644 index 0000000000..e8f71af039 --- /dev/null +++ b/devtools/client/framework/test/reload/README.md @@ -0,0 +1,4 @@ +# STEPS TO REBUILD THE BUNDLES FOR ALL VERSIONS + +1. yarn install +2. yarn webpack diff --git a/devtools/client/framework/test/reload/package.json b/devtools/client/framework/test/reload/package.json new file mode 100644 index 0000000000..a2c06ff28f --- /dev/null +++ b/devtools/client/framework/test/reload/package.json @@ -0,0 +1,12 @@ +{ + "name": "code-reload", + "version": "1.0.0", + "description": "Examples folders for testing sourcemps on code reload", + "main": "index.js", + "author": "Hubert B Manilla <hmanilla@mozilla.com>", + "license": "MIT", + "devDependencies": { + "webpack": "^5.75.0", + "webpack-cli": "^5.0.1" + } +} diff --git a/devtools/client/framework/test/reload/v1/code_bundle_reload.js b/devtools/client/framework/test/reload/v1/code_bundle_reload.js new file mode 100644 index 0000000000..bed88f7565 --- /dev/null +++ b/devtools/client/framework/test/reload/v1/code_bundle_reload.js @@ -0,0 +1,19 @@ +/******/ (() => { + // webpackBootstrap + /******/ "use strict"; + var __webpack_exports__ = {}; + /*!*****************************!*\ + !*** ./v1/code_reload_1.js ***! + \*****************************/ + /* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + + function f() { + console.log("The first version of the script"); + } + + f(); + + /******/ +})(); +//# sourceMappingURL=code_bundle_reload.js.map diff --git a/devtools/client/framework/test/reload/v1/code_bundle_reload.js.map b/devtools/client/framework/test/reload/v1/code_bundle_reload.js.map new file mode 100644 index 0000000000..d41c415820 --- /dev/null +++ b/devtools/client/framework/test/reload/v1/code_bundle_reload.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v1/code_bundle_reload.js","mappings":";;;;;;AAAA;AACA;;AAEa;;AAEb;AACA;AACA;;AAEA","sources":["webpack://code-reload/./v1/code_reload_1.js"],"sourcesContent":["/* Any copyright is dedicated to the Public Domain.\n http://creativecommons.org/publicdomain/zero/1.0/ */\n\n\"use strict\";\n\nfunction f() {\n console.log(\"The first version of the script\");\n}\n\nf();\n"],"names":[],"sourceRoot":""}
\ No newline at end of file diff --git a/devtools/client/framework/test/reload/v1/code_reload_1.js b/devtools/client/framework/test/reload/v1/code_reload_1.js new file mode 100644 index 0000000000..0b91e3857a --- /dev/null +++ b/devtools/client/framework/test/reload/v1/code_reload_1.js @@ -0,0 +1,10 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +function f() { + console.log("The first version of the script"); +} + +f(); diff --git a/devtools/client/framework/test/reload/v1/doc_reload.html b/devtools/client/framework/test/reload/v1/doc_reload.html new file mode 100644 index 0000000000..25df0d24b8 --- /dev/null +++ b/devtools/client/framework/test/reload/v1/doc_reload.html @@ -0,0 +1,15 @@ +<!-- Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ --> +<!doctype html> + +<html> + <script src="code_bundle_reload.js"></script> + <head> + <meta charset="utf-8"/> + <title>Empty test page 1</title> + </head> + + <body> + </body> + +</html> diff --git a/devtools/client/framework/test/reload/v2/code_bundle_reload.js b/devtools/client/framework/test/reload/v2/code_bundle_reload.js new file mode 100644 index 0000000000..c21166ba58 --- /dev/null +++ b/devtools/client/framework/test/reload/v2/code_bundle_reload.js @@ -0,0 +1,19 @@ +/******/ (() => { + // webpackBootstrap + /******/ "use strict"; + var __webpack_exports__ = {}; + /*!*****************************!*\ + !*** ./v2/code_reload_2.js ***! + \*****************************/ + /* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + + function f() { + console.log("The second version of the script"); + } + + f(); + + /******/ +})(); +//# sourceMappingURL=code_bundle_reload.js.map diff --git a/devtools/client/framework/test/reload/v2/code_bundle_reload.js.map b/devtools/client/framework/test/reload/v2/code_bundle_reload.js.map new file mode 100644 index 0000000000..d28bd1e30c --- /dev/null +++ b/devtools/client/framework/test/reload/v2/code_bundle_reload.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v2/code_bundle_reload.js","mappings":";;;;;;AAAA;AACA;;AAEa;;AAEb;AACA;AACA;;AAEA","sources":["webpack://code-reload/./v2/code_reload_2.js"],"sourcesContent":["/* Any copyright is dedicated to the Public Domain.\n http://creativecommons.org/publicdomain/zero/1.0/ */\n\n\"use strict\";\n\nfunction f() {\n console.log(\"The second version of the script\");\n}\n\nf();\n"],"names":[],"sourceRoot":""}
\ No newline at end of file diff --git a/devtools/client/framework/test/reload/v2/code_reload_2.js b/devtools/client/framework/test/reload/v2/code_reload_2.js new file mode 100644 index 0000000000..f4690279b4 --- /dev/null +++ b/devtools/client/framework/test/reload/v2/code_reload_2.js @@ -0,0 +1,10 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +function f() { + console.log("The second version of the script"); +} + +f(); diff --git a/devtools/client/framework/test/reload/v2/doc_reload.html b/devtools/client/framework/test/reload/v2/doc_reload.html new file mode 100644 index 0000000000..164e2cd26c --- /dev/null +++ b/devtools/client/framework/test/reload/v2/doc_reload.html @@ -0,0 +1,15 @@ +<!-- Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ --> +<!doctype html> + +<html> + <script src="code_bundle_reload.js"></script> + <head> + <meta charset="utf-8"/> + <title>Empty test page 2</title> + </head> + + <body> + </body> + +</html> diff --git a/devtools/client/framework/test/reload/webpack.config.js b/devtools/client/framework/test/reload/webpack.config.js new file mode 100644 index 0000000000..e26b42cd4c --- /dev/null +++ b/devtools/client/framework/test/reload/webpack.config.js @@ -0,0 +1,13 @@ +const path = require("path"); + +module.exports = [1, 2].map(version => { + return { + devtool: "source-map", + mode: "development", + entry: [path.join(__dirname, `/v${version}/code_reload_${version}.js`)], + output: { + path: __dirname, + filename: `v${version}/code_bundle_reload.js`, + }, + }; +}); |